diff --git a/apps/web/src/components/LegacySidebar.tsx b/apps/web/src/components/LegacySidebar.tsx index 0f4201390dae..13dc5b7c1a7a 100644 --- a/apps/web/src/components/LegacySidebar.tsx +++ b/apps/web/src/components/LegacySidebar.tsx @@ -576,11 +576,17 @@ export const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThr standalone /> ); - const threadMetaClassName = isConfirmingArchive - ? "pointer-events-none opacity-0" + const threadMetaVisibilityClassName = isConfirmingArchive + ? "opacity-0" : !isThreadRunning - ? "pointer-events-none transition-opacity duration-150 max-sm:pr-6 group-hover/menu-sub-item:opacity-0 group-focus-within/menu-sub-item:opacity-0" - : "pointer-events-none"; + ? "transition-opacity duration-150 group-hover/menu-sub-item:opacity-0 group-focus-within/menu-sub-item:opacity-0" + : ""; + const threadMetaClassName = `pointer-events-none inline-flex w-full justify-end ${ + jumpLabel ? "col-start-1 row-start-1 z-10" : "" + } ${threadMetaVisibilityClassName}`; + const threadMetadataGridClassName = jumpLabel + ? "grid shrink-0 grid-cols-[max-content] items-center max-sm:grid-cols-[max-content_calc(1.5rem*var(--legacy-sidebar-content-zoom))]" + : "grid shrink-0 grid-cols-[repeat(2,calc(0.75rem*var(--legacy-sidebar-content-zoom)))_calc(3rem*var(--legacy-sidebar-content-zoom))] items-center gap-x-[calc(0.25rem*var(--legacy-sidebar-content-zoom))] max-sm:grid-cols-[repeat(2,calc(0.75rem*var(--legacy-sidebar-content-zoom)))_calc(3rem*var(--legacy-sidebar-content-zoom))_calc(1.5rem*var(--legacy-sidebar-content-zoom))]"; const [threadRowActive, setThreadRowActive] = useState(false); const clearConfirmingArchive = useCallback(() => { setConfirmingArchiveThreadKey((current) => (current === threadKey ? null : current)); @@ -937,7 +943,7 @@ export const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThr )}
- {cleanup === null && discoveredPorts.length > 0 && ( + {cleanup === null && discoveredPorts.length > 0 ? ( 1 ? ` (+${discoveredPorts.length - 1})` : ""} - )} - {props.showWorktreeIndicators ? : null} - {terminalStatus && ( + ) : null} + {terminalStatus ? ( {terminalStatus.label} - )} + ) : null} + {/* These fixed tracks are the scanning columns for every thread row. + Empty local/worktree cells stay mounted for ordinary timestamps, + which cannot widen the grid and push either icon sideways. A + transient jump hint replaces all three cells and uses a + content-sized track so a custom shortcut cannot paint across + visible row content or create an implicit grid row; the mobile + grid retains its trailing action track. */}
- - {showsThreadEnvironmentIcon ? ( - - - } - > - - - {threadEnvironmentLabel} - - ) : null} - + {jumpLabel === null ? ( + <> + + {props.showWorktreeIndicators ? ( + + ) : null} + + + {showsThreadEnvironmentIcon ? ( + + + } + > + + + {threadEnvironmentLabel} + + ) : null} + + + ) : null} {isConfirmingArchive ? (