-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Release v0.51.284 — Release IZ (stage-w4 — sidebar status labels + cron-sessions toggle #3570 #3514) #3692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release v0.51.284 — Release IZ (stage-w4 — sidebar status labels + cron-sessions toggle #3570 #3514) #3692
Changes from all commits
f9ab618
def95cd
513b318
d9e0a78
79429a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3870,6 +3870,13 @@ main.main > #mainPlugin{display:none;} | |
| the row's gap:6px handles spacing, no margin/vertical-align needed. */ | ||
| .session-project-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0;display:inline-block;} | ||
|
|
||
| /* Manual session status badge */ | ||
| .session-manual-status{display:inline-flex;align-items:center;padding:1px 6px;border-radius:999px;font-size:9px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;flex-shrink:0;cursor:pointer;line-height:1.6;border:1px solid transparent;transition:opacity .12s;} | ||
| .session-manual-status:hover{opacity:.75;} | ||
| .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;} | ||
|
Comment on lines
+3876
to
+3878
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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 ( 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! |
||
|
|
||
| /* ── Code copy button ── */ | ||
| .code-copy-btn{background:var(--hover-bg);border:1px solid var(--border2);border-radius:4px;color:var(--muted);font-size:11px;cursor:pointer;padding:2px 6px;transition:all .15s;line-height:1.3;} | ||
| .code-copy-btn:hover{background:rgba(255,255,255,.12);color:var(--text);} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| """Tests for #2841: show_cron_sessions toggle to surface cron sessions in the sidebar.""" | ||
| import pathlib | ||
|
|
||
| from api.models import _hide_from_default_sidebar | ||
|
|
||
| ROOT = pathlib.Path(__file__).parent.parent | ||
|
|
||
|
|
||
| def _read(rel): | ||
| return (ROOT / rel).read_text(encoding="utf-8") | ||
|
|
||
|
|
||
| # --- _hide_from_default_sidebar behaviour --- | ||
|
|
||
| def test_cron_hidden_by_default(): | ||
| assert _hide_from_default_sidebar({'source_tag': 'cron', 'session_id': 'cron_abc'}) is True | ||
|
|
||
|
|
||
| def test_cron_visible_when_show_cron_true(): | ||
| assert _hide_from_default_sidebar({'source_tag': 'cron', 'session_id': 'cron_abc'}, show_cron=True) is False | ||
|
|
||
|
|
||
| def test_pre_compression_always_hidden_regardless_of_show_cron(): | ||
| assert _hide_from_default_sidebar({'pre_compression_snapshot': True}, show_cron=True) is True | ||
|
|
||
|
|
||
| def test_cron_hidden_with_explicit_false(): | ||
| assert _hide_from_default_sidebar({'source_tag': 'cron', 'session_id': 'cron_abc'}, show_cron=False) is True | ||
|
|
||
|
|
||
| # --- api/config.py string-scan --- | ||
|
|
||
| def test_show_cron_sessions_in_defaults(): | ||
| src = _read("api/config.py") | ||
| assert '"show_cron_sessions": False' in src, ( | ||
| '"show_cron_sessions": False must appear in _SETTINGS_DEFAULTS' | ||
| ) | ||
|
|
||
|
|
||
| def test_show_cron_sessions_in_bool_keys(): | ||
| src = _read("api/config.py") | ||
| assert '"show_cron_sessions"' in src, ( | ||
| '"show_cron_sessions" must appear in _SETTINGS_BOOL_KEYS' | ||
| ) | ||
| # Verify it appears at least twice: once in _SETTINGS_DEFAULTS, once in _SETTINGS_BOOL_KEYS | ||
| assert src.count('"show_cron_sessions"') >= 2, ( | ||
| '"show_cron_sessions" must appear in both _SETTINGS_DEFAULTS and _SETTINGS_BOOL_KEYS' | ||
| ) | ||
|
|
||
|
|
||
| # --- api/routes.py string-scan --- | ||
|
|
||
| def test_show_cron_sessions_kwarg_passthrough(): | ||
| src = _read("api/routes.py") | ||
| assert "show_cron_sessions=show_cron_sessions" in src, ( | ||
| "show_cron_sessions kwarg must be forwarded at the _dedupe_cli_sidebar_sessions_for_api call site" | ||
| ) | ||
|
|
||
|
|
||
| # --- static/index.html string-scan --- | ||
|
|
||
| def test_settings_show_cron_sessions_in_html(): | ||
| src = _read("static/index.html") | ||
| assert "settingsShowCronSessions" in src, ( | ||
| "settingsShowCronSessions checkbox must appear in static/index.html" | ||
| ) | ||
|
|
||
|
|
||
| # --- static/panels.js string-scans --- | ||
|
|
||
| def test_panels_save_wiring(): | ||
| src = _read("static/panels.js") | ||
| # Both save paths (autosave _preferencesPayloadFromUi + explicit saveSettings) | ||
| # must gate cron sessions on the CLI-sessions checkbox so neither can persist | ||
| # show_cron_sessions=true while show_cli_sessions=false (#3514). | ||
| assert "payload.show_cron_sessions=!!(showCliCb&&showCliCb.checked&&showCronCb.checked)" in src, ( | ||
| "autosave wiring must gate show_cron_sessions on settingsShowCliSessions in static/panels.js" | ||
| ) | ||
| assert "body.show_cron_sessions=showCliSessions&&showCronSessions" in src, ( | ||
| "explicit saveSettings() must gate show_cron_sessions on showCliSessions in static/panels.js" | ||
| ) | ||
|
|
||
|
|
||
| def test_panels_load_wiring(): | ||
| src = _read("static/panels.js") | ||
| assert "show_cron_sessions" in src, ( | ||
| "load wiring for show_cron_sessions must appear in static/panels.js" | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setSessionManualStatuswrites tohermes-session-manual-statusin localStorage, butdeleteSession(line 5354) only calls_clearHandoffStorageForSession— it doesn't remove the entry for the deletedsid. Sessions that are deleted accumulate stale entries in this map indefinitely. AddingsetSessionManualStatus(sid, null)insidedeleteSession(mirroring how_clearSessionCompletionUnread/_clearSessionViewedCountare called elsewhere on session transitions) would keep the map bounded.