Skip to content

Release v0.51.284 — Release IZ (stage-w4 — sidebar status labels + cron-sessions toggle #3570 #3514) - #3692

Merged
nesquena-hermes merged 5 commits into
masterfrom
release/stage-w4
Jun 6, 2026
Merged

nesquena-hermes merged 5 commits into
masterfrom
release/stage-w4

Conversation

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Release v0.51.284 — Release IZ (stage-w4)

Light-P3 sidebar batch — #3570 + #3514 (rodboev). Nathan-approved via screenshots. Full gate run. #3601 (fork nesting) split out (couldn't demo headlessly; ships separately).

Added

Gate findings fixed inline

Codex caught (across two rounds) that the two settings-save paths handled the cron toggle inconsistently: the explicit saveSettings() button initially omitted it entirely, then once fixed, the autosave path persisted it ungated (could store show_cron_sessions=true with show_cli_sessions=false). Both paths now gate identically (showCli && showCron); regression test updated to assert both.

Gates

Closes #3570, #3514, #2841.

nesquena-hermes and others added 5 commits June 6, 2026 00:05
Co-authored-by: Rod Boev <rod.boev@gmail.com>
…gs path too (#3514)

Codex regression-gate follow-up: the autosave path (_preferencesPayloadFromUi)
included show_cron_sessions but the explicit saveSettings() button path read/saved
show_cli_sessions and dropped the cron checkbox — clicking Save Settings silently
omitted it. Read settingsShowCronSessions + add body.show_cron_sessions (gated on
CLI sessions, mirroring autosave).
…#3514)

Codex round-2: my saveSettings() gate exposed that the autosave path
(_preferencesPayloadFromUi) posted the raw cron checkbox state ungated, so
show_cli_sessions=false + show_cron_sessions=true could persist via autosave.
Gate autosave on showCliCb too; update the regression test to assert both
paths gate on settingsShowCliSessions.
@greptile-apps

greptile-apps Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This release adds two sidebar features: manual session status labels (Todo/In Progress/Done) stored in localStorage and toggled from the row ⋯ menu, and a "Show cron sessions" preference gated behind the existing non-WebUI sessions toggle. Both server and client save paths correctly gate show_cron_sessions on show_cli_sessions.

Confidence Score: 4/5

Safe to merge; both new features are correctly off-by-default with consistent gating across all save paths and the server layer.

The cron-toggle gating logic is well-implemented and consistent between the autosave and explicit-save paths, and double-gated on the server. The status-badge feature uses textContent (no XSS surface) and a compact localStorage map. Two minor cleanup gaps exist: badge CSS uses hardcoded RGBA values rather than the theme's custom properties (contrary to the PR description), and deleted sessions leave stale entries in the hermes-session-manual-status localStorage map since deleteSession does not call setSessionManualStatus(sid, null).

static/sessions.js — deletion path does not prune the manual-status entry; static/style.css — badge colors are hardcoded rather than theme-variable-backed.

Important Files Changed

Filename Overview
api/config.py Adds show_cron_sessions to _SETTINGS_DEFAULTS (False) and _SETTINGS_BOOL_KEYS; straightforward and correct.
api/models.py Adds keyword-only show_cron parameter to _hide_from_default_sidebar; default False preserves existing behavior; cron check now skipped when show_cron=True.
api/routes.py Reads show_cron_sessions from settings inside the show_cli_sessions branch and forwards it to _dedupe_cli_sidebar_sessions_for_api; double-gated at both server and client.
static/panels.js Both save paths (autosave _preferencesPayloadFromUi and explicit saveSettings) correctly gate show_cron_sessions on showCliSessions; load path disables the checkbox when CLI sessions are off.
static/sessions.js Adds localStorage-backed manual status labels (todo/in-progress/done) with safe textContent rendering and click-cycling; stale entries not pruned when sessions are deleted.
static/style.css Badge CSS uses hardcoded RGBA/hex colors rather than CSS custom properties, contrary to the PR's theme variables claim; semi-transparent approach gives partial adaptability.
static/i18n.js Adds settings_label_cron_sessions, settings_desc_cron_sessions, and session_status_* keys to all 13 locales; non-English locales use English placeholders consistent with the repo's translate-later pattern.
static/index.html Adds settingsShowCronSessions checkbox field nested under non-WebUI sessions with correct indentation (margin-left:24px) and i18n wiring.
tests/test_issue2841_show_cron_sessions_toggle.py New test file covering _hide_from_default_sidebar behavior and string-scan assertions for both save-path gating expressions in panels.js.
tests/test_1466_sidebar_cancel_clarify.py Body-size floor for _openSessionActionMenu bumped from 7200 to 8000 to account for the three new status-picker menu items.

Reviews (1): Last reviewed commit: "fix(settings): gate show_cron_sessions i..." | Re-trigger Greptile

Comment thread static/style.css
Comment on lines +3876 to +3878
.session-manual-status--todo{background:rgba(99,179,237,.18);border-color:rgba(99,179,237,.35);color:#63b3ed;}
.session-manual-status--in-progress{background:rgba(246,173,85,.18);border-color:rgba(246,173,85,.35);color:#f6ad55;}
.session-manual-status--done{background:rgba(72,187,120,.18);border-color:rgba(72,187,120,.35);color:#48bb78;}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge colors hardcoded, not theme-variable-backed

The PR description says the badge "uses theme variables so it adapts to light/dark and skins," but the actual CSS rules use hardcoded hex/RGBA values (#63b3ed, rgba(99,179,237,.18), etc.) rather than var(--blue), var(--amber), or var(--green) custom properties. On light-background skins the fixed text colors (e.g. #63b3ed on near-white) may not meet contrast expectations, and custom palettes will ignore the intent entirely. The semi-transparent overlay partially mitigates this but doesn't substitute for the stated claim.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread static/sessions.js
Comment on lines +373 to +383
function setSessionManualStatus(sid, status) {
if (!sid) return;
const map = _getSessionManualStatuses();
if (status && _SESSION_STATUS_VALUES.includes(status)) {
map[sid] = status;
} else {
delete map[sid];
}
try { localStorage.setItem(SESSION_MANUAL_STATUS_KEY, JSON.stringify(map)); } catch (_e) {}
renderSessionListFromCache();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Manual-status entries are not pruned when a session is deleted

setSessionManualStatus writes to hermes-session-manual-status in localStorage, but deleteSession (line 5354) only calls _clearHandoffStorageForSession — it doesn't remove the entry for the deleted sid. Sessions that are deleted accumulate stale entries in this map indefinitely. Adding setSessionManualStatus(sid, null) inside deleteSession (mirroring how _clearSessionCompletionUnread / _clearSessionViewedCount are called elsewhere on session transitions) would keep the map bounded.

@nesquena-hermes
nesquena-hermes merged commit 9883486 into master Jun 6, 2026
20 of 21 checks passed
@nesquena-hermes
nesquena-hermes deleted the release/stage-w4 branch June 6, 2026 00:48
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
…on-sessions toggle nesquena#3570 nesquena#3514) (nesquena#3692)

* feat(sidebar): add show_cron_sessions toggle to surface cron sessions (nesquena#3514, nesquena#2841)

Co-authored-by: Rod Boev <rod.boev@gmail.com>

* feat(sidebar): add manual session status labels (nesquena#3570)

Co-authored-by: Rod Boev <rod.boev@gmail.com>

* docs(changelog): v0.51.284 — Release IZ (stage-w4)

* fix(settings): persist show_cron_sessions in the explicit Save Settings path too (nesquena#3514)

Codex regression-gate follow-up: the autosave path (_preferencesPayloadFromUi)
included show_cron_sessions but the explicit saveSettings() button path read/saved
show_cli_sessions and dropped the cron checkbox — clicking Save Settings silently
omitted it. Read settingsShowCronSessions + add body.show_cron_sessions (gated on
CLI sessions, mirroring autosave).

* fix(settings): gate show_cron_sessions identically in BOTH save paths (nesquena#3514)

Codex round-2: my saveSettings() gate exposed that the autosave path
(_preferencesPayloadFromUi) posted the raw cron checkbox state ungated, so
show_cli_sessions=false + show_cron_sessions=true could persist via autosave.
Gate autosave on showCliCb too; update the regression test to assert both
paths gate on settingsShowCliSessions.

---------

Co-authored-by: nesquena-hermes <[email protected]>
Co-authored-by: Rod Boev <rod.boev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: show cron job output as sessions in the WebUI sidebar

1 participant