github →

New request

#3224: Sidebar: subgroup forked/branched sessions under their parent (collapsible) + fix out-of-order placement

We'll provision a sandbox, run an agent against the issue, and open a draft PR. You can pull the branch and iterate from there.

Issue
enhancementux

Summary

In the sessions sidebar, forked / /branch-ed conversations are not visually grouped under their parent and appear out of chronological context — a branch created from an old session jumps to the top of the list (sorted by last-activity), detached from the session it came from. Power users with branch-heavy trees find the list cluttered and hard to navigate.

Reported by the OP (u/johnfkngzoidberg) in the r/hermesagent "Best webUI for Hermes?" thread (2026-05-30):

One feature that would be great, is better organization of the chats in the chat tree. You have some icons that show a branch, but the sessions show up out of order. … I'd love to see branches subgrouped under the parent session, and maybe collapsible to keep the tree from getting cluttered.

Current behavior (verified in code)

WebUI already does parent/child grouping for two relationship classes via _sessionLineageKey() in static/sessions.js (~L3173):

  • Compression-lineage segments (_lineage_root_id / pre_compression_snapshot chains) — collapsed into one row.
  • Subagent child sessions (relationship_type==='child_session') — rendered as an expandable session-child-sessions group (_expandedChildSessionKeys).

But forks are explicitly excluded from this grouping:

// static/sessions.js ~L3176
if(s.session_source==='fork') return null;   // forks never get a lineage key

Forked sessions therefore:

  1. Render as flat top-level rows, sorted purely by _sessionTimestampMs(...) descending (sessions.js ~L3864), so a branch off an old conversation surfaces at the very top, far from its parent.
  2. Get only a branch indicator icon (the session-branch-indicator git-branch glyph + parent tooltip, sessions.js ~L4086, shipped via #465) — but no nesting/collapse.

The plumbing for grouping already exists (_child_sessions, _expandedChildSessionKeys, the session-child-sessions renderer at ~L4231). The gap is that forks aren't fed into it.

Proposed direction

Treat session_source==='fork' (and /branch children with a resolvable parent_session_id present in the list) the same way subagent children are already handled:

  • Subgroup forked sessions under their parent row, reusing the existing session-child-sessions expandable renderer.
  • Keep them collapsed by default; toggle via the existing _expandedChildSessionKeys mechanism.
  • Parent row should not be reordered to the top by a child's activity timestamp once grouped (or offer a sort preference).

This is additive to #465 (which only added the indicator icon) and reuses machinery that already ships for subagent children, so the surface-area is contained.

Labels / scope

  • enhancement, ux
  • Power-user feature (branch-heavy trees). Mobile + desktop both affected.

Source: Reddit r/hermesagent thread "Best webUI for Hermes?" — captured during feedback triage. Filed by maintainer.

Assessmentadvisory
feature●● medium90% confidence

Restructures sidebar session grouping to visually nest forked sessions under parents with collapsible UX and corrected chronological placement.

Likely files
  • static/sessions.js
  • static/index.html
  • static/styles.css
  • static/app.js
Create the request

This opens a fresh agent run and a draft PR for issue #3224.

Cancel