Repository navigation
Agent chat tests: the turn's token count stays quieter than its words - #23996
Conversation
Leo (2026-10-21): "the token font shouldnt be this same color and shit", on nightly 03960f5's "Working for 35s · 679.9K tokens", drawn in one color. #23779 (after that nightly) already draws "· 679.9K tokens" in the theme's tertiary text (--cv-text-dim, --agent-soft) in tabular numerals, on both the bottom live line (Thinking.tsx) and the line over the turn (WorkingFor.tsx). Nothing pinned it. These tests do: the count is its own span, the CSS rule for it uses the tertiary token and no literal color, and in Chromium its color resolves to the theme's tertiary while the words keep the secondary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16030-bf28-7072-b1f6-b83bbd0beacc&host=cosmic-gray
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Tour of |
|
Owned by transcript-parity on cosmic-gray · session |
|
Found 2 test failures on Blacksmith runners: Failures
|
|
Review (subagent, correctness first): SHIP at 87ef29b Tests-only PR. I read it against the production code at this head and at feat-cmux-next, where the
Non-blocking: the browser |
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo-ask: ask-03712a76b0
Leo (2026-10-21), on nightly 03960f5's "Working for 35s · 679.9K tokens": "the token font shouldnt be this same color and shit".
What main already does
#23779 (merged after that nightly) already draws "· 679.9K tokens" in the theme's tertiary text token (
--cv-text-dim, which is--agent-soft, the host'stextTertiary) with tabular numerals. The rule is.cv-worked__count:has(> .cv-worked__tokens)in conversation.css. The line's words, "Working for 35s" or "Thinking", keep the secondary token (--cv-text-muted). The rule covers both lines that show the count: the bottom live line (Thinking.tsx, the default Codex layout) and the line over the turn when that layout is off (WorkingFor.tsx). The finished "Worked for" row shows no tokens, so it needs nothing. Leo's app gets this with the next web OTA or nightly.What this PR adds
No test covered that rule, so a later style pass could undo it without anything failing. This PR adds tests:
test/agent-pane-turn-tokens-muted.test.tsx: for both lines, the count is its own.cv-worked__count > .cv-worked__tokensspan, after the words and outside them. The CSS rule for it usesvar(--cv-text-dim)withtabular-numsand has no literal color..cv-workedkeepsvar(--cv-text-muted).test/agent-pane-turn-tokens-muted-browser.test.tsx(browser lane): loads the real stylesheets in Chromium with a host theme and checks the resolved colors. The words are the theme's secondary color, the count and its "·" are the tertiary, and the count uses tabular numerals.No product code changes.
Before / after
Gallery
agent-pane.transcript/working-tokens(synthetic fixture, Reduce Motion so the line holds still). Before is nightly 03960f5's gallery; after is feat-cmux-next's (this branch draws the same). Resolved colors, dark: words rgb(170,170,170), tokens before rgb(170,170,170), after rgb(136,136,136). Light: words rgb(97,97,97), tokens before rgb(97,97,97), after rgb(127,128,128).The after shots show the Codex layout's bottom line ("Thinking 5m 56s · 2.1M tokens"). The time is also in the tertiary color there, which was already the case before this ask. With that layout off, the line over the turn keeps "Working for 35s" in the secondary color and draws the count in the tertiary color (checked by the browser test).
Changelog
none
Observed / Not run
bun scripts/check-browser-test-lanes.ts(passes),vp fmton the new files, and the gallery screenshots above, with their computed colors read in headless Chromium.bun testis blocked on this Mac (cosmic-gray, no local test runs). The PR's webviews CI runs both files, and the browser file runs in the browser lane.Agent session: cosmic-gray
🤖 Generated with Claude Code