Repository navigation
Conversation
--destructive-foreground on --destructive measured 4.47:1 in light (#fcf3f3 on #e40014) and 1.66:1 in dark (#df2225 on #ff6568), both under the 4.5:1 AA floor. Use #fff in light (4.87:1) and #171717 in dark (6.24:1); dark --destructive is a light red, so near-white would only reach 2.75:1. A test computes the ratio from main.css for both themes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe light theme’s Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to This change updates the destructive foreground colors to meet the accessibility contrast threshold and adds a test for it. No merge-blocking risk was identified. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
There was a problem hiding this comment.
ℹ️ Minor suggestions only.
Reviewed changes
main.csstoken values:--destructive-foregroundis now#fffin light and#171717in dark, lifting thedestructive/destructive-foregroundpair to 4.87:1 and 6.24:1.--destructiveitself is untouched, so no red surface shifts.- New
destructive-token-contrast.test.ts: reads both theme blocks frommain.css, computes the WCAG 2.x relative-luminance ratio, and asserts ≥ 4.5:1. I independently reproduced the ratios (old light 4.468 / dark 1.665; new 4.874 / 6.243) and confirmed the test fails against the old values, so it is genuine coverage rather than theatre.
ℹ️ Nitpicks
- The same token pair is duplicated in
docs/site/src/app/globals.css(#fcf3f3at line 99,#df2225at line 129) and was not updated, so that copy still falls short of AA. Nothing renders differently today because the docs site never references--destructive-foreground, but if the two copies are meant to stay aligned it is a one-line follow-up.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
The docs site keeps a copy of the app's base tokens; align its destructive foreground with main.css so the copies do not drift. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Addressed the review notes from the review summary: Pullfrog nitpick (the docs site still has the old |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — only a2b5caf landed since the prior pullfrog review at 48f23dd.
- Mirrored the AA destructive foreground tokens into the docs site:
docs/site/src/app/globals.cssnow carries#fff(light) and#171717(dark) for--destructive-foreground, matchingmain.cssand retiring the prior review's drift nitpick.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Closing as superseded by #36561, which fixes the built-in color defaults (WCAG AA pairs, light-mode active tab and the TOC scrollbar). Thank you for this PR, it shaped the design. |

ELI5
The text color meant for red "danger" buttons was too close to the red itself, especially in dark mode, where it was red on red. The text color is now white on the light theme's red and near-black on the dark theme's lighter red, so it is easy to read.
What Changed
--destructive-foregroundon--destructivemeasured 4.47:1 in light and 1.66:1 in dark, both under the 4.5:1 WCAG AA floor.#fcf3f3on#e40014: 4.47:1#fffon#e40014: 4.87:1#df2225on#ff6568: 1.66:1#171717on#ff6568: 6.24:1src/renderer/src/assets/main.css;--destructiveitself is unchanged. A unit test reads both theme blocks frommain.cssand asserts the pair is at least 4.5:1 with the WCAG 2.x relative-luminance formula.Why
Changing only the foreground keeps every existing red surface (buttons, badges, error text that uses
--destructive) looking the same. Both new values are existing palette values (--backgroundin light,--primary-foregroundin dark), so no new color is introduced. The dark theme cannot simply mirror the light fix: near-white#fafafaon the dark#ff6568is only 2.75:1, so it needs dark ink.Linked Issue
Fixes #25533
Visual Proof
Visible only where
text-destructive-foregroundis painted onbg-destructive(the shipped Button/Badge destructive variants usetext-whiteand do not change). Before/after screenshots will be attached by the author.Testing
New
src/renderer/src/assets/destructive-token-contrast.test.ts. With the oldmain.cssit fails with4.468… < 4.5(light) and1.664… < 4.5(dark); with the fix both pass.Ratios checked independently with the same formula in a separate script:
#fcf3f3/#e400144.47,#fff/#e400144.87,#df2225/#ff65681.66,#fafafa/#ff65682.75,#171717/#ff65686.24.pnpm exec vitest run --config config/vitest.config.ts src/shared/plugins src/renderer/src/assets: 23 files, 165 tests passpnpm lintpassespnpm typecheckpassesFull
pnpm testnot run locally (CI will cover)I manually tested these changes locally (no rendered check yet; contrast ratios only)
Automated tests added/updated, or explained why not below
AI Disclosure
Implemented with Claude Code (Claude Opus 5.5); reviewed by the author.
Review
--destructive-foregroundget the readable value.docs/STYLEGUIDE.md, using existing palette values rather than new ones. No change to shipped Button/Badge variants.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)