fix: restore worktree sidebar scroll viewport (#688)

This commit is contained in:
Brennan Benson 2026-04-15 20:16:52 -07:00 committed by GitHub
parent 4730d02acb
commit 67ea84a0fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View file

@ -721,7 +721,7 @@ function App(): React.JSX.Element {
layout so the terminal/editor reclaim the left edge instead of
leaving behind a content-width blank strip. */
<div
className={`flex flex-col shrink-0${sidebarOpen ? '' : ' relative w-0 overflow-visible'}`}
className={`flex min-h-0 flex-col shrink-0${sidebarOpen ? '' : ' relative w-0 overflow-visible'}`}
>
<div
className={`titlebar-left${sidebarOpen ? '' : ' absolute top-0 left-0 z-10'}`}
@ -736,7 +736,14 @@ function App(): React.JSX.Element {
>
{titlebarLeftControls}
</div>
<Sidebar />
<div className="flex min-h-0 flex-1">
{/* Why: the workspace-view wrapper adds a fixed 42px header
above the sidebar. Without a flex-1/min-h-0 slot here,
the sidebar falls back to its content height, so the
worktree list loses its scroll viewport and the fixed
bottom toolbar (including Add Repo) gets pushed offscreen. */}
<Sidebar />
</div>
</div>
) : (
<Sidebar />

View file

@ -47,7 +47,7 @@ function Sidebar(): React.JSX.Element {
<div
ref={containerRef}
className={cn(
'relative flex-shrink-0 bg-sidebar flex flex-col overflow-hidden scrollbar-sleek-parent',
'relative min-h-0 flex-shrink-0 bg-sidebar flex flex-col overflow-hidden scrollbar-sleek-parent',
isResizing ? 'transition-none' : 'transition-[width] duration-200'
)}
style={{