Skip to content

Commit 04f632b

Browse files
committed
feat(web): show the remote machine badge in the compact sidebar rail
1 parent 2b7d7f5 commit 04f632b

1 file changed

Lines changed: 31 additions & 11 deletions

File tree

‎apps/web/src/components/Sidebar.tsx‎

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,17 +1689,37 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
16891689
/>
16901690
}
16911691
>
1692-
{props.project ? (
1693-
<ProjectFavicon project={props.project} className="size-4 shrink-0" />
1694-
) : driverKind ? (
1695-
<ProviderInstanceIcon
1696-
driverKind={driverKind}
1697-
displayName={providerEntry?.displayName ?? modelInstanceId}
1698-
iconClassName="size-4"
1699-
/>
1700-
) : (
1701-
<SquarePenIcon aria-hidden className="size-4" />
1702-
)}
1692+
<span className="relative inline-flex size-4 shrink-0 items-center justify-center">
1693+
{props.project ? (
1694+
<ProjectFavicon project={props.project} className="size-4" />
1695+
) : driverKind ? (
1696+
<ProviderInstanceIcon
1697+
driverKind={driverKind}
1698+
displayName={providerEntry?.displayName ?? modelInstanceId}
1699+
iconClassName="size-4"
1700+
/>
1701+
) : (
1702+
<SquarePenIcon aria-hidden className="size-4" />
1703+
)}
1704+
{isRemote ? (
1705+
<Tooltip>
1706+
<TooltipTrigger
1707+
render={
1708+
<span
1709+
role="img"
1710+
aria-label={props.environmentLabel ?? "Remote environment"}
1711+
className="absolute -left-1 -bottom-1 inline-flex size-3 items-center justify-center rounded-full bg-sidebar text-sidebar-muted-foreground ring-1 ring-sidebar"
1712+
/>
1713+
}
1714+
>
1715+
<EnvironmentMachineIcon kind={props.environmentMachine} className="size-2.5" />
1716+
</TooltipTrigger>
1717+
<TooltipPopup side="right">
1718+
{props.environmentLabel ?? "Remote environment"}
1719+
</TooltipPopup>
1720+
</Tooltip>
1721+
) : null}
1722+
</span>
17031723
{topStatus ? (
17041724
<span
17051725
aria-hidden

0 commit comments

Comments
 (0)