Skip to content

fix(codex): polish accounts card overflow and weekly-only tray bar - #264

Merged
Finesssee merged 1 commit into
mainfrom
fix/codex-accounts-ux-polish
Aug 6, 2026
Merged

fix(codex): polish accounts card overflow and weekly-only tray bar#264
Finesssee merged 1 commit into
mainfrom
fix/codex-accounts-ux-polish

Conversation

@Finesssee

@Finesssee Finesssee commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Follow-up CUA proof pass on #260 caught two polish defects found post-merge (screenshots in proof-255260/):

1. Settings accounts card email overflow — at the fixed 720px window, a long account email (e.g. an Apple private-relay alias) in .credential-card__info strong paints OVER the 242px-wide 3-button actions row, and the "No usage data" text wraps word-by-word. Fix (styles.css, scoped to the .codex-accounts-card surface used by CodexAccountsSection):

  • .codex-accounts-card .credential-card__info gets min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap
  • .codex-accounts-card .credential-card__info strong gets max-width: 100% + ellipsis so the title ellipsizes and the buttons stay inside the card
  • .codex-accounts-card .credential-card__actions gets flex-shrink: 0 + nowrap

2. Tray accounts menu bar absent — an account whose backend returns ONLY a weekly window (snapshot primaryWindow: null) rendered no usage bar while everything else worked. CodexAccountsMenu.tsx bar computation now prefers primaryWindow and falls back to the next filled window in canonical order (primary → secondary; the CodexAccountUsageSnapshot bridge type carries no tertiary or extra rate windows). No existing TS fallback pattern to copy — the ambient MenuCard builds independent rows per window; the canonical ordering mirrors the Rust tray metric order in tray_bridge.rs.

Tests (224 → 226):

  • CodexAccountsMenu: renders a 42% bar from a weekly-only snapshot (primaryWindow null / secondaryWindow 42%)
  • CodexAccountsSection: CSS rule assertion of the containment properties. Note: a DOM-level computed-style test is not possible — vitest runs jsdom with css: false, so styles.css is never applied; the test reads the stylesheet and asserts the exact containment rules instead.

Verified: tsc --noEmit, pnpm test (226 passing), pnpm run build.


View with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.

Follow-up CUA proof pass on #260 caught two defects:

1. Settings Codex-accounts card: a long account email paints over the
   3-button actions row at the fixed 720px window and the 'No usage data'
   text wraps word-by-word. Pin the info column with min-width:0 +
   overflow/ellipsis/nowrap, cap the title at max-width:100% so it
   ellipsizes, and lock the actions row with flex-shrink:0 + nowrap.
2. Tray Codex accounts menu: an account whose snapshot only carries a
   weekly window (primaryWindow: null) rendered no usage bar. Fall back
   in canonical order (primary -> secondary; the account-snapshot bridge
   carries no tertiary/extra windows) so weekly-only accounts still
   render a bar.

Tests: CodexAccountsMenu renders a 42% bar from a weekly-only snapshot;
CodexAccountsSection asserts the containment CSS rules are present.
@Finesssee
Finesssee merged commit 7f4f7e2 into main Aug 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant