fix(theme): keep active terminal row visible under cursor - #2989
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe sidebar now preserves the active workspace row background when ChangesSidebar active-row background
Estimated code review effort: 2 (Simple) | ~15 minutes Merge Risk: ⚪ Minimal · up to 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
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Issue
With the
terminaltheme, 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
Resetinstead of the terminal theme'sDarkGrayactive background. After the change, both render paths preserveDarkGray, 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 -- --nocapturecargo fmt --checkandcargo clippy --all-targets --locked -- -D warningsCARGO_TARGET_DIRoutside the checkout, despite logs confirming handoff completionrefs #2987