fix: hide cron agent sessions from sidebar by default#1143
fix: hide cron agent sessions from sidebar by default#1143dso2ng wants to merge 2 commits intonesquena:masterfrom
Conversation
|
Thanks for this PR, @dso2ng! The rationale is solid — cron sessions are background artifacts and shouldn't crowd the interactive sidebar by default. Scope looks well-targeted:
Test results: 29 passed in Alignment with CLI behavior: WebUI now matches Hermes Agent CLI session browsing semantics, which hides cron sessions unless explicitly requested. Good consistency. Potential follow-up: The PR notes that WebUI has no UI-level source filter yet. The Flagging for maintainer review and merge. 🙏 |
|
Thanks for the follow-up commit — good catch extending the fix to cover imported cron sessions too. The original change correctly excluded locally-created cron sessions from the sidebar, but sessions imported via gateway sync also have The addition in |
Merged as v0.50.227. 2634 tests passing, browser QA 21/21 (desktop + mobile). Full attribution below. Thanks to all 12 contributors: @jundev0001 (#1138), @franksong2702 (#1142, #1157, #1162), @dso2ng (#1143), @bergeouss (#1145, #1146, #1156, #1159), @jasonjcwu (#1149), @ccqqlo (#1161), @frap129 (#1165) Two fixes applied during integration and two more by the independent reviewer (@nesquena): - messages.js: per-turn cost delta capture order (#1159) - workspace.py: symlink target blocked-roots check + HOME sanity guard (#1149, #1165) - panels.js: cron unread counter bookkeeping (in-loop increment bug) - tests/test_symlink_cycle_detection.py: register workspace before session/new
Merged as v0.50.227. 2634 tests passing, browser QA 21/21 (desktop + mobile). Full attribution below. Thanks to all 12 contributors: @jundev0001 (nesquena#1138), @franksong2702 (nesquena#1142, nesquena#1157, nesquena#1162), @dso2ng (nesquena#1143), @bergeouss (nesquena#1145, nesquena#1146, nesquena#1156, nesquena#1159), @jasonjcwu (nesquena#1149), @ccqqlo (nesquena#1161), @frap129 (nesquena#1165) Two fixes applied during integration and two more by the independent reviewer (@nesquena): - messages.js: per-turn cost delta capture order (nesquena#1159) - workspace.py: symlink target blocked-roots check + HOME sanity guard (nesquena#1149, nesquena#1165) - panels.js: cron unread counter bookkeeping (in-loop increment bug) - tests/test_symlink_cycle_detection.py: register workspace before session/new
Thinking Path
state.db.What Changed
exclude_sourcesoption toread_importable_agent_session_rows().exclude_sourcesto("cron",)so cron sessions are omitted from the default WebUI sidebar session list.exclude_sources=Noneas an opt-out for callers that need to inspect all agent sessions, including cron runs./api/sessionshiding cron sessions by default while still showing non-cron agent sessions.read_importable_agent_session_rows(..., exclude_sources=None)still being able to return cron sessions.Why It Matters
This keeps the WebUI sidebar focused on user-facing conversations and prevents scheduled/background jobs from crowding out interactive sessions. It also aligns WebUI behavior with Hermes Agent CLI session browsing semantics.
Verification
$HOME/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_gateway_sync.py -qResult:
Risks / Follow-ups
state.dbfor diagnostics.exclude_sources=Noneopt-out gives a backend path for that.Model Used
AI-assisted.