feat(panel): subagent grouping on Sessions list#229
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renders parent ↔ subagent structure inline in the Sessions list.
3 commits, one per layer (proto / server / panel).
Closes #220.
Test plan
🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.