Skip to content

fix: keep explicit fork sessions out of compression lineage - #2014

Merged
1 commit merged into
nesquena:masterfrom
ai-ag2026:fix/fork-sessions-stay-independent
May 10, 2026
Merged

fix: keep explicit fork sessions out of compression lineage#2014
1 commit merged into
nesquena:masterfrom
ai-ag2026:fix/fork-sessions-stay-independent

Conversation

@ai-ag2026

Copy link
Copy Markdown
Contributor

Summary

  • Mark /api/session/branch sessions with session_source="fork".
  • Keep explicit WebUI forks out of compression-lineage collapse even when their parent row is not currently present in the sidebar list.
  • Add regression coverage for both the backend marker and the sidebar lineage guard.

Root cause

The sidebar lineage collapse uses parent_session_id as a fallback lineage key when no explicit compression lineage metadata is present. That is useful for compression continuations, but explicit WebUI forks also have parent_session_id. When forking from an already forked/filtered session and the immediate parent is not in the current list, the new fork can be treated like a lineage continuation of its parent/root instead of remaining an independently selectable fork row.

Related reconnaissance

  • Searched existing PRs/issues for fork from here fork, fork session fork parent, fork from fork session, and session fork parent.
  • No open duplicate found.

Test plan

  • node --check static/sessions.js
  • python3 -m py_compile api/routes.py
  • uv run --with pytest --with pyyaml python -m pytest tests/test_465_session_branching.py tests/test_v050253_opus_followups.py tests/test_session_lineage_collapse.py -q -o addopts=
  • git diff --check
  • Added-line static scan: 0 findings

Review note

Independent delegate review was unavailable earlier due timeout, so this PR is intentionally narrow and manually reviewed against the scoped diff.

@nesquena-hermes nesquena-hermes closed this pull request by merging all changes into nesquena:master in a42adbe May 10, 2026
pull Bot pushed a commit to soitun/hermes-webui that referenced this pull request May 10, 2026
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
bernyforce pushed a commit to bernyforce/hermes-webui that referenced this pull request Jul 29, 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