fix(web): environment status tooltip resizes when the status changes (#13845)

This commit is contained in:
Bear Huddleston authored and GitHub committed 2026-09-26 22:29:54 -05:00
1 parent cb97415948
commit ab099178a7
1 file changed
+16 -8
@@ -1549,6 +1549,18 @@ function SavedBackendListRow({
versionMismatch !== null &&
(serverUpdateState.status === "idle" || serverUpdateState.status === "failed");
const statusTooltip = `${
unsupported
? (environment.connection.error ?? connectionStatusText(environment.connection))
: enabled
? connectionStatusText(environment.connection)
: "Switched off"
}${
versionMismatch
? `\nUpdate available: ${versionMismatch.serverVersion} → ${versionMismatch.clientVersion}`
: ""
}`;
return (
<EnvironmentRow
kind={machineKind}
@@ -1556,7 +1568,10 @@ function SavedBackendListRow({
dimmed={!enabled}
subtitle={
<Tooltip>
{/* The status can change while the tooltip is open, and base-ui only
re-measures the popup when the trigger's payload changes. */}
<TooltipTrigger
payload={statusTooltip}
render={
<span
className={cn(
@@ -1569,14 +1584,7 @@ function SavedBackendListRow({
{subtitleText}
</TooltipTrigger>
<TooltipPopup side="top" className="whitespace-pre-wrap">
{unsupported
? (environment.connection.error ?? connectionStatusText(environment.connection))
: enabled
? connectionStatusText(environment.connection)
: "Switched off"}
{versionMismatch
? `\nUpdate available: ${versionMismatch.serverVersion} → ${versionMismatch.clientVersion}`
: ""}
{statusTooltip}
</TooltipPopup>
</Tooltip>
}