From 9b58a7367a2f88a4fd4d0c274c3de44c20118dc7 Mon Sep 17 00:00:00 2001 From: Anna Effort Date: Thu, 24 Sep 2026 22:25:46 -0700 Subject: [PATCH 1/6] refactor: extract the presentational shell of the status indicator ServerStatusIndicator keeps the availability classification and the authorize branch, and composes ui/status-indicator for the icon, label and popover, so other surfaces can reuse the shape without the server status model. Names the popover content as well. Radix gives PopoverContent role=dialog without a name, and the trigger string ends in Show details, which reads as an instruction to open what is already open. Signed-off-by: Anna Effort --- .../servers/ServerStatusIndicator.tsx | 81 ++++++++--------- src/components/ui/status-indicator.test.tsx | 82 +++++++++++++++++ src/components/ui/status-indicator.tsx | 90 +++++++++++++++++++ src/i18n/locales/en-US/mcpServer.json | 1 + src/i18n/locales/es-ES/mcpServer.json | 1 + src/i18n/locales/pt-BR/mcpServer.json | 1 + 6 files changed, 210 insertions(+), 46 deletions(-) create mode 100644 src/components/ui/status-indicator.test.tsx create mode 100644 src/components/ui/status-indicator.tsx diff --git a/src/components/servers/ServerStatusIndicator.tsx b/src/components/servers/ServerStatusIndicator.tsx index 99cebf06..1d029bd5 100644 --- a/src/components/servers/ServerStatusIndicator.tsx +++ b/src/components/servers/ServerStatusIndicator.tsx @@ -1,7 +1,7 @@ import { useState } from "react"; import { useIntl } from "react-intl"; -import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { StatusIndicator } from "@/components/ui/status-indicator"; import { cn } from "@/lib/utils"; import { getAvailabilityPresentation, @@ -61,32 +61,18 @@ export function ServerStatusIndicator({ const fullLabel = intl.formatMessage({ id: presentation.labelId }); const isAbbreviated = compact && presentation.shortLabelId !== presentation.labelId; - const icon = ( -