feat: load full lineage segments on demand - #2130
Merged
1 commit merged intoMay 12, 2026
Merged
1 commit merged into
1 commit merged into
Conversation
6297443
pull Bot
pushed a commit
to TKaxv-7S/hermes-webui
that referenced
this pull request
May 12, 2026
feat: load full lineage segments on demand
SysAdminDoc
pushed a commit
to SysAdminDoc/hermes-webui
that referenced
this pull request
Jun 26, 2026
feat: load full lineage segments on demand
bernyforce
pushed a commit
to bernyforce/hermes-webui
that referenced
this pull request
Jul 29, 2026
feat: load full lineage segments on demand
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thinking Path
N segmentsfor collapsed compression lineage rows (fix: show collapsed session segment count #1906) and expand client-materialized segments (feat: expand collapsed session lineage segments #1943)._compression_segment_countfrom/api/sessions; the browser may not have the older segment rows materialized, so clicking the badge cannot reveal the full bounded list./api/session/lineage/reportonly when the user expands such a row.What Changed
static/sessions.js./api/sessionsrefresh.GET /api/session/lineage/report?session_id=<tip>only when_sessionSegmentCount(s)exceeds the locally materialized_lineage_segmentscount.segmentsbysession_idwith existing client-materialized segments, skipping the visible tip and anychild_sessionrows.childrenout of the compression-segment list so subagent/fork child semantics remain separate.Visual / Interaction Evidence
Expected network behavior:
/api/sessionspath and does not call/api/session/lineage/report./api/sessionsrefresh.Why It Matters
This completes the read-only lineage ladder without adding prefetch, polling, archive/delete controls, storage migration, or a broader session-management surface. Users can inspect old compression segments when the sidebar only has a count, while the common sidebar polling path remains unchanged.
Verification
python -m pytest tests/test_session_lineage_collapse.py::test_lineage_segment_expansion_static_contract tests/test_session_lineage_collapse.py::test_lineage_report_fetch_is_needed_only_when_backend_count_exceeds_materialized_segments tests/test_session_lineage_collapse.py::test_cached_lineage_report_segments_merge_with_materialized_segments_without_duplicates_or_children -q -o addopts=-> failed with missing cache/helpers/report endpoint wiring.python -m pytest tests/test_session_lineage_collapse.py tests/test_session_lineage_report.py tests/test_session_lineage_metadata_api.py -q -o addopts=->29 passedpython -m py_compile api/agent_sessions.py api/routes.py api/models.pynode --check static/sessions.jsgit diff --checknon_ascii_added_lines=0content-type: image/png.Risks / Follow-ups
Show session lineage indicatorssetting. This PR intentionally does not add a settings surface. If feat: Add toggleable session lineage indicators setting #2072 lands first, this branch should rebase and ensure toggle-off hides the badge/expansion affordance and therefore performs no lazy lineage-report fetch.static/sessions.jsfor manual compression timeout handling; it is a rebase risk but does not overlap this lineage-report contract.Model Used
Prepared with assistance from Hermes Agent using OpenAI Codex
gpt-5.5.