From 7b74657a3211918b194eb082e14f9d5c61bc2002 Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Tue, 27 Oct 2026 22:46:42 -0700 Subject: [PATCH] fix(sidebar): keep incoming host headers above sticky groups (#34751) Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> --- .../sidebar/worktree-list/rows/virtual-row-dispatch.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/sidebar/worktree-list/rows/virtual-row-dispatch.tsx b/src/renderer/src/components/sidebar/worktree-list/rows/virtual-row-dispatch.tsx index 1b3574437fe..1126a898ba3 100644 --- a/src/renderer/src/components/sidebar/worktree-list/rows/virtual-row-dispatch.tsx +++ b/src/renderer/src/components/sidebar/worktree-list/rows/virtual-row-dispatch.tsx @@ -65,7 +65,7 @@ function renderHostHeaderVirtualRow( row: Extract, vItem: VirtualItem ): React.JSX.Element { - // Why: the host card is the outer tier; it pins above group headers (z-30 vs z-20) and stays put as they hand off. + // Incoming hosts must cover the outgoing sticky group before they pin. const isActiveStickyHost = ctx.activeStickyHostIndexRef.current === vItem.index const hasHeaderTopSpacing = shouldUseHeaderTopSpacing({ rows: ctx.renderRows, @@ -83,9 +83,9 @@ function renderHostHeaderVirtualRow( data-index={vItem.index} ref={ctx.measureVirtualRowElement} className={cn( - 'left-0 right-0', + 'left-0 right-0 z-30 bg-worktree-sidebar', hasHeaderTopSpacing && !isActiveStickyHost && 'pt-1', - isActiveStickyHost ? 'sticky -top-px z-30 bg-worktree-sidebar' : 'absolute top-0' + isActiveStickyHost ? 'sticky -top-px' : 'absolute top-0' )} style={isActiveStickyHost ? undefined : { transform: getVirtualRowTransform(vItem.start) }} >