Headline: USD-account users now see $ instead of ¥ everywhere money is shown in the TUI — wallet balance, turn cost, session cost, top-bar cost label, subagent end-event cost suffix, UsageCard. Pre-fix a USD wallet rendered ¥0.0352 turn · ¥0.461 session · wallet ¥0.91; now it renders $0.0308 turn · $0.064 session · wallet $0.91. Display follows the wallet currency reported by the DeepSeek API, not the UI language. Originally reported in #278 by @Explosion-Scratch.
UI / currency
- fix(ui): USD wallets render
$for wallet balance, turn cost, and session cost. State + event schemas now carrybalanceCurrencythroughApp.tsx → reducer → StatusBarso every render site sees the wallet symbol the API reported. Originally drafted by @wviana in #272; the TUI plumbing throughstate.ts/cards.ts/events.ts/reducer.ts/useScrollback.ts/slash/types.tswas the bulk of the fix. - fix(ui): balance color threshold checks USD against the CNY scale (
$0.91 ≈ ¥6.55) rather than treating0.91as< ¥5 → red. USD wallets now correctly show yellow at low-but-not-empty balances. - fix(ui):
StatsPanel.ChromeRowcost label anduseSubagentend-event cost suffix follow the wallet currency too — pre-fix these always rendered$. (#313) - refactor(ui): seven currency helpers in
theme/tokens.tscollapsed to three:formatBalance,formatCost,balanceColor. Undefined currency defaults to CNY (matches pre-fix unconditional¥). - chore(ui): remove orphan
ChromeBar.tsx(258 lines). The bar users actually see isStatsPanel'sChromeRow. (#314)
Loop
- refactor(loop):
loop.ts1331 → 1219 (−112). Three sibling files undersrc/loop/:messages.ts(pure ChatMessage builders),turn-failure-tracker.ts(per-turn failure count + threshold tipping),force-summary.ts(forced-summary generator behind a small DI context). Continues the #308 / #309 cadence — small per-helper extractions, no behavior change. (#311)
Known follow-up
SessionPicker still hardcodes ¥ for per-session cost in the session-history list, tracked in #312 (good-first-issue).