From 79e2cbc09ef5826929dbc993d5d0aa2216bb4e1a Mon Sep 17 00:00:00 2001 From: thomas Date: Fri, 24 Jul 2026 15:45:29 +0800 Subject: [PATCH] fix(sidebar): the repo group header showed a plain arrow on Windows The group header is drag-only -- it does nothing on click -- so it hovered under `cursor_grab()`, an open hand that says "pick me up". gpui's Windows backend has no mapping for `CursorStyle::OpenHand`: `load_cursor` matches IBeam, Crosshair, PointingHand, the resize family and OperationNotAllowed, then falls everything else through to `IDC_ARROW`. Win32 has no open-hand system cursor to map it to either. So on Windows the one affordance the header has read as "nothing to do here", while the rows beside it (`cursor_pointer()` -> `IDC_HAND`) looked interactive. Point there instead: not as apt as the open hand, but it is the same cursor the rows use and it does say the header responds. macOS and Linux keep the hand -- both backends implement OpenHand. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/tab_sidebar.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ui/tab_sidebar.rs b/src/ui/tab_sidebar.rs index 7b017183..231163a4 100644 --- a/src/ui/tab_sidebar.rs +++ b/src/ui/tab_sidebar.rs @@ -621,7 +621,17 @@ impl Tty7App { // Unlike a row, a header does nothing on click — its // only affordance is the drag, so the open hand is the // honest hover cursor (it closes once you pick it up). - header.cursor_grab().on_drag(DragGroup, { + // Windows has no open-hand system cursor, and gpui's + // Windows backend falls every unmapped `CursorStyle` + // through to `IDC_ARROW` — which reads as "nothing to + // do here". Point there instead: it's the same cursor + // the rows use, and it at least says "interactive". + let header = if cfg!(target_os = "windows") { + header.cursor_pointer() + } else { + header.cursor_grab() + }; + header.on_drag(DragGroup, { let state = self.reorder.clone(); let slots = group_slots.clone(); move |_drag, grab, _window, cx| {