Skip to content

fix(theme): keep active terminal row visible under cursor - #2989

Merged
ogulcancelik merged 1 commit into
masterfrom
akbash/2987-terminal-active-row
Aug 19, 2026
Merged

fix(theme): keep active terminal row visible under cursor#2989
ogulcancelik merged 1 commit into
masterfrom
akbash/2987-terminal-active-row

Conversation

@akbash-bot

Copy link
Copy Markdown
Collaborator

Issue

With the terminal theme, moving the Navigate cursor onto the active workspace removes its fill in both expanded and collapsed sidebars. Moving away restores it.

Problem

A selected workspace always replaced the active-row background with the Navigate cursor background. The terminal theme deliberately uses the terminal's default background for that cursor, so the overlap cleared the active workspace's dark-gray marker.

How did we fix it?

We extended the existing workspace highlight resolution so a concrete Navigate cursor color still wins, while a default/transparent cursor keeps the active-row color when both states overlap. This is limited to workspace rows in the expanded and collapsed desktop sidebars; other themes, inactive selections, Agent rows, and drag highlighting keep their existing behavior.

Verification

Before the change, direct expanded and collapsed render tests both produced Reset instead of the terminal theme's DarkGray active background. After the change, both render paths preserve DarkGray, preserve the default background when the cursor moves to an inactive workspace, and still prefer a concrete cursor color on other themes.

  • cargo test ui::sidebar::tests::selected_active_workspace_resolves -- --nocapture
  • adjacent Navigate and collapsed active-row tests
  • cargo fmt --check and cargo clippy --all-targets --locked -- -D warnings
  • Windows target clippy, UI hot-path architecture, integration asset, plugin marketplace, and maintenance suites
  • broad nextest: 3,478 passed; one unrelated live-handoff process-discovery test cannot recognize the mandated issue-local CARGO_TARGET_DIR outside the checkout, despite logs confirming handoff completion

refs #2987

@kangal-bot kangal-bot added the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 19, 2026
@coderabbitai

coderabbitai Bot commented Aug 19, 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: c44c01da-39b9-42df-99c6-e8ab52f2aad0

📥 Commits

Reviewing files that changed from the base of the PR and between a5c69be and 55939c3.

📒 Files selected for processing (2)
  • docs/next/CHANGELOG.md
  • src/ui/sidebar.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The sidebar now preserves the active workspace row background when selection_bg is Color::Reset. Expanded and collapsed rendering share the new resolver. Regression tests cover terminal and Catppuccin palettes.

Changes

Sidebar active-row background

Layer / File(s) Summary
Resolve and apply workspace backgrounds
src/ui/sidebar.rs
The sidebar resolves reset selection colors to active_row_bg for active workspaces. Expanded and collapsed rows use the shared resolver.
Validate background behavior
src/ui/sidebar.rs, docs/next/CHANGELOG.md
Tests cover active and inactive selections with terminal and Catppuccin palettes. The changelog records the fix.

Estimated code review effort: 2 (Simple) | ~15 minutes

Merge Risk: ⚪ Minimal · up to 55939

This localized sidebar change preserves the active workspace highlight under the cursor without changing other selection behavior, and no actionable merge-blocking risk remains after normal checks and review.

Possibly related issues

Possibly related PRs

  • herdrdev/herdr#2838: This change extends its sidebar selection-color behavior for reset selection colors.
  • herdrdev/herdr#2794: Both changes handle active and selected workspace row backgrounds in expanded and collapsed sidebars.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the theme fix that keeps the active terminal row visible under the Navigate cursor.
Description check ✅ Passed The description directly explains the sidebar rendering issue, the implemented fix, and the verification results.
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.
✨ 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 akbash/2987-terminal-active-row

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.

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

3 participants