Repository navigation
fix(app): include subagent sessions in desktop session cost - #55052
Merged
Merged
Conversation
Contributor
Author
There was a problem hiding this comment.
Looks sound. Both the tooltip and the Context tab now use the shared data.session.cost helper, so the desktop matches the TUI: a root session counts its known subagent sessions and a child session shows its own cost. I checked the helper and the route's child sync by reading the code. Typecheck for packages/gui-extensions passes, and so does the existing session.cost test in packages/tui. I couldn't run the desktop app here, so before/after screenshots of the tooltip for a session with a subagent would help.
Public API: unchanged.
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.
The desktop context indicator tooltip and the Context tab showed only the current session's own cost, so spend from subagent (child) sessions was missing.
Both now read
data.session.cost(sessionID), the same shared client helper the TUI footer and sidebar use: a root session sums the cost of every known session in its family, and a child session shows its own cost. The session route already syncs direct children (sync(id, { children: true })), so the family is populated when a session opens.Checks:
bun typecheckinpackages/gui-extensions; oxlint clean on both changed files.Requested by: @Brendonovich (Brendan via Slack)
Added by the opencode bot (AI-generated).
Related: #45417, #39740