TypeScript
fix(web): remote machine icon no longer forces a third sidebar line (#26803)
ahalekelly32ce9db80bbc
diff --git a/apps/web/src/components/sidebar/SidebarThreadRow.tsx b/apps/web/src/components/sidebar/SidebarThreadRow.tsxindex a111126342f..4873a4b5b13 100644--- a/apps/web/src/components/sidebar/SidebarThreadRow.tsx+++ b/apps/web/src/components/sidebar/SidebarThreadRow.tsx@@ -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">@@ -1164,15 +1169,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowParia-hiddenclassName="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}<SidebarProviderStackthread={thread}providerEntryByInstanceId={props.providerEntryByInstanceId}@@ -1180,8 +1177,9 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP</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}<SidebarProviderStackthread={thread}providerEntryByInstanceId={props.providerEntryByInstanceId}@@ -1249,7 +1247,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP)}{draftIndicator}{title}- {multiline ? titleLineProviderStack : null}+ {multiline ? titleLineIcons : null}{pinIndicator}{multiline ? null : terminalStatusIcon}{isRegeneratingTitle ? (@@ -1569,7 +1567,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowPRegenerating title</span>) : null}- {titleLineProviderStack}+ {titleLineIcons}</div>{metaLine}</div>