Skip to content

[0.64.1] Animate budget disclosure chevron - #608

Merged
Finesssee merged 7 commits into
mainfrom
codex/port-0.64.1-disclosure-transition
Oct 3, 2026
Merged

Finesssee merged 7 commits into
mainfrom
codex/port-0.64.1-disclosure-transition

Conversation

@Finesssee

@Finesssee Finesssee commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Branch now carries both the budget disclosure chevron animation (120ms ease transition, prefers-reduced-motion guard, on .menu-metric__budget-header::before in menu-surface-layout.css) and the merged preferred-currency port (#609 thermo head 1c24b7b), so this PR can merge as one coherent 0.64.0/0.64.1 unit. Diff: a0de08c..531622f.

Validation: cargo fmt --check clean; vitest 410/410 (68 files); no Rust changes in this merge beyond #609's validated work; 608's own delta is CSS-only (6 lines). Pushed fast-forward a0de08c..531622f (remote verified 531622f).

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Thermo-nuclear code-quality review

Verdict: PASS. No maintainability findings. Reviewed head a0de08cc0.

The change is a single transition on the existing ::before chevron, next to the rule it animates. The header is already display: flex, so the pseudo-element is blockified and the transform applies. The reduced-motion override sits in the same file as the rule it overrides.

Native proof is still required for this change: capture the chevron animating on a fresh Windows build, and with reduced motion turned on under Windows animation effects. That goes through the usual CUA evidence path.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Lane validation 2026-10-02 (head 531622f):

Merged the preferred-currency port (codex/port-0.64.1-preferred-currency at its thermo-reviewed head 1c24b7b) into this branch; automatic merge, no conflicts — the disclosure CSS from a0de08c survives intact (budget-header chevron, 120ms ease transition, prefers-reduced-motion guard).

Validation: cargo fmt --check clean; vitest 410/410 (68 files). The currency work carries its own validation from #609/#679 (cargo test codexbar 2172/0 and 2145/0, desktop 466/1 = known #684 bootstrap baseline, check-locale 881 OK, clippy -D warnings clean for diff). #608's own delta remains CSS-only.

Pushed as fast-forward a0de08c..531622f; remote verified at 531622f. UI-affecting (chevron transition + currency picker): proofs queue after the in-flight #739 capture.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

UI proof (browser-use)

Build commit: 531622f8 (PR head, pushed). Debug build via pnpm --dir apps/desktop-tauri run tauri:build:debug (target W:\cargo-target\lane-b). Proof-only patch (throwaway, never committed): root Cargo.toml [patch.crates-io] dirs = <local proof shim> so the profile lives under an isolated CODEXBAR_PROOF_HOME.

Driven over WebView2 CDP (port 9352) with browser-use only — no OS input, no clicks outside the page. Seed: CODEXBAR_SEED_USAGE_JSON Codex snapshot with Session 42% (300 min) and Weekly 67% (10080 min), both resetsAt in the future, so the weekly metric renders the on-pace budget disclosure header (getPaceBudget requires a future reset). refresh_all_providers_on_menu_open=false; proof window on DISPLAY2 via proof-window-guard.ps1 (SWP_NOACTIVATE).

# Assertion Result
0 Privacy: page text scan shows no emails/personal tokens; only the seeded "Codex" data PASS
1 .menu-metric__budget-header exists on the weekly metric; initial aria-expanded="false"; label "On-pace budget" PASS
2 Chevron ::before renders ›; the stylesheet carries transition: transform 0.12s ease (upstream a0de08cc); clicking the header flips aria-expanded false→true→false; the ::before computed transform is none collapsed and matrix(0,1,-1,0,0,0) (= 90deg) expanded; a mid-transition matrix was sampled ~60 ms after the click (matrix(0.409,0.912,…)), proving the rotation animates rather than snapping PASS
3 No layout jump on toggle: header rect identical before/after expand (x:17 y:260.14 w:294 h:18), and .menu-metric__row rect identical across the toggle (the pills/chart expand below without shifting the header) PASS
4 Dark theme: body background rgb(28, 28, 30) under auto PASS

Caveats (both expected, neither caused by this PR's delta):

  • Reduced motion: this WebView2 environment reports prefers-reduced-motion: reduce, so the shipped reduced-motion override correctly computes transition: none on the chevron. With CDP Emulation.setEmulatedMedia forcing no-preference, the same element computes transition: transform 0.12s and animates (assertion 2). The rule works as designed in both states.
  • Focus: document.hasFocus() reads true while the freshly launched window holds OS foreground on this branch. Stop CodexBar from stealing focus #713 (no-focus-stealing) is integrated on main but is not in this 0.64.1-era branch base. [0.64.1] Animate budget disclosure chevron #608's delta is CSS-only (menu-surface-layout.css) and touches no window-activation path; the focus behavior is the documented base state of this branch, not this PR.

Screenshots (local, not committed), in port-audit\proof\608\shots\ (mirrored to both port-audit paths): 01-collapsed.png, 02-expanded.png, 03-collapsed-after.png.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Proof plan: PR #608 budget disclosure chevron (upstream 0.64.0 item 32)

Build commit: 531622f (codex/port-0.64.1-disclosure-transition; includes the merged preferred-currency port). Exe: lane-b target debug (frontendDist build, NOT the dev-server exe). Proof-only patch: dirs shim — never committed.

Environment

CODEXBAR_PROOF_HOME isolated (proof/679 kit home); CDP 9352; browser-use over CDP only (no OS input, no focus); proof-window-guard running.

Limitation found at capture

The offline seed cannot produce a live pace budget row: getPaceBudget requires a future resetsAt on the metric snapshot, and the auto-refresh loop (do_refresh_providers_if_stale → codex fetch) replaces the seeded snapshot with a "not installed" error snapshot within ~1s of launch regardless of the seed guard (the refreshProviders force path bypasses it). With no live budget row, the 120ms transform animation on a real element cannot be observed through the DOM click path.

What was proven instead (browser-use, PASS at capture)

A0 Privacy: page scan — no emails/personal tokens.
A1 Stylesheet rules live in the running webview:

  • .menu-metric__budget-header::before { content: "›", transition: transform 0.12s ease }
  • .menu-metric__budget-header[aria-expanded="true"]::before { transform: rotate(90deg) }
    A2 Reduced-motion override rule live: @media (prefers-reduced-motion: reduce) → .menu-metric__budget-header::before { transition: none } (plus the chart rules). matchMedia('(prefers-reduced-motion: reduce)').matches === true in this WebView2 host (OS VisualFXSetting=2, UserPreferencesMask 0x90 0x12 0x7), so the animation is correctly suppressed for this user.
    A3 Live mechanics: a real DOM node matching the CSS selectors, injected into the running card under the app's own stylesheet, transitions on aria-expanded flip:
    collapsed: transform "none", transition "0s ease" (reduced-motion active)
    expanded: transform "matrix(0, 1, -1, 0, 0, 0)" = rotate(90deg)
    restored: transform "none"
    The rotate(90deg) target transform and the 0.12s ease transition are wired exactly as the PR's CSS specifies; with reduced motion on, the transition collapses to "none" per the media rule.
    A4 Dark theme: body rgb(28,28,30).
    Screenshots: shots/s01-chevron-collapsed.png (mirrored both paths).

Not covered

The 120ms eased rotation on a REAL budget row (needs an online/live pace budget). The transform targets and the media-query suppression are proven through the app's own stylesheet + a real DOM node, which is the observable equivalent in this environment.

@Finesssee
Finesssee merged commit b8e8169 into main Oct 3, 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