Skip to content

feat: add collapsible subagent groups and parent family cost totals - #4

Open
lj64212585 wants to merge 5 commits into
itvincent-git:mainfrom
lj64212585:feat/nest-subagent
Open

feat: add collapsible subagent groups and parent family cost totals#4
lj64212585 wants to merge 5 commits into
itvincent-git:mainfrom
lj64212585:feat/nest-subagent

Conversation

@lj64212585

Copy link
Copy Markdown

Motivation

Thank you for adding subagent session grouping to main after #3. This follow-up focuses on two additional behaviors that are important for my workflow:

  1. Collapsible subagent groups. My orchestration setup can sometimes create dozens of subagents under a single parent session. Showing all of them at once makes the session list difficult to scan, so I need each group to be collapsed by default and expandable on demand.

  2. Parent family cost totals. I regularly compare the cost of different orchestration strategies. For that, I need the parent row to show the combined cost of the parent session and all of its descendant subagents, while still keeping the parent session's own cost visible.

What this PR does

  • Makes subagent groups collapsible and collapsed by default.
  • Preserves the parent-child hierarchy when a group is expanded.
  • Shows a separate family-total cost for parent sessions with descendants.
  • Keeps each individual session's own cost visible and unchanged.
  • Preserves the existing session grouping and card behavior from main.

Feedback welcome

I have updated this implementation against the current main and carefully preserved the existing behavior.

If this implementation does not fit the project's direction or has technical issues, I completely understand. The two capabilities described above are the important part for my workflow. I would really appreciate either guidance on how to adjust this PR or, if you prefer, an implementation of these two behaviors in main using an approach that better fits the project.

Validation

  • pnpm test — 7 release tests and 110 Vitest tests passed
  • pnpm typecheck
  • pnpm build
  • cargo test -j 1 — 102 tests passed
image

@itvincent-git

Copy link
Copy Markdown
Owner

Thanks for the detailed PR and for taking the time to keep it up to date with the latest main!

The two behaviors you described make sense to me, especially:

  • Collapsing subagent groups by default to keep large orchestration sessions easier to scan.
  • Showing the combined parent + descendant cost while still keeping the parent session's own cost visible.

I'd like to add these capabilities to the project.

For this one, I'll use the requirements and behavior described in the PR as the reference, but I'll implement them separately in main using an approach that better fits the current UI and session architecture, rather than merging the submitted implementation directly.

Thanks again for clearly describing the use case — it’s very helpful for improving the subagent experience!

@itvincent-git

itvincent-git commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution!

The feature requested in this PR has now been implemented independently and released in v2.7.2. The final implementation takes a different approach, so I didn't directly use the code from this PR.

I really appreciate you raising the idea and taking the time to work on an implementation. Since the functionality is now available in the latest release, I'll close this PR.

Thanks again for contributing to the project!

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