gut(ui): strip session-cost i18n + msg-meta CSS orphans — #2529 audit#2552
Merged
alexey-pelykh merged 1 commit intomainfrom Apr 24, 2026
Merged
gut(ui): strip session-cost i18n + msg-meta CSS orphans — #2529 audit#2552alexey-pelykh merged 1 commit intomainfrom
alexey-pelykh merged 1 commit intomainfrom
Conversation
Post-#2332 session-cost-analytics gut missed: - `tabs.usage` + `subtitles.usage` i18n keys in 5 non-English locales (de, es, pt-BR, zh-CN, zh-TW). English locale was cleaned correctly; non-English locales were not. No call site reads these keys. - `.msg-meta*` CSS rules (`.msg-meta`, `.msg-meta__tokens`, `.msg-meta__cache`, `.msg-meta__cost`, `.msg-meta__ctx`, `.msg-meta__ctx--warn`, `.msg-meta__ctx--danger`, `.msg-meta__model`) in `styles/chat/grouped.css`. Comment reads "Message metadata (tokens, cost, model, context %)" — same gutted feature. Zero TS/TSX references anywhere in the repo. Part of the #2529 re-audit of prior gut areas. Findings F2 (fallback UI dead wiring) and F3 (default agent badge) tracked separately as #2549 and #2550 — non-trivial and warrant their own review. CSS class count: 728 → 720 (matches the 8 removed msg-meta* rules). Browser smoke + computed-style tests pass (12/12). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Closes #2529. Re-audit of 5 prior gut areas for lingering UI remnants in
ui/src/. Inline fix for trivial session-cost orphans (i18n + CSS, same precedent as #2536). Non-trivial findings filed as follow-ups (#2549, #2550).Audit matrix
Findings
F1 — Session-cost i18n keys missed in 5 non-English locales (FIXED)
The
ui/src/i18n/locales/en.tslocale was cleaned by #2332 but the 5 non-English locales (de,es,pt-BR,zh-CN,zh-TW) retainedtabs.usage+subtitles.usageentries. No call site reads these keys — grep-clean after removal.F2 — Model-fallback UI dead wiring (→ #2549)
FallbackStatus,handleLifecycleFallbackEvent,renderFallbackIndicator,FallbackIndicatorStatus,parseFallbackAttempts,FALLBACK_TOAST_DURATION_MS, plus.compaction-indicator--fallback*CSS — all remain inui/src/despite #2130 claiming removal. The backend stub atsrc/auto-reply/fallback-state.ts:9returns{}, so the guarded emit branches inagent-runner.ts:587,616never fire — confirming dead wiring. ~300 LOC cleanup; filed separately for reviewable scope.F3 — "default" agent pill badge (→ #2550)
agentBadgeTextatui/src/ui/views/agents-utils.ts:104-106still returns"default"pill in the agents list, contradicting #2286's explicit "no special default marker" intent. BackenddefaultIdfield is LIVE (agent pre-selection), only the visual badge is vestigial. Judgment call on whether to preserve as UX cue; filed separately.F4 — contextTokens (grep-clean)
Terms searched:
contextTokens,DEFAULT_CONTEXT_TOKENS,lookupContextTokens,resolveContextTokens,contextTokensUsed,remainingTokens,percentUsed,200k. No matches inui/src/.F5 — LLM provider code (grep-clean)
Terms searched:
ollama-stream,Ollama,minimax-portal,qwen-portal,model-auth-markers,provider-auth-result. No matches inui/src/.F6 — Session-cost
.msg-meta*CSS orphans (FIXED)Discovered during secondary sweep. The CSS block in
styles/chat/grouped.cssdefined under comment"Message metadata (tokens, cost, model, context %)"— the per-message cost display — had zero TS/TSX references anywhere in the repo. 8 CSS rules removed (class count: 728 -> 720). Same gut area as F1 (#2307/#2332).Changes
ui/src/i18n/locales/{de,es,pt-BR,zh-CN,zh-TW}.ts— removetabs.usage+subtitles.usage(F1)ui/src/styles/chat/grouped.css— remove.msg-meta*block (F6)Test plan
pnpm check(format + tsgo + lint + lint:tmp:no-random-messaging + lint:no-remoteclaw-ai + lint:ui:no-css-class-drift) — PASSpnpm test:ui:smoke(app.smoke + app.computed-style) — 12/12 PASSgrep -rn 'tabs\.usage\|subtitles\.usage' ui/src/— no matchesgrep -rn 'msg-meta' .(excluding node_modules, .tmp, .git) — no matchesRelated