diff --git a/frontend/src/components/panels/DetailPanel.tsx b/frontend/src/components/panels/DetailPanel.tsx
index 43a2ad0..b90eb9e 100644
--- a/frontend/src/components/panels/DetailPanel.tsx
+++ b/frontend/src/components/panels/DetailPanel.tsx
@@ -671,27 +671,53 @@ function ServiceBadge({ svc, host, onEdit, onRemove }: { svc: ServiceInfo; host?
const pathMaxWidth = Math.max(0, maxTotalWidth - nameWidth - 60);
const showPath = pathLabel && pathMaxWidth > 30;
+ const [tooltip, setTooltip] = useState<{ visible: boolean; x: number; y: number; text: string }>({ visible: false, x: 0, y: 0, text: '' });
+
return (
-
- {svc.service_name}
-
+ {url ? (
+
e.stopPropagation()}
+ >
+ {svc.service_name}
+
+ ) : (
+
+ {svc.service_name}
+
+ )}
{showPath && (
{
+ if (e.currentTarget.offsetWidth < e.currentTarget.scrollWidth) {
+ setTooltip({ visible: true, x: e.clientX, y: e.clientY, text: pathLabel });
+ }
+ }}
+ onMouseMove={e => {
+ setTooltip(t => t.visible ? { ...t, x: e.clientX, y: e.clientY } : t);
+ }}
+ onMouseLeave={() => setTooltip(t => ({ ...t, visible: false }))}
tabIndex={0}
aria-label={pathLabel}
>
@@ -701,9 +727,22 @@ function ServiceBadge({ svc, host, onEdit, onRemove }: { svc: ServiceInfo; host?
{hasPort && (
{portLabel}/{svc.protocol}
)}
-
- {url ? : }
-
+ {url ? (
+ e.stopPropagation()}
+ >
+
+
+ ) : (
+
+ )}
- {url && (
-
- )}
+
+ {tooltip.visible && (
+
+ {tooltip.text}
+
+ )}
);
}