# fix\(web\): respect usage metric in time breakdown · PR \#23835 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/23835)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: open

Source repository: Unavailable fork

Source branch: fix/hourly-usage-metric

Target branch: main

Head commit: 6a08907243e1247d109439195bf031af6cd4131a

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/23835)

[Commits](https://git.cafe/pingdotgg/t3code/pull/23835/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/23835/diffs?format=markdown)

## Description

---

## Problem

On Usage, select Past 24h, choose Hour under Breakdown, and switch from Cost to Tokens. The summary and chart change, but the provider columns and Total still show dollar costs. The same hardcoded cells affect the daily breakdown.

## Change

Use the selected metric for provider and total values in the time breakdown. Show Cost in the trailing column in Tokens mode, and Tokens in Cost mode. Keep the selected grouping and row order.

## Scope and approval

This is a small, focused fix for an obvious bug under the CONTRIBUTING.md exception. It connects the existing metric selector to the existing hourly and daily table. It adds no new capability, setting, or default. Web and desktop share this table; no server, contract, or mobile behavior changes.

## Verification

- `vp run check:changed` passed format, lint, knip, typecheck for two packages, and the focused tests. `usageBreakdown.test.ts` passed all 4 tests, including hourly and daily values, zero-cost usage with tokens, missing providers, and the secondary column.
- In the isolated Windows web preview, selected Hour and switched Cost to Tokens to Cost. At 9 PM, Codex changed from `$1.65` to `5.12M`, Claude Code from `$2.86` to `9.01M`, and Total from `$4.51` to `14.1M`. The final column changed from Tokens to Cost. Hour stayed selected. Switching back restored the cost values.
- The reporter reviewed the Windows x64 build and confirmed it looked good. Three independent code reviewers reported no findings. Mobile was not exercised because its separate UI is unchanged.

Before screenshots are from the original report. After screenshots are from the local preview with a later snapshot of usage data, so the overall totals differ. The Browser panel captures have soft text; the observed table values are recorded above.

### Before

![Cost mode before](https://github.com/Galicius/t3code/releases/download/hourly-metric-evidence-20261022/before-cost.png)

![Tokens mode before still shows provider costs](https://github.com/Galicius/t3code/releases/download/hourly-metric-evidence-20261022/before-tokens.png)

### After

![Cost mode after](https://github.com/Galicius/t3code/releases/download/hourly-metric-evidence-20261022/after-cost.png)

![Tokens mode after shows provider tokens and trailing cost](https://github.com/Galicius/t3code/releases/download/hourly-metric-evidence-20261022/after-tokens.png)

Implemented with GPT-6.1 Sol through the Codex harness in T3 Code.

