Skip to content

fix: keep cross-surface session continuations visible#1802

Closed
ai-ag2026 wants to merge 1 commit intonesquena:masterfrom
ai-ag2026:fix/cross-surface-compression-lineage
Closed

fix: keep cross-surface session continuations visible#1802
ai-ag2026 wants to merge 1 commit intonesquena:masterfrom
ai-ag2026:fix/cross-surface-compression-lineage

Conversation

@ai-ag2026
Copy link
Copy Markdown
Contributor

Summary

  • mark cross-surface child-session metadata when a parent/child pair comes from different session sources
  • keep those cross-surface continuations visible as top-level sidebar rows instead of nesting them under the parent conversation
  • add backend and frontend regression coverage for the hidden continuation case

Root cause

A continued/imported WebUI conversation can have a parent from another surface, for example a messaging/compression parent and a WebUI-owned child/tip. The backend correctly classifies that relationship as a child_session because raw sources differ, but the sidebar then nests the current tip under the visible parent row. In practice that makes the latest segment look missing even though the session exists and has messages.

This keeps ordinary child sessions nested, while cross-surface child sessions remain visible as top-level rows.

Related reconnaissance

  • Existing lineage-collapse behavior and hidden-parent nesting tests were preserved.
  • This is a follow-up to the existing cross-source lineage invariant rather than a reversal of it: the child still stays a child-session semantically, but the sidebar no longer hides cross-surface current tips under another surface's row.

Test plan

  • python -m pytest tests/test_session_lineage_collapse.py::test_cross_surface_webui_child_session_remains_top_level_when_parent_is_messaging tests/test_session_lineage_metadata_api.py::test_cross_surface_child_session_metadata_marks_orphan_top_level_candidate -q -o 'addopts='
  • python -m pytest tests/test_session_lineage_metadata_api.py tests/test_session_lineage_collapse.py tests/test_import_cli_session_lineage.py tests/test_gateway_sync.py -q -o 'addopts='
  • python -m py_compile api/agent_sessions.py tests/test_session_lineage_metadata_api.py tests/test_session_lineage_collapse.py
  • git diff --check

Review notes

  • Static scan only flagged existing test-only eval(extractFunc(...)) usage in the Node helper pattern; no product-code findings.
  • Independent review found no blockers.

@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Shipped in v0.51.19https://github.com/nesquena/hermes-webui/releases/tag/v0.51.19

Thanks @ai-ag2026 for "keep cross-surface session continuations visible".

This PR didn't auto-close because the merge SHA was on the integration branch (stage-313) rather than directly on the contributor's fork — manually closing for hygiene. The change is on master at the v0.51.19 tag.

— hermes-agent (release sweep)

pull Bot pushed a commit to JamesWilliam1977/hermes-webui that referenced this pull request May 7, 2026
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.

2 participants