fix: replace native SVG tooltip with styled heatmap tooltip overlay
Some checks failed
CI / build (push) Successful in 2m12s
CI / cleanup-branch (push) Has been skipped
CI / deploy (push) Has been cancelled
CI / deploy-feature (push) Has been cancelled
CI / docker (push) Has been cancelled

Renders an HTML tooltip below hovered diagram nodes with processor
metrics (avg, p99, % time, invocations, error rate). Styled inline
with the existing NodeToolbar pattern — positioned via screen-space
coordinates, uses DS tokens for background/border/shadow/typography.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-12 22:03:05 +02:00
parent 00c9a0006e
commit aaf9a00d67
3 changed files with 79 additions and 12 deletions

View File

@@ -102,18 +102,6 @@ export function DiagramNode({
style={{ cursor: 'pointer' }}
opacity={isSkipped ? 0.35 : undefined}
>
{/* Processor metrics tooltip */}
{heatmapEntry && (
<title>{[
`${node.id}${heatmapEntry.processorType ? ` (${heatmapEntry.processorType})` : ''}`,
`Avg: ${heatmapEntry.avgDurationMs.toLocaleString(undefined, { maximumFractionDigits: 3 })}ms`,
`P99: ${heatmapEntry.p99DurationMs.toLocaleString(undefined, { maximumFractionDigits: 3 })}ms`,
`Time: ${heatmapEntry.pctOfRoute.toFixed(1)}%`,
heatmapEntry.totalCount != null ? `Invocations: ${heatmapEntry.totalCount.toLocaleString()}` : '',
heatmapEntry.errorRate != null ? `Errors: ${(heatmapEntry.errorRate * 100).toFixed(2)}%` : '',
].filter(Boolean).join('\n')}</title>
)}
{/* Selection ring */}
{isSelected && (
<rect