fix(sidebar): only show the projects scrollbar when the list overflows (#7845)

This commit is contained in:
OrcaWin 2026-07-09 11:21:35 -07:00 committed by GitHub
parent 8adfef4ff8
commit 81e4f0fa68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -473,12 +473,12 @@
scrollbar-color: color-mix(in srgb, var(--muted-foreground, #737373) 48%, transparent) transparent;
}
/* Keep the sidebar gutter reserved; only the thumb fades in on hover. */
/* Why: no reserved `scrollbar-gutter` paired with `overflow-y: auto`, a list
that fits shows no scrollbar (and no Windows scrollbar arrow buttons), so its
rows stay flush with the fixed header controls, matching macOS. The gutter is
only taken while actually scrolling. Thumb still fades in on hover. */
.worktree-sidebar-scrollbar {
/* Why: the scrollbar gutter is paint-only in Chromium; this keeps card
surfaces clear of Orca's resize handle and right-edge sidebar chrome. */
padding-right: 4px;
scrollbar-gutter: stable;
scrollbar-color: transparent transparent;
}

View File

@ -3988,7 +3988,7 @@ const VirtualizedWorktreeViewport = React.memo(function VirtualizedWorktreeViewp
onWheel={markDirectScrollInput}
onDragOver={handleWorktreeDragOver}
onDrop={handleWorktreeDrop}
className="worktree-sidebar-scrollbar h-full overflow-y-scroll overflow-x-hidden pl-1 scrollbar-sleek outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset pt-px"
className="worktree-sidebar-scrollbar h-full overflow-y-auto overflow-x-hidden pl-1 scrollbar-sleek outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset pt-px"
style={WORKTREE_SIDEBAR_SCROLL_STYLE}
>
<div
@ -6722,7 +6722,7 @@ const WorktreeList = React.memo(function WorktreeList({
data-contextual-tour-target="workspace-list"
className="relative min-h-0 flex-1"
>
<div className="worktree-sidebar-scrollbar flex h-full flex-col overflow-y-scroll overflow-x-hidden pl-1 scrollbar-sleek pt-px">
<div className="worktree-sidebar-scrollbar flex h-full flex-col overflow-y-auto overflow-x-hidden pl-1 scrollbar-sleek pt-px">
<div className="flex flex-col items-center gap-2 px-4 py-6 text-center text-[11px] text-muted-foreground">
<span>
{translate('auto.components.sidebar.WorktreeList.b7acbf038b', 'No workspaces found')}