Skip to content
Merged
Changes from all 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
28 changes: 13 additions & 15 deletions apps/web/src/components/sidebar/SidebarThreadRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1122,14 +1122,19 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
)
) : null;

const remoteMachineIcon =
isRemote && !showsScratchMachine ? (
<span className="inline-flex shrink-0 items-center text-sidebar-muted-foreground/70">
<EnvironmentMachineIcon aria-hidden kind={props.environmentMachine} className="size-3.5" />
</span>
) : null;
const diff = latestRunDiff(thread);
// Only the provider icon would remain, so the row drops the line instead of leaving it blank.
// Only the trailing icons would remain, so the row moves them to the title line instead.
const metaLineEmpty =
!thread.branch &&
!showsScratchMachine &&
prBadge === null &&
diff === null &&
!isRemote &&
runningTerminalIds.length === 0;
const metaLine = metaLineEmpty ? null : (
<div className="mt-0.5 flex min-w-0 items-center gap-1.5 text-secondary-label text-xs">
Expand Down Expand Up @@ -1164,24 +1169,17 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
aria-hidden
className="pointer-events-none ml-auto inline-flex shrink-0 items-center gap-1"
>
{isRemote && !showsScratchMachine ? (
<span className="inline-flex shrink-0 items-center text-sidebar-muted-foreground/70">
<EnvironmentMachineIcon
aria-hidden
kind={props.environmentMachine}
className="size-3.5"
/>
</span>
) : null}
{remoteMachineIcon}
<SidebarProviderStack
thread={thread}
providerEntryByInstanceId={props.providerEntryByInstanceId}
/>
</span>
</div>
);
const titleLineProviderStack = metaLineEmpty ? (
<span aria-hidden className="inline-flex shrink-0">
const titleLineIcons = metaLineEmpty ? (
<span aria-hidden className="inline-flex shrink-0 items-center gap-1">
{remoteMachineIcon}
<SidebarProviderStack
thread={thread}
providerEntryByInstanceId={props.providerEntryByInstanceId}
Expand Down Expand Up @@ -1249,7 +1247,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
)}
{draftIndicator}
{title}
{multiline ? titleLineProviderStack : null}
{multiline ? titleLineIcons : null}
{pinIndicator}
{multiline ? null : terminalStatusIcon}
{isRegeneratingTitle ? (
Expand Down Expand Up @@ -1569,7 +1567,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
Regenerating title
</span>
) : null}
{titleLineProviderStack}
{titleLineIcons}
</div>
{metaLine}
</div>
Expand Down
Loading