Skip to content

fix(theme): keep default active rows subtle and add navigate cursor color - #2838

Merged
ogulcancelik merged 1 commit into
masterfrom
issue/2792-nav-cursor-color
Aug 15, 2026
Merged

fix(theme): keep default active rows subtle and add navigate cursor color#2838
ogulcancelik merged 1 commit into
masterfrom
issue/2792-nav-cursor-color

Conversation

@ogulcancelik

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #2794 (refs #2792). That fix made active Space/Agent rows visible on themes where they blended into a matching terminal background, but it did so by brightening the active-row highlight on every built-in theme, noticeably changing how existing themes look.

This PR narrows the change to the philosophy: don't alter defaults that weren't broken, fix the ones that were, and give the Navigate cursor its own color so the two highlights can't be confused.

  • Restore the pre-fix: keep active sidebar rows visible #2794 active-row appearance for themes whose highlight was already visible (catppuccin, catppuccin-latte, tokyo-night-day, gruvbox-light, solarized-light, kanagawa-lotus, rose-pine, vesper). The desktop characterization frame digest returns to its pre-fix: keep active sidebar rows visible #2794 value, confirming the default theme renders identically to current stable.
  • Keep dedicated, subtler active_row_bg values for themes where the old highlight was invisible or ambiguous against a matching terminal background (tokyo-night, dracula, nord, gruvbox, one-dark, one-light, solarized, kanagawa, rose-pine-dawn).
  • Add a per-theme selection_bg for the Navigate-mode cursor row (expanded workspace cards and collapsed sidebar rows). Most themes use an accent-tinted background so the cursor is distinct by hue from the passive active highlight.
  • Expose theme.custom.selection_bg as an override, documented in the config reference and en/ja/zh configuration pages.

Testing

  • just check (fmt, cargo nextest, maintenance scripts) green after rebasing onto master.
  • New palette test asserts every built-in selection color stays distinct from both the matching terminal background (>=1.05:1) and the active-row color; active-row visibility floor adjusted to the new subtle values.
  • Custom theme override test covers selection_bg.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e0f6dcdc-411c-49d7-bf4c-345a23715b27

📥 Commits

Reviewing files that changed from the base of the PR and between 15539d3 and 60dadce.

📒 Files selected for processing (10)
  • docs/next/CHANGELOG.md
  • docs/next/website/src/content/docs/configuration.mdx
  • docs/next/website/src/content/docs/ja/configuration.mdx
  • docs/next/website/src/content/docs/zh-cn/configuration.mdx
  • docs/next/website/src/data/config-reference.json
  • src/app/state.rs
  • src/config/theme.rs
  • src/main.rs
  • src/ui/sidebar.rs
  • src/ui/tab_surface.rs

📝 Walkthrough

Walkthrough

The PR adds Palette::selection_bg for Navigate-mode sidebar selections. Built-in themes define the color, custom themes can override it, sidebar rendering uses it, and configuration documentation describes the new option.

Changes

Navigate Selection Background

Layer / File(s) Summary
Palette and theme configuration
src/app/state.rs, src/config/theme.rs
The palette defines separate selection and active-row colors. Custom themes support selection_bg. Tests validate parsing, contrast, and color distinction.
Sidebar selection rendering
src/ui/sidebar.rs, src/ui/tab_surface.rs
Collapsed and expanded selected workspace rows use palette.selection_bg. Rendering expectations and the desktop frame digest are updated.
Configuration documentation and defaults
src/main.rs, docs/next/website/src/content/docs/..., docs/next/website/src/data/config-reference.json, docs/next/CHANGELOG.md
Default comments, configuration references, localized documentation, and the changelog describe theme.custom.selection_bg.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 60dad

This change narrows active-row styling to affected themes and adds a distinct, configurable Navigate cursor color; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant CustomThemeColors
  participant PaletteWithOverrides
  participant Sidebar
  NavigateMode->>CustomThemeColors: configure selection_bg
  CustomThemeColors->>PaletteWithOverrides: provide optional color
  PaletteWithOverrides->>Sidebar: expose Palette::selection_bg
  NavigateMode->>Sidebar: select workspace row
  Sidebar-->>NavigateMode: render row with selection_bg
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes to active-row defaults and Navigate cursor colors.
Description check ✅ Passed The description directly explains the theme highlighting changes, configuration support, documentation, and tests.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue/2792-nav-cursor-color

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.

@kangal-bot kangal-bot added the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 15, 2026
@ogulcancelik
ogulcancelik merged commit 9166e07 into master Aug 15, 2026
8 checks passed
@kangal-bot kangal-bot removed the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 15, 2026
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.

2 participants