From d1a3324e7ef08de5753f7be25bf993dd4cb6ef96 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Thu, 16 Apr 2026 23:25:17 -0700 Subject: [PATCH] fix: make Cmd+J worktree jump scroll instant (#751) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove `scroll-smooth` from the virtualized sidebar viewport so palette reveals land immediately instead of animating the full cross-list distance at the browser's default smooth-scroll speed. Single-card stepping (Cmd+Shift+↑/↓) no longer glides either — the brevity of the movement makes instant feel snappier, and it avoids the state-machine risk of toggling `scroll-behavior` inline when tanstack virtual can also issue follow-up scroll corrections after dynamic item measurement. --- src/renderer/src/components/sidebar/WorktreeList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/components/sidebar/WorktreeList.tsx b/src/renderer/src/components/sidebar/WorktreeList.tsx index 35bdf4f28bc..b82f46163a7 100644 --- a/src/renderer/src/components/sidebar/WorktreeList.tsx +++ b/src/renderer/src/components/sidebar/WorktreeList.tsx @@ -252,7 +252,7 @@ const VirtualizedWorktreeViewport = React.memo(function VirtualizedWorktreeViewp aria-orientation="vertical" aria-activedescendant={activeDescendantId} onKeyDown={handleContainerKeyDown} - className="flex-1 overflow-auto pl-1 pr-2 scroll-smooth outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset pt-px [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" + className="flex-1 overflow-auto pl-1 pr-2 outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset pt-px [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" >