theme: enforce bundled contrast and chart palettes#7
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 58 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (20)
WalkthroughBundled themes receive foreground color corrections and five-entry chart palettes. Test-only validation loads every theme, checks text contrast, and verifies chart color presence, parsing, and uniqueness. ChangesTheme validation and palette updates
Estimated code review effort: 3 (Moderate) | ~25 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/ui/src/theme/tests.rs`:
- Around line 112-119: Add the baseline foreground/background pair to the
`pairs` array in the contrast test, using `colors.foreground` with
`colors.background`, so normal application text is validated against the 4.5:1
contrast floor while preserving the existing token checks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 277cdf03-1e26-4670-a4af-da1595198246
📒 Files selected for processing (22)
crates/ui/src/theme/mod.rscrates/ui/src/theme/tests.rsthemes/adventure.jsonthemes/alduin.jsonthemes/ayu.jsonthemes/catppuccin.jsonthemes/everforest.jsonthemes/fahrenheit.jsonthemes/flexoki.jsonthemes/gruvbox.jsonthemes/harper.jsonthemes/hybrid.jsonthemes/jellybeans.jsonthemes/kibble.jsonthemes/macos-classic.jsonthemes/matrix.jsonthemes/mellifluous.jsonthemes/molokai.jsonthemes/solarized.jsonthemes/spaceduck.jsonthemes/tokyonight.jsonthemes/twilight.json
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Description
Enforce a 4.5:1 text contrast floor across bundled themes, define five-color chart palettes that remain visible against each theme background, and preserve distinct semantic interaction states after contrast adjustments.
Validation now checks:
AI-assisted implementation. Generated changes were reviewed and validated against every bundled theme.
Screenshot
Not applicable. Theme data and validation coverage only.
Break Changes
None.
How to Test
cargo fmt --all -- --checkcargo test -p gpui-component theme::tests:: -- --nocapturecargo buildcargo clippy -- --deny warningsChecklist
cargo runfor story tests related to the changes.