Repository navigation
Improve sidebar resize handle drag target and visual indicators - #7454
Conversation
- Widen the resize handle hit target to 12px (straddling the edge) to make it easier to grab, centering a thin 1px visual guide line. - Highlight the divider line on hover and active states, and shade the handle background during active dragging. - Adjust the sidebar webkit scrollbar border to prevent a transparent gap from appearing next to the drag handle. - Update unit tests to match the new styling and sizing classes.
📝 WalkthroughWalkthroughThis change widens the worktree sidebar resize handle's hit target and separates it into a container with an inner 1px divider line, adding hover/active ring styling driven by an Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SidebarComponent
participant useSidebarResize
User->>SidebarComponent: hover/drag resize handle
SidebarComponent->>useSidebarResize: onResizeStart
useSidebarResize-->>SidebarComponent: isResizing state
SidebarComponent->>SidebarComponent: apply active classes to handle/divider
Related Issues: None specified. Related PRs: None specified. Suggested labels: frontend, ui, sidebar Suggested reviewers: None specified. Poem 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/src/components/sidebar/index.tsx (1)
134-137: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winKeep the resize handle outside the clipped sidebar surface.
overflow-hiddenon the sidebar root trims the-right-1.5 w-3handle to the in-bounds half, so the expanded grab area past the seam never becomes clickable. Move the clipping to an inner wrapper or let the outer sidebar overflow visibly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 1d668b80-ff24-432d-bdfe-90962dad50d8
📒 Files selected for processing (3)
src/renderer/src/assets/main.csssrc/renderer/src/components/sidebar/index.tsxsrc/renderer/src/components/sidebar/sidebar-resize-handle.test.ts
…lyai#7454) - Widen the resize handle hit target to 12px (straddling the edge) to make it easier to grab, centering a thin 1px visual guide line. - Highlight the divider line on hover and active states, and shade the handle background during active dragging. - Adjust the sidebar webkit scrollbar border to prevent a transparent gap from appearing next to the drag handle. - Update unit tests to match the new styling and sizing classes.
Summary
Improves the sidebar resize handle drag target alignment and its visual feedback:
w-1tow-3and offsets it with-right-1.5so it straddles the sidebar seam, making it much easier to hover and grab.w-pxline that highlights on hover/active resizing).main.css.Screenshots
Testing
pnpm lintpnpm typecheckpnpm test(Updated unit tests insidebar-resize-handle.test.tsto assert on updated class names)pnpm buildAI Review Report
Conducted an AI-assisted review of the UI and component layout changes:
-right-1.5); verified it sits neatly on the border without layout shifting.cursor-col-resize) are native browser styles that work identically on macOS, Windows, and Linux.Security Audit
Verified that no backend code, command executions, IPC endpoints, or sensitive dependencies are altered. Changes are limited to CSS classes and rendering components.
Notes
No platform-specific risks identified; scrollbar tweaks are webkit-specific, ensuring high-fidelity rendering within Electron.