Skip to content

#206 — Solarized tier-high chip contrast: chip-scoped accent override (3.41 → 5.00) - #228

Merged
cmbays merged 1 commit into
mainfrom
polish-206-solarized-chip-contrast
Jun 11, 2026
Merged

cmbays merged 1 commit into
mainfrom
polish-206-solarized-chip-contrast

Conversation

@cmbays

@cmbays cmbays commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Solarized's tier-high chip shipped at 3.41:1 — under the WCAG AA 4.5:1 floor — because the outlined chip renders the theme's verbatim accent (#268bd2) on the finding row's surface (#fdf6e3), and nothing gated that pairing per theme. Following the #203/#198 Latte precedent, this PR deepens the accent for the chips only to the theme's own --accent-hover (#1d6fa8, one-step-darker solarized blue, 5.00:1) via a chip-scoped per-theme token override:

:root[data-theme="solarized"] .tier-chip { --accent: #1d6fa8; }

No chip markup/JS changes, no re-brightening of the theme's pinned AA diff pairs — the verbatim solarized theme block stays untouched. Tier-total (4.99:1) and tier-advisory (4.92:1) already pass on solarized, so --accent is the only token overridden.

WCAG sweep — all 8 themes × 3 tier chips, measured on the TRUE backdrop

Methodology: the chips render inside .finding-row { background: var(--surface) }, so the effective text backdrop is the nearest opaque ancestor background (--surface, not --bg); the self-backed TOTAL chip is judged on its own --control-active-bg fill. Ratios below are measured empirically from resolved computed styles in headless Chromium (post-fix run of the new guard).

theme tier-total tier-high tier-advisory
light 13.79 5.41 5.10
solarized 4.99 5.00 (was 3.41 FAIL) 4.92
latte 4.91 5.13 5.53
rosepine 6.11 5.68 4.56
dark 7.48 7.10 5.86
tokyo 7.50 6.39 5.29
gruvbox 6.09 5.17 5.00
dracula 6.55 5.59 6.08

Every cell ≥ 4.5:1.

Sweep notes

  • Rosé Pine is not a failure — earlier sweep numbers suggesting rosepine chips fail (4.40/3.53) were a wrong-backdrop artifact computed against --bg (#e6d9c9). Rosepine is the one light theme where --bg ≠ --surface; on the true chip backdrop (--surface #fbf6ef) it measures 5.68/4.56 and passes. No change made.
  • Dark-family reference numbers reconciled — the pre-resolved reference table's dark-family outlined-chip cells (high/advisory on dark/tokyo/gruvbox/dracula) were likewise computed against --bg (e.g. dark/high 7.46 on --bg #15171c vs the measured 7.10 on the true --surface #191c22; verified by hand-recomputation, both backdrops reproduce exactly). Every affected cell passes AA comfortably under either backdrop, so the conclusion is unchanged; the table above records the empirical surface-measured values.
  • Latte suppress-chip (4.37:1 on the latte surface) is real but design-entangled — suppress-chips only render on rows deliberately dimmed to opacity 0.72 — and is tracked separately in polish: latte suppress-chip 4.37 sub-AA + suppressed-row opacity vs AA (design decision) #227.

The headless guard (the sweep, mechanically encoded)

New test tier_chips_meet_aa_contrast_on_every_theme in tests/headless_toggle.rs (the existing headless binary — no ci.yml/lefthook changes needed): renders a synthetic findings report, then for each of the 8 [data-theme] packs (set exactly as theme.js applyTheme does) computes the WCAG contrast ratio of every tier chip in evaluated JS from getComputedStyle — text color vs the nearest opaque ancestor background (own fill for tier-total) — and asserts all 24 cells ≥ 4.5:1. Since no live check carries the Advisory tier yet, the sweep injects one advisory chip into a real .finding-summary so the full chip vocabulary is gated. A 9th theme (or any token drift) cannot silently regress chip contrast again.

RED verified on unmodified main: the guard failed with exactly one violation — solarized/high = 3.41 (rgb(38, 139, 210) on rgb(253, 246, 227)). GREEN with the one-line override.

Goldens

The 3 report-mode golden examples (jaffle-shop, playground, diff-showcase) regenerated with the exact example-report-check commands; the explore pages don't embed report.css and are unchanged. The rendered_chrome_jaffle_shop insta snapshot rebaselined. Audited with git diff --text -U0: every delta is exactly the new comment+override block (one identical hunk per file).

Gates (run directly — not via lefthook)

  • cargo fmt --check — clean
  • cargo clippy --all-targets --locked -- -D warnings — exit 0
  • cargo nextest run — 1193 passed
  • cargo test --test bdd — 22 features, 157 scenarios, 1016 steps, all passed (no feature-count change)
  • cargo test --test headless_zero_egress --locked -- --ignored — 10 passed
  • cargo test --test headless_toggle --locked -- --ignored — 46 passed (45 + the new guard)
  • RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --locked — exit 0
  • cargo deny check — exit 0

Closes #206

🤖 Generated with Claude Code


Open in Stage

Summary by CodeRabbit

  • Style

    • Enhanced color contrast for tier chips in Solarized theme to meet accessibility standards.
  • Tests

    • Added automated accessibility testing to verify color contrast compliance across all themes.

…ent override (5.00:1)

The Solarized tier-high chip rendered the theme's verbatim accent
(#268bd2) on the finding row's surface (#fdf6e3) at 3.41:1 — under the
WCAG AA 4.5:1 floor. Following the #203/#198 Latte precedent, deepen
the accent to the theme's own accent-hover (#1d6fa8, 5.00:1) via a
chip-scoped per-theme token override — never chip markup changes,
never a re-brightened theme block.

A new headless guard mechanically encodes the sweep: every tier chip
(total/high/advisory) on every one of the 8 themes must reach 4.5:1,
measured from resolved computed styles against the chip's true opaque
backdrop in headless Chromium. RED on unmodified main (solarized/high
3.41), GREEN with the override.

Goldens regenerated (3 report examples; explore pages don't embed
report.css) + the rendered-chrome insta snapshot rebaselined — each
delta is exactly the new comment+override block.

Closes #206

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1df52cd4-9fe4-45b7-97de-5df5b75fa9f3

📥 Commits

Reviewing files that changed from the base of the PR and between 82ac6aa and d653070.

⛔ Files ignored due to path filters (1)
  • tests/snapshots/render_integration__rendered_chrome_jaffle_shop.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • examples/diff-showcase-report.html
  • examples/jaffle-shop-report.html
  • examples/playground-report.html
  • templates/report.css
  • tests/headless_toggle.rs

📝 Walkthrough

Walkthrough

The PR introduces a Solarized-specific CSS accent token override for tier chips, addressing a WCAG AA contrast failure in that theme. The change is applied to the source template and synchronized across example HTML files. A new headless integration test validates that all tier-chip combinations across 8 shipped themes meet the 4.5:1 contrast threshold.

Changes

Solarized Tier Chip Contrast and Validation

Layer / File(s) Summary
Solarized tier-chip accent token override
templates/report.css, examples/diff-showcase-report.html, examples/jaffle-shop-report.html, examples/playground-report.html
New CSS rule :root[data-theme="solarized"] .tier-chip { --accent: #1d6fa8; } in the template, with identical override synced across three example HTML report files. Includes explanatory comments documenting WCAG AA contrast rationale.
WCAG AA contrast validation test
tests/headless_toggle.rs
Adds tier_chips_meet_aa_contrast_on_every_theme test that runs a JavaScript contrast sweep across 8 themes, measuring each tier-chip's relative luminance and opaque backdrop, computing WCAG contrast ratios, and asserting all 24 combinations (8 themes × 3 tiers) meet ≥4.5:1 threshold.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

  • breezy-bays-labs/cute-dbt#203: Also updates .tier-chip accent tokens across multiple themes (e.g., Latte) for WCAG AA compliance.
  • breezy-bays-labs/cute-dbt#194: Previously added the coverage-checks panel with styled tier chips; this PR extends that with Solarized override and comprehensive contrast assertions.

Poem

🐰 A token tweak so small, yet true,
Solarized chips now pass the test in blue.
From luminance to contrast sweep,
We guard accessibility—standards we keep! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly references issue #206 and clearly summarizes the main change: applying a chip-scoped accent override in the Solarized theme to improve tier-high chip contrast from 3.41:1 to 5.00:1, meeting WCAG AA standards.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch polish-206-solarized-chip-contrast

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.43.0)
examples/diff-showcase-report.html
examples/jaffle-shop-report.html
examples/playground-report.html

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 and usage tips.

@ghost

ghost commented Jun 11, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 4 individual chapters for you:

Title
1 Override Solarized chip accent for WCAG AA compliance
2 Add headless contrast guard for all themes
3 Regenerate example reports with updated contrast tokens
4 Other changes
Open in Stage

Chapters generated by Stage for commit d653070 on Jun 11, 2026 2:32pm UTC.

@github-actions

Copy link
Copy Markdown
Contributor

📄 Rendered report preview

All golden examples regenerated cleanly.

🟡 Golden examples

Committed to examples/ and byte-identity gated — the canonical reports contributors and consumers browse. Stable across PRs.

Report View Download
playground-report.html ▶ Open ↗ ⬇ Download
diff-showcase-report.html ▶ Open ↗ ⬇ Download
jaffle-shop-report.html ▶ Open ↗ ⬇ Download

🐶 Live dogfood preview

This PR doesn't touch dbt-project/, so there's no live dogfood preview.

▶ Open ↗ opens the report in your browser in one click —
published to this repo's GitHub Pages under /pr-228/.
⬇ Download fetches the same self-contained HTML as a workflow
artifact (auth-gated; works fully offline). Either way the report
makes zero external resource requests.

The Pages preview may take ~1 min to update after this comment
posts. On PRs from forks the Open link is unavailable (read-only
token) — use Download.

Alternative: GitHub CLI
# gh CLI >= 2.63 extracts into ./report-preview-playground/.
gh run download 27354324530 -R breezy-bays-labs/cute-dbt -n report-preview-playground
open report-preview-playground/playground-report.html

Posted by report-preview.yml for d653070c5b054b18f9b0441426f3553a6cb9fb09. Affordance only — never blocks merge.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses WCAG AA contrast issues for tier chips in the Solarized theme by overriding the accent color token. It also introduces a comprehensive headless integration test that programmatically verifies contrast ratios across all supported themes using a JavaScript-based sweep. No review comments were provided, and the changes look solid.

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.

@cmbays

cmbays commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

polish: Solarized tier-high chip contrast 3.41 fails AA on shipped main

1 participant