Skip to content

fix(ui): remove duplicate Usage heading - #81950

Merged
BunsDev merged 1 commit into
mainfrom
meow/control-ui-usage-heading
May 15, 2026
Merged

BunsDev merged 1 commit into
mainfrom
meow/control-ui-usage-heading

Conversation

@BunsDev

@BunsDev BunsDev commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the local Usage view title/subtitle block so the shared Control UI shell header is the only page-level Usage heading.
  • Delete the now-dead Usage header CSS and remove the obsolete usage.page.subtitle key through pnpm ui:i18n:sync so generated locale metadata stays aligned.
  • Add a focused jsdom render regression test that prevents the inner Usage page header from coming back.

Fixes #45709.
Supersedes #67290 and #74238.

Verification

Behavior addressed: Control UI Usage no longer renders both the shared tab header and a second local Usage page header.
Real environment tested: Local macOS workspace, Node/pnpm repo environment, jsdom render tests and repo i18n sync/check.
Exact steps or command run after this patch:

  • pnpm install (only after Vitest wrapper reported missing vitest/package.json)
  • node scripts/run-vitest.mjs ui/src/ui/views/usage.test.ts ui/src/ui/views/usage-render-overview.test.ts ui/src/styles/usage.test.ts ui/src/i18n/test/translate.test.ts
  • pnpm ui:i18n:sync
  • pnpm ui:i18n:check
  • pnpm exec oxfmt --check --threads=1 CHANGELOG.md ui/src/styles/usage.css ui/src/ui/views/usage.ts ui/src/ui/views/usage.test.ts ui/src/i18n/locales/*.ts
  • git diff --check
    Evidence after fix: renderUsage now starts with the existing filter header card; rg finds no remaining usage.page.subtitle, usage-page-header, usage-page-title, or usage-page-subtitle production references.
    Observed result after fix: Focused Vitest passed 4 files / 15 tests; i18n check reported all 18 locales clean; oxfmt and whitespace checks passed.
    What was not tested: A live browser screenshot was not captured. Broad pnpm check:changed was attempted through node scripts/crabbox-wrapper.mjs run --shell -- "pnpm check:changed", but Crabbox default AWS credentials were unavailable; retrying with -provider blacksmith-testbox failed because .github/workflows/crabbox-hydrate.yml has no Testbox step.

Related Triage

@clawsweeper

clawsweeper Bot commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Summary
The PR removes the local Usage view title/subtitle block, deletes its CSS and obsolete i18n key across generated locale metadata, adds a focused render regression test, and updates the changelog.

Reproducibility: yes. Current main has a source-reproducible path where the app shell renders the Usage title/subtitle and renderUsage renders a second local usage-page-header with its own title/subtitle.

Real behavior proof
Not applicable: The contributor proof gate does not apply because this is a MEMBER-authored, maintainer-labeled PR; the body reports focused jsdom, i18n, format, and whitespace checks but no live browser screenshot.

Next step before merge
Protected maintainer-labeled work should proceed through ordinary maintainer review and check gating; there is no narrow automated repair finding to hand off.

Security
Cleared: The diff is limited to Control UI rendering, CSS, generated locale metadata, a focused test, and changelog text with no concrete security or supply-chain concern.

Review details

Best possible solution:

Land the focused Usage-only cleanup after normal maintainer review and required CI pass, keeping broader header redesigns separate.

Do we have a high-confidence way to reproduce the issue?

Yes. Current main has a source-reproducible path where the app shell renders the Usage title/subtitle and renderUsage renders a second local usage-page-header with its own title/subtitle.

Is this the best way to solve the issue?

Yes. Removing the local Usage-only header, dead CSS, and obsolete i18n key is the narrowest maintainable fix while preserving the shared shell header and other page-specific context.

What I checked:

  • Current main duplicate local Usage header: Current main renders a local Usage page header with tabs.usage and usage.page.subtitle inside renderUsage, creating a second page-level heading source. (ui/src/ui/views/usage.ts:424, 63d72e219176)
  • Current main shared shell header: Current main also renders the shared content header for non-config tabs with titleForTab and subtitleForTab, so the Usage tab already has a shell-owned title/subtitle. (ui/src/ui/app-render.ts:1625, 63d72e219176)
  • Shared Usage title/subtitle source: titleForTab/subtitleForTab resolve tabs.usage and subtitles.usage, with the English Usage subtitle defined as API usage and costs. (ui/src/ui/navigation.ts:203, 63d72e219176)
  • PR removes only the local Usage heading block: The current PR head deletes the usage-page-header block from renderUsage, leaving the shared shell header as the page-level heading source. (ui/src/ui/views/usage.ts:421, 8aa9bd1bffd4)
  • PR head cleanup check: At the current PR head, the removed Usage header selectors and usage.page.subtitle production reference are absent from the Usage view and CSS, while usage-header remains. (ui/src/ui/views/usage.ts:424, 8aa9bd1bffd4)
  • i18n generated-output contract: The scoped UI guide says English is the source of truth and non-English locale bundles plus .i18n metadata are generated output, matching this PR's en.ts deletion plus regenerated locale metadata. (ui/AGENTS.md:5, 63d72e219176)

Likely related people:

  • BunsDev: GitHub path history shows repeated merged work on Usage rendering, Usage CSS, Control UI app rendering, and i18n-adjacent UI changes in the same surface this PR edits. (role: Usage UI area contributor; confidence: high; commits: d12c92c216ab, c722ae6a65f0, a710366e9ece; files: ui/src/ui/views/usage.ts, ui/src/styles/usage.css, ui/src/ui/app-render.ts)
  • Marvinthebored: Recent durable transcript aggregate-cache work touched the same Usage view and Usage CSS surface, making this person relevant for conflicts in Usage rendering assumptions. (role: recent adjacent Usage contributor; confidence: medium; commits: a64b30705fab; files: ui/src/ui/views/usage.ts, ui/src/styles/usage.css)
  • steipete: Recent Control UI formatting and adjacent render/header history touched app-render and Usage-related UI files, useful if shell header behavior needs follow-up. (role: recent adjacent Control UI contributor; confidence: medium; commits: 4505987b9c8b, cb088c81601e, 833636f0b239; files: ui/src/ui/app-render.ts, ui/src/ui/views/usage.ts, ui/src/ui/components/dashboard-header.ts)
  • vincentkoc: Local current-main blame and prior related review context point to recent work around Control UI locale alignment and i18n parity, which defines the generated-output contract this PR follows. (role: i18n pipeline contributor; confidence: medium; commits: 297f4c6e603b, 139815d6a9c0, 1ef6bada3650; files: ui/src/i18n/locales/en.ts, ui/src/i18n/test/translate.test.ts, scripts/control-ui-i18n.ts)

Remaining risk / open question:

  • No live browser or Playwright screenshot was captured in this read-only review; visual confidence is based on source inspection and the PR body's reported focused checks.
  • A check-run snapshot for the current head still had queued jobs, so merge should wait for the required checks to settle.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 63d72e219176.

@BunsDev
BunsDev force-pushed the meow/control-ui-usage-heading branch from 310b2f5 to 8aa9bd1 Compare May 14, 2026 23:51
@BunsDev
BunsDev force-pushed the meow/control-ui-usage-heading branch from 8aa9bd1 to f60e501 Compare May 15, 2026 01:44
@BunsDev

BunsDev commented May 15, 2026

Copy link
Copy Markdown
Contributor Author

Landing proof for exact head f60e501a073034be295e4dcdd31069459baaf8e5.

Local verification:

  • node scripts/run-vitest.mjs ui/src/ui/views/usage.test.ts ui/src/ui/views/usage-render-overview.test.ts ui/src/styles/usage.test.ts ui/src/i18n/test/translate.test.ts passed 4 files / 15 tests.
  • pnpm lint --threads=8 passed.
  • pnpm ui:i18n:check passed; all 18 locales clean.
  • pnpm exec oxfmt --check --threads=1 CHANGELOG.md ui/src/styles/usage.css ui/src/ui/views/usage.ts ui/src/ui/views/usage.test.ts ui/src/i18n/locales/*.ts passed.
  • git diff --check passed.
  • node scripts/run-vitest.mjs src/logging/logger-redaction-behavior.test.ts passed 1 file / 10 tests after a transient unrelated CI shard failure.
  • Commit signature verified locally with git log -1 --show-signature --oneline.

GitHub verification:

  • CI run 25895690773 passed after rerunning failed jobs, including check-lint, check-prod-types, check-test-types, check-additional*, checks-fast*, checks-node-core-ui, checks-node-core-runtime-infra-process, checks-node-core, build-artifacts, security/preflight, and dependency checks.
  • Real behavior proof run 25895689499 passed.
  • mergeStateStatus: CLEAN, mergeable: MERGEABLE at merge gate.

Known proof gaps:

  • No manual browser screenshot was captured for this small render cleanup; behavior is covered by focused render/CSS/i18n tests and full GitHub CI.

@BunsDev
BunsDev merged commit 346a773 into main May 15, 2026
163 of 165 checks passed
@BunsDev
BunsDev deleted the meow/control-ui-usage-heading branch May 15, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Usage header is doubled (v2 UI)

1 participant