Repository navigation
Conversation
Color Overrides previously lived in a single terminalColorOverrides bag, so a dark-mode background tweak also painted light mode. Keep the legacy bag for backward compatibility, add mode-specific dark/light bags, and resolve the active bag from the terminal appearance mode (with Match dark mode reuse). Closes stablyai#10561
|
Warning Review limit reached
Next review available in: 5 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: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughTerminal color overrides now support legacy shared storage and separate dark/light override bags. Shared utilities handle mode resolution, edits, imports, and resets. Settings editing was moved into a dedicated component with mode selection and reset controls. Terminal theme composition and related rendering paths now receive the active appearance mode, while previews and tests cover mode-specific behavior. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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.
Actionable comments posted: 3
🧹 Nitpick comments (3)
src/shared/terminal-color-overrides.test.ts (1)
1-9: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winMissing coverage for
mergeImportedTerminalColorOverrides.No test in this suite exercises
mergeImportedTerminalColorOverrides(imported byuseGhosttyImport.ts/ThemeStep.tsx). A test seeding only the legacyterminalColorOverridesbag and asserting the resulting overrides don't leak into the other mode after resolution would have caught the mode-scoping gap flagged inuseGhosttyImport.ts/ThemeStep.tsx.src/renderer/src/components/settings/TerminalColorOverridesSection.tsx (2)
43-52: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCollapse toggle lacks
aria-expanded.The disclosure
<button>togglingexpandeddoesn't expose its state to assistive tech.♿ Proposed fix
<button onClick={() => setExpanded((prev) => !prev)} className="flex items-center gap-2 text-sm font-medium" + aria-expanded={expanded} >
31-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winNew locale keys deviate from the established hash-based convention in this namespace.
Every neighboring key in the
TerminalWindowSectionnamespace here uses the 10-char hash format (63f8d9336e,03c855d15f), but the new keys (color_overrides_mode_description,color_overrides_mode_title,color_overrides_mode_aria,color_overrides_match_dark_hint) are semantic slugs, and they're also namespaced underTerminalWindowSectiondespite living in the newTerminalColorOverridesSection.tsxfile.Based on learnings, semantic keys are acceptable only "when they match the established neighboring namespaces," which isn't the case here; the codebase otherwise "use[s] hash-based locale keys with
translate('auto.components.<Dir>.<ComponentFile>.<10-char-hash>', ...)" for settings components.Also applies to: 61-64, 69-72, 93-96
Source: Learnings
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: cc5e6948-058e-437d-9705-20e913c88585
📒 Files selected for processing (15)
src/renderer/src/components/dashboard-popout/AgentTerminalPreview.tsxsrc/renderer/src/components/onboarding/ThemeStep.tsxsrc/renderer/src/components/settings/TerminalColorOverridesSection.tsxsrc/renderer/src/components/settings/TerminalSettingsPreview.tsxsrc/renderer/src/components/settings/TerminalWindowSection.tsxsrc/renderer/src/components/settings/setting-labels.tssrc/renderer/src/components/settings/useGhosttyImport.tssrc/renderer/src/components/terminal-pane/TerminalPane.tsxsrc/renderer/src/components/terminal-pane/compose-active-terminal-theme.test.tssrc/renderer/src/components/terminal-pane/terminal-appearance.tssrc/renderer/src/lib/left-sidebar-appearance.tssrc/renderer/src/runtime/sync-runtime-graph.tssrc/shared/terminal-color-overrides.test.tssrc/shared/terminal-color-overrides.tssrc/shared/types.ts
Reset label names the active mode; Ghostty import seeds dark-only; edits/resets target the effective bag when light matches dark.
Sync update (
|

Summary
terminalColorOverrides), so a dark-mode background override also covered light mode ([Bug]: Appearance terminal color overrides affects both light/dark mode #10561).terminalColorOverridesDark/terminalColorOverridesLight, keep the legacy bag until the first per-mode edit, and resolve overrides from the effective terminal appearance mode (light “Match dark mode” reuses the dark bag).Test plan
vitest—terminal-color-overrides,compose-active-terminal-theme,useGhosttyImport,left-sidebar-appearanceCloses #10561
ELI5
Terminal color overrides applied to both light and dark modes together, so a dark background tweak broke light mode. Overrides are per light/dark mode with a clear Settings control.