Skip to content

Reorganize the web UI session list into a TUI-style tree#859

Merged
edwin-zvs merged 3 commits into
mainfrom
webui-session-list
Jul 14, 2026
Merged

Reorganize the web UI session list into a TUI-style tree#859
edwin-zvs merged 3 commits into
mainfrom
webui-session-list

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Problem

The TUI session list is easy to scan — aligned names, right-aligned harness labels, a clear indent ladder for project/session/subagent/fork structure. The web UI, although structurally similar, was much harder to read:

  • Rows were two lines tall (harness label under the name), so the list was tall and noisy.
  • Grouped members indented by only 2px (visually flat); subagents jumped a fixed 40px regardless of parent depth.
  • "N archived" rows didn't line up with the rows they summarize, so it was unclear whether they belonged to the session above or to the group.
  • Forks rendered as flat top-level rows with no lineage marker — unlike the TUI, which nests them under their parent per spec 0081 ("a fork renders as an indented child row under its parent … never as its own top-level row, and a parent row badges its live fork count").
before (dark) after (dark) after (light)
before after dark after light
Phone viewport (390px)

mobile

Structure — orderedItems() now mirrors the TUI's list_items

  • Forks nest under their fork parent, recursively, flat at one child level (a fork of a fork sits at the same indent, matching the TUI convention). The parent badges its live fork count (⑂N). A fork whose parent summary is gone falls back to a top-level row instead of disappearing.
  • A parent's archived forks — any generation — fold into the same "N archived" row as its archived subagents (spec 0081), expanded to reveal each as a selectable row.
  • Group headers show the active member count, like the TUI's ▾ name (n).

Presentation

  • Single-line rows: fixed [disclosure][status] gutter → name → trailing markers (fork count, pin ★, needs-attention ●) → harness label right-aligned in muted small type. Names at one depth share a left edge; a long name truncates before the harness label does.
  • Depth-classed indent ladder (18px/level) so a child's status glyph sits under its parent's name — the same relationship the TUI draws.
  • A fork's ⑂ marker occupies the gutter cell a disclosure triangle would, so fork and subagent names align.
  • Archived rows indent to the depth of the rows they reveal; smaller, fainter type keeps them out of the way.
  • The needs-attention dot moves from before the name to trailing it, matching the TUI (spec 0054: "a blue dot trailing the title") and keeping the name column flush.
  • Compact rows on desktop; taller touch targets on ≤720px viewports.

All row classes/datasets the delegated click handler, drag-reorder, and activity-spinner refresh rely on (.item[data-id], .disclosure.can-toggle[data-parent-id], .archived-row[data-archived-section], .group-header[data-group-id], .state[data-session-id]) are unchanged.

Testing

  • cargo test --workspace: 1,591 tests across 37 binaries, all green (includes web_smoke e2e).
  • Verified live against a running daemon via webui hot-reload: dark/light/matrix themes, disclosure collapse/expand (rows hide/show), archived-row toggle, fork-row selection, phone viewport.

The two pr-media commits exist only to host the screenshots above (added then removed; the pinned raw URLs stay alive via the PR ref).

🤖 Generated with Claude Code

The web UI session list was hard to scan: rows were two lines tall
(harness label under the name), grouped members indented by only 2px,
subagents by a fixed 40px regardless of parent depth, archived rows
did not line up with the rows they summarize, and forks rendered as
flat top-level rows with no lineage marker — unlike the TUI, which
nests them under their parent (spec 0081).

Structure (mirrors the TUI's list):
- Forks nest as child rows under their fork parent, recursively and
  flat at one child level; the parent badges its live fork count (⑂N).
  A fork whose parent summary is gone falls back to top-level instead
  of disappearing.
- A parent's archived forks (any generation) fold into the same
  "N archived" disclosure row as its archived subagents.
- Group headers show the active member count.

Presentation:
- Single-line rows: fixed [disclosure][status] gutter, name, trailing
  markers (fork count, pin star, needs-attention dot), harness label
  right-aligned in muted small type — names on one left edge per depth.
- Depth-classed indent ladder (18px per tree level) so a child's
  status glyph sits under its parent's name, like the TUI.
- A fork's ⑂ marker occupies the gutter cell a disclosure would, so
  fork and subagent names align.
- Archived rows indent to the depth of the rows they reveal.
- Compact rows on desktop; taller touch targets restored on phones.
@edwin-zvs edwin-zvs merged commit 06d239b into main Jul 14, 2026
1 check passed
@edwin-zvs edwin-zvs deleted the webui-session-list branch July 14, 2026 15:48
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.

1 participant