Skip to content

feat(panel): subagent grouping on Sessions list#229

Merged
upsetbit merged 3 commits into
masterfrom
feat/220-subagent-grouping
Jun 7, 2026
Merged

feat(panel): subagent grouping on Sessions list#229
upsetbit merged 3 commits into
masterfrom
feat/220-subagent-grouping

Conversation

@upsetbit

@upsetbit upsetbit commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Renders parent ↔ subagent structure inline in the Sessions list.

  • New `bool top_level_only` on `ListRequest` (proto + server). When set, the listing is restricted to sessions with no parent.
  • Panel adds a "Group subagents" toggle in the filter bar (default ON; URL-persisted via `?group_subagents=off`).
  • Parent rows with subagents get a chevron + child count in a new leading column; clicking reveals indented subdued child rows via Alpine local state.
  • FTS search bypasses grouping — hits may live inside a child.
  • Drive-by: `cloneListRequest` now copies `Agents` + `ProjectMatches` (previously silently dropped on cost-sort).

3 commits, one per layer (proto / server / panel).

Closes #220.

Test plan

  • `just build && ./bin/prosa-panel` with `PROSA_PANEL_DEV_LOGIN=1`.
  • Open `/sessions` — leading column shows chevrons only where a parent has subagents.
  • Click chevron → subagent rows appear indented immediately below the parent.
  • Uncheck "Group subagents" → URL gains `?group_subagents=off`, child sessions appear as top-level rows.
  • Re-check → URL drops the param (or sets `=on`) and grouping returns.
  • FTS search auto-disables grouping for that request (so a hit inside a child isn't hidden).
  • Pagination counts reflect parent-only set when grouping is on.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

upsetbit and others added 3 commits June 7, 2026 14:50
Adds a bool top_level_only flag to ListRequest so callers can restrict
results to sessions whose parent_session_id IS NULL — needed by the
panel's subagent-grouped Sessions view so child rows don't double up as
top-level rows. Additive change; default behavior unchanged.

Refs #220

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When ListRequest.TopLevelOnly is set, restrict the result set to
sessions with parent_session_id IS NULL. Applies to both the page
query and total_count so pagination math reflects the filtered set.

Refs #220

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a "Group subagents" toggle in the filter bar (default ON; off via
?group_subagents=off). When grouped, the listing requests top-level
sessions only and fetches each parent's children via ListChildren,
attaching them to the row view model.

The table renders a chevron + child count in the new leading expand
column for parents with children; clicking expands an indented block
of subdued child rows immediately below the parent via Alpine local
state. Sort/filter rules apply to the parent set; children inherit
position under their parent.

FTS search disables grouping for the request — a search hit may live
inside a child, and hiding children behind a closed parent would mask
the result.

cloneListRequest now also copies Agents and ProjectMatches (existing
narrowing was silently dropped on cost-sort and would have been on the
new top_level_only path too).

Closes #220

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@upsetbit upsetbit merged commit bddb6c7 into master Jun 7, 2026
5 checks passed
@upsetbit upsetbit deleted the feat/220-subagent-grouping branch June 8, 2026 04:41
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.

Sessions: expand parent rows to reveal subagent sessions, with a Group toggle

1 participant