Skip to content

trunk-merge/pr-3545/c21d4a42-f716-4be5-ad19-309b244172d9#3553

Closed
trunk-io[bot] wants to merge 6 commits into
mainfrom
trunk-merge/pr-3545/c21d4a42-f716-4be5-ad19-309b244172d9
Closed

trunk-merge/pr-3545/c21d4a42-f716-4be5-ad19-309b244172d9#3553
trunk-io[bot] wants to merge 6 commits into
mainfrom
trunk-merge/pr-3545/c21d4a42-f716-4be5-ad19-309b244172d9

Conversation

@trunk-io

@trunk-io trunk-io Bot commented Jul 17, 2026

Copy link
Copy Markdown
Trunk Merge Pull Request Banner

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.

gantoine and others added 6 commits July 17, 2026 10:46
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
@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 546466a.

@trunk-io trunk-io Bot closed this Jul 17, 2026
@trunk-io
trunk-io Bot deleted the trunk-merge/pr-3545/c21d4a42-f716-4be5-ad19-309b244172d9 branch July 17, 2026 20:17
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.

1 participant