trunk-merge/pr-3545/c21d4a42-f716-4be5-ad19-309b244172d9#3553
Closed
trunk-io[bot] wants to merge 6 commits into
Closed
trunk-merge/pr-3545/c21d4a42-f716-4be5-ad19-309b244172d9#3553trunk-io[bot] wants to merge 6 commits into
trunk-io[bot] wants to merge 6 commits into
Conversation
The Claude Agent SDK already reports a per-turn `total_cost_usd`, which flowed into `ContextUsage.cost` but was never rendered. Sum it across turns (each result reports only its own spend, matching how per-turn token usage is already accumulated) and show the running total in the context usage indicator chip and breakdown popover. Codex sessions emit tokens without a cost, so `cost` stays null and the UI hides it. Generated-By: PostHog Code Task-Id: f6d673c3-965e-4598-a4bd-663f2651a5a5
Wrap the cost readout (indicator chip suffix and breakdown popover row) in a feature flag so it can roll out gradually. On in local dev via the import.meta.env.DEV fallback, matching the other UI flags. Generated-By: PostHog Code Task-Id: f6d673c3-965e-4598-a4bd-663f2651a5a5
Gating the cost readout behind useFeatureFlag made the component call useService(FEATURE_FLAGS), which throws in the test's provider-less render. Mock the hook (matching the pattern used across the UI test suite) and add a case covering the cost suffix when the flag is on. Generated-By: PostHog Code Task-Id: f6d673c3-965e-4598-a4bd-663f2651a5a5
Generated-By: PostHog Code Task-Id: f6d673c3-965e-4598-a4bd-663f2651a5a5
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
trunk-io
Bot
deleted the
trunk-merge/pr-3545/c21d4a42-f716-4be5-ad19-309b244172d9
branch
July 17, 2026 20:17
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.
This pull request was created and is being managed by Trunk Merge.
This pull request is based on the main branch at SHA 13f7ab64d904ca163791d8020ba0740b47617108.
See more details here.
When CI completes, this pull request will be closed automatically.
Pull Requests Being Tested
This pull request is testing the changes from pull request 3545.