fix(web): copy provider update commands from compact rows (#9888)

This commit is contained in:
Matthew Feroz authored and GitHub committed 2026-09-06 04:27:13 +05:30
1 parent 5fe5c6fe9b
commit 54441e63d8
1 file changed
+35 -9
@@ -598,15 +598,19 @@ export function ProviderInstanceCard({
selected ? "bg-muted/45" : "hover:bg-muted/25",
)}
>
<button
type="button"
<div
className={cn(
"flex min-w-0 flex-1 cursor-pointer items-start gap-3 rounded-md text-left outline-none transition-opacity focus-visible:ring-2 focus-visible:ring-ring",
"pointer-events-none relative flex min-w-0 flex-1 items-start gap-3 rounded-md text-left transition-opacity",
!enabled && !selected && "opacity-60 group-hover:opacity-100",
)}
onClick={onSelect}
aria-pressed={selected}
>
<button
type="button"
className="pointer-events-auto absolute inset-0 cursor-pointer rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring"
onClick={onSelect}
aria-label={`Select ${displayName}`}
aria-pressed={selected}
/>
{titleIconNode}
<span className="min-w-0 flex-1">
<span className="flex min-w-0 items-center gap-2">
@@ -622,9 +626,31 @@ export function ProviderInstanceCard({
</code>
) : null}
{versionAdvisory ? (
<span role="img" aria-label="Update available" className="inline-flex shrink-0">
<ArrowUpCircleIcon className="size-3.5 text-muted-foreground" />
</span>
updateCommand ? (
<Tooltip>
<TooltipTrigger
render={
<Button
type="button"
size="icon-micro"
variant="ghost-muted"
className="pointer-events-auto relative shrink-0"
aria-label={`Copy ${displayName} update command`}
onClick={() =>
copyToClipboard(updateCommand, { providerName: displayName })
}
>
<ArrowUpCircleIcon className="size-3.5" />
</Button>
}
/>
<TooltipPopup side="top">Copy update command</TooltipPopup>
</Tooltip>
) : (
<span role="img" aria-label="Update available" className="inline-flex shrink-0">
<ArrowUpCircleIcon className="size-3.5 text-muted-foreground" />
</span>
)
) : null}
</span>
<span className="mt-0.5 flex items-start gap-1.5 text-[13px] leading-[1.45] text-muted-foreground/80">
@@ -637,7 +663,7 @@ export function ProviderInstanceCard({
</span>
</span>
</span>
</button>
</div>
<span className="flex h-5 shrink-0 items-center">
<Switch
checked={enabled}