Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 36 additions & 15 deletions apps/web/src/components/LegacySidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -576,11 +576,14 @@ 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-span-3 col-start-1 row-start-1 z-10" : ""
Comment thread
lastobelus marked this conversation as resolved.
Outdated
} ${threadMetaVisibilityClassName}`;
const [threadRowActive, setThreadRowActive] = useState(false);
const clearConfirmingArchive = useCallback(() => {
setConfirmingArchiveThreadKey((current) => (current === threadKey ? null : current));
Expand Down Expand Up @@ -937,7 +940,7 @@ export const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThr
)}
</div>
<div className="ml-auto flex shrink-0 items-center gap-1.5">
{cleanup === null && discoveredPorts.length > 0 && (
{cleanup === null && discoveredPorts.length > 0 ? (
<Tooltip>
<TooltipTrigger
render={
Expand All @@ -956,9 +959,8 @@ export const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThr
{discoveredPorts.length > 1 ? ` (+${discoveredPorts.length - 1})` : ""}
</TooltipPopup>
</Tooltip>
)}
{props.showWorktreeIndicators ? <ThreadWorktreeIndicator thread={thread} /> : null}
{terminalStatus && (
) : null}
{terminalStatus ? (
<Tooltip>
<TooltipTrigger
render={
Expand All @@ -975,14 +977,29 @@ export const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThr
</TooltipTrigger>
<TooltipPopup side="top">{terminalStatus.label}</TooltipPopup>
</Tooltip>
)}
) : null}
{/* These fixed tracks are the scanning columns for every thread row.
Empty local/worktree cells stay mounted, and the timestamp cannot
widen the grid and push either icon sideways. A transient jump
hint replaces all three tracks so a custom shortcut cannot paint
across visible metadata icons. */}
<div
className={`flex min-w-12 items-center justify-end gap-1 ${
isRemoteThread ? "max-sm:min-w-24" : "max-sm:min-w-20"
}`}
className="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))]"
Comment thread
lastobelus marked this conversation as resolved.
Outdated
Comment thread
lastobelus marked this conversation as resolved.
Outdated
data-testid={`thread-metadata-grid-${thread.id}`}
>
<span className="inline-flex size-3 shrink-0 items-center justify-center">
{showsThreadEnvironmentIcon ? (
<span
className="inline-flex h-3 w-full items-center justify-center"
data-thread-metadata-column="worktree"
>
{jumpLabel === null && props.showWorktreeIndicators ? (
<ThreadWorktreeIndicator thread={thread} />
) : null}
</span>
<span
className="inline-flex h-3 w-full items-center justify-center"
data-thread-metadata-column="environment"
>
{jumpLabel === null && showsThreadEnvironmentIcon ? (
<Tooltip>
<TooltipTrigger
render={
Expand Down Expand Up @@ -1057,7 +1074,11 @@ export const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThr
</Tooltip>
)
) : null}
<span className={threadMetaClassName}>
<span
className={threadMetaClassName}
data-thread-metadata-column="timestamp"
data-thread-metadata-mode={jumpLabel ? "jump" : "timestamp"}
>
<span className="inline-flex items-center gap-1">
{jumpLabel ? (
hasActiveAnnotation && thread.annotation ? (
Expand Down