From c1dad1a5ae52311ca88f3b001ae70cef5777bc59 Mon Sep 17 00:00:00 2001 From: findthelorax Date: Wed, 22 Apr 2026 08:49:58 -0400 Subject: [PATCH] reduces clickable space to the external link icon and the service name and added a tooltip to show truncated paths at the pointer --- .../src/components/panels/DetailPanel.tsx | 105 ++++++++++++------ 1 file changed, 74 insertions(+), 31 deletions(-) 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 && ( -