Repository navigation
#251 — per-theme AA token repair + universal 8-theme AA matrix guard - #273
Conversation
…matrix guard Repair every (theme x token) pair the #264 adversarial verification measured sub-AA, at TOKEN level in templates/partials/tokens.css (the #206 deepening pattern; since #264 the tokens live in one place so the report and explore pages repair simultaneously): - --text-muted deepened on solarized/latte/rosepine/gruvbox, lightened on tokyo (worst-of bg/bg-alt/surface/surface-2/code-header-bg/code-bg now 4.58-5.31); latte/rosepine adopt the established #198/#227 scoped stand-ins (Catppuccin subtext1 #5c5f77, rosepine #5d5780) - --accent / --accent-hover deepened on solarized/latte/rosepine (worst-of bg/bg-alt/surface now 4.55-4.77) - --code-add/rem-sigil per-theme repairs (solarized 2.81 -> 4.61) and .diff-sigil opacity dimming removed (the #227 composited-opacity rule: tokens carry the full painted ratio) - --code-add/rem-word: dark themes' tint alphas lowered, light themes' rem-word hexes lightened (body text on composited word now >= 4.56) - split-view .ds-num cells gain aria-hidden parity with the unified .diff-gutter (decorative positional metadata, the #178 idiom) Guards (tests/headless_toggle.rs): a universal 8-theme AA matrix sweep on the report (9 surfaces x 8 themes, effective alpha-composited backdrops, transitions killed, checkVisibility-asserted, opacity-dimming pin, injected accent-link probe) + the explore dag/tests sweeps extended with the C3 combos (muted-on-bg, accent-nav-on-bg, muted-on-surface-2). RED-proven: with tokens.css reverted the guards fail on exactly the measured C3 matrix pairs; with the repair they pass at >= 4.55. Goldens regenerated via the example-report-check recipes (jaffle-shop, playground, diff-showcase, explore) — only token-value CSS + the sigil/ aria-hidden changes appear, zero structural HTML drift, no path leaks. Closes #251 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 47 minutes and 55 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Ready to review this PR? Stage has broken it down into 5 individual chapters for you: Chapters generated by Stage for commit efd0d50 on Jun 12, 2026 2:58am UTC. |
There was a problem hiding this comment.
Code Review
This pull request implements per-theme WCAG AA contrast ratio repairs (>= 4.5:1) across several themes (Tokyo, Solarized, Gruvbox, Latte, Rose Pine) by adjusting color tokens, removing opacity dimming on diff sigils, and adding accessibility attributes (aria-hidden="true") to split-view line numbers. It also introduces a comprehensive headless browser test sweep to verify these contrast ratios programmatically. The reviewer feedback suggests that when parsing the results of the headless contrast sweep, unexpected or malformed shapes should fail loudly using .expect() instead of being gracefully tolerated with unwrap_or('?').
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
📄 Rendered report previewAll golden examples regenerated cleanly. 🟡 Golden examplesCommitted to
🐶 Live dogfood previewThis PR doesn't touch ▶ Open ↗ opens the report in your browser in one click — The Pages preview may take ~1 min to update after this comment Alternative: GitHub CLI# gh CLI >= 2.63 extracts into ./report-preview-playground/.
gh run download 27391567592 -R breezy-bays-labs/cute-dbt -n report-preview-playground
open report-preview-playground/playground-report.htmlPosted by |
Overnight orchestration wrap-upMerged as What shipped: 22 per-theme token repairs (solarized/latte/rosepine/tokyo/gruvbox/dracula), the #227 composited-opacity removal pinned, split-view aria-hidden parity, and the universal 8-theme × 9-surface AA matrix guard with alpha-composited effective backdrops. RED-proof reproduced the C3 matrix verbatim (24 failing cells with old tokens; worst cell 4.55 after repair). Lineage note: built by a recovery agent after the original builder died on an API error — the WIP guard draft was intact but token repairs had never been written; they were derived fresh and verified against the C3 matrix. 🤖 Generated with Claude Code |
The all-theme 50% accent mix for .ov-tooltip .ov-key lands 3.69:1 on latte's #4c4f69 tooltip fill (WCAG AA floor 4.5:1) — the accent-family dark-fill surface the #273 token matrix never measured. Add the latte-scoped 35% stand-in (the symmetric twin of #233 D4's .ct-key repair; measured 4.76 PASS, 40% still fails at 4.38) and extend the AA guard family with ov_tooltip_ov_key_meets_aa_contrast_on_every_theme: canvas-normalized color-mix fg, alpha-composited effective backdrop, transition kill, checkVisibility hygiene, through the real showOvTip reveal path. RED-proven: the guard fails latte = 3.69 on the unfixed CSS. Goldens regenerated per the example-report-check recipes (the only delta is the new rule); jaffle chrome snapshot re-accepted. Closes #238 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Summary
Repairs every (theme × token) pair the #264 adversarial verification measured below WCAG AA 4.5:1, at token level in
templates/partials/tokens.css(the #206 deepening pattern — since #264 the tokens live in one place, so the report and explore pages repair simultaneously), and ships the universal 8-theme AA contrast-matrix headless guard so this class of regression is caught mechanically, not by audit.Two surgical companions the guard pins:
templates/report.css:.diff-sigil { opacity: 0.9 }removed — composited opacity is not used for text (the polish: latte suppress-chip 4.37 sub-AA + suppressed-row opacity vs AA (design decision) #227 rule); the per-theme sigil tokens now carry the full painted ratio, and the guard fails loudly if any self-or-ancestor opacity returns.templates/interaction.js: split-view.ds-numline-number cells gainaria-hidden="true"parity with the unified.diff-gutter(classified decorative per the design: shared block-diff palette + muted-text surfaces sub-AA on latte/rosepine/solarized (measured) #251 AC either/or — positional metadata duplicated from document order, the feature: design integration PR-2 — engine merge (settings panel, unified/split diffs) + port-forward of post-fork behaviors #178 idiom).Latte/rosepine muted and the latte accent adopt the themes' own deeper steps already established by the #198/#227 scoped stand-ins (Catppuccin subtext1
#5c5f77, latte blue#1a5cdd, rosepine#5d5780). All other shifts are minimal lightness-only moves (hue/saturation kept). Light and Dark are untouched — they already passed everywhere.Before → after AA matrix (measured live in headless Chromium, effective composited backdrops)
--bg+on composited add-row-.code-filename/ badge, worst-of)--bg--bg-alt--bg/--surface-2--bg(degrade/hint copy)--surface-2)--bg--bg--surface-2)--surface-2)Full post-repair sweep: 8 themes × 9 report surfaces = 72 cells, all ≥ 4.55 (plus the extended explore dag/tests sweeps).
The guard
report_aa_token_palette_matrix_on_every_theme(tests/headless_toggle.rs) renders one PR-diff report carrying every #251 surface and, per theme:checkVisibility()on every target (drawers opened first); pins the unified diff layout so the measured sigil/word instances are the painted ones;<a>probe on<body>to exercise the shippeda { color: var(--accent) }chassis rule — the exact combo the C3 matrix measured on the explore nav;.ds-numaria-hidden parity with the unified.diff-gutter.The explore twins (
explore_dag_page_themes_correctly_on_every_theme,explore_tests_page_themes_correctly_on_every_theme) are extended with the C3 combos: muted-on-bg (counts/hint/test-shape), accent-nav-on-bg, and muted-on-surface-2 (the row-count badge — the matrix's worst muted offender, 3.77 on rosepine pre-repair).RED-proof
With ONLY
templates/partials/tokens.cssreverted (git stash push -- templates/partials/tokens.css) and the guard code in place:solarized/accent-link-on-bg = 3.41,solarized/diff-add-sigil = 2.81,rosepine/muted-hint-on-bg = 3.53,latte/row-count-badge-muted = 4.06,tokyo/diff-add-word = 3.27,gruvbox/diff-rem-sigil = 4.36,dracula/diff-add-word = 4.05, …[tests.html] rosepine/row-count-badge-muted-on-surface2 = 3.77,tokyo … = 4.41,gruvbox … = 4.17,[dag.html] solarized/nav-link-on-bg = 3.41, …After
git stash pop: all three guards PASS (worst cell 4.55). The guard demonstrably measures the painted, composited values it claims to.Golden regeneration audit
All four
example-report-checkrows regenerated with the exact ci.yml recipes (jaffle-shop, playground, diff-showcase viareport; explore viaexplore --out-dir), over the merged tree including #272's fixture changes.git diff --text -U0 -- examples/audit: all 349 changed lines are token-value CSS, the #251 comment blocks, the sigil opacity removal, and the.ds-numaria-hidden parity — zero structural HTML drift. Noroot_path/username strings in any regenerated artifact (regenerated from committed synthetic fixtures only).The
render_integrationinsta snapshot was regenerated for the same inlined-CSS/JS changes (same audit, same result).Gates (run directly, all green)
cargo fmt --check✓cargo clippy --all-targets --locked -- -D warnings✓cargo nextest run— 1276 passed ✓cargo test --test bdd— 163 scenarios / 1044 steps passed ✓RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --locked✓cargo deny check✓--ignored: headless_toggle 72/72, headless_zero_egress 10/10 ✓Closes #251
🤖 Generated with Claude Code