Filter low-value CLI agent sessions#1587
Conversation
|
Put it in draft status for now to review session compaction handle. will update soon |
d6c05f9 to
00dbc44
Compare
|
Rebased this PR onto latest Conflict notes:
Verification after rebase: |
00dbc44 to
5c803c4
Compare
|
Rebased #1587 onto latest Rebase note:
Verification:
Note: a first local test attempt with system Python 3.9 failed during collection because current WebUI code uses Python 3.10+ union syntax. The verification above uses the project test venv. |
|
Thanks for the back-to-back rebases against Quick status on what I see on the branch (
Queued for maintainer review on the next pass. No action needed from you right now; the rebase notes give enough context to land cleanly. |
|
Thanks @franksong2702 — this PR is currently in CONFLICTING state against master (a few PRs that touch session-list rendering / messaging-channel projection have shipped since you opened it). Could you rebase onto current If a rebase isn't easy from your side just let me know and I can take it on with |
|
Closed by the v0.51.2 release in PR #1682 (merged at fcc8328, deployed to production). Thanks for the contribution! Live on production: https://github.com/nesquena/hermes-webui/releases/tag/v0.51.2 🚀 |
Thinking Path
Show Agent Sessionsuseful rather than noisy.Refs #1013.
What Changed
messagestable fixtures that do not have arolecolumn, so the CLI projection degrades to message-count based filtering instead of failing the whole list.PR2 Cross-check
This PR is intentionally built on top of the messaging-channel handoff work from #1404. It does not reimplement or weaken that layer:
session_source == "messaging"is explicitly treated as non-CLI.Cli Session. This is now covered bytest_default_title_cli_compression_chain_is_kept_by_lineage.CLI Compression Boundary
WebUI does not try to distinguish whether a CLI continuation came from auto-compression or a manual
/compressaction. At this layer, both are handled through the same Hermes Agentstate.dblineage contract:parent_session_idplusend_reason='compression'orcli_close.When that lineage exists, this PR collapses the chain into one logical sidebar row and points import/navigation at the latest importable tip segment, so the user continues from the current compressed context instead of reopening the stale root segment.
If a future Hermes Agent path creates a compressed continuation without recording that lineage metadata, WebUI cannot infer the chain safely from title/time alone. That would need to be fixed at the Hermes Agent/source-of-truth layer rather than guessed in this sidebar filter.
Why It Matters
Show Agent Sessionsshould not flood the sidebar with old one-off CLI experiments.Verification
python -m py_compile api/agent_sessions.py api/models.py api/routes.py tests/test_gateway_sync.py tests/test_session_lineage_collapse.py tests/test_1466_sidebar_cancel_clarify.py tests/test_cron_session_title.py tests/test_465_session_branching.pynode --check static/sessions.jspytest -q tests/test_gateway_sync.py tests/test_session_lineage_collapse.py tests/test_1466_sidebar_cancel_clarify.py->59 passedpytest -q tests/test_cron_session_title.py tests/test_465_session_branching.py->26 passedgit diff --checkWeixin Session: 1 visibleTelegram Session: 2 visibleCli Session: 3 visibleRisks / Follow-ups
Cli Session; a deterministic derived display-title polish can be a separate follow-up.Model Used
gpt-5.3-codex-sparkworker for the focused implementation pass.