Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Offset summary chart hover tooltips
rcourtmandf1a983540b0
diff --git a/docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-summary-sparkline-tooltip-2026-05-01.md b/docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-summary-sparkline-tooltip-2026-05-01.mdnew file mode 100644index 0000000000..a2297a136e--- /dev/null+++ b/docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-summary-sparkline-tooltip-2026-05-01.md@@ -0,0 +1,56 @@+# Known RC Issue Closure For GA Summary Sparkline Tooltip Record++- Date: `2026-05-01`+- Gate: `known-rc-issue-closure-for-ga`+- Result: `passed`++## Context++Issue `#1452` reported that graph hover tooltips could overlap the highlighted+graph point and make the selected chart area hard to inspect. The screenshots+attached to the issue showed the tooltip covering the vertical hover guide on+v5 chart surfaces.++The earlier RC3 follow-up fixed the shared history-chart tooltip, but browser+inspection of the v6 Workloads route showed the same overlap class still+affected shared summary sparklines. The Workloads summary charts are owned by+`frontend-modern/src/components/shared/InteractiveSparkline.tsx` and+`frontend-modern/src/components/shared/interactiveSparklineModel.ts`, not the+history-chart model.++## Disposition++The v6 candidate now side-offsets summary sparkline tooltips through the shared+sparkline model boundary:++- `interactiveSparklineModel.ts` derives a side anchor from the hovered cursor,+ a fixed tooltip gap, the known tooltip width, and the viewport width.+- `InteractiveSparkline.tsx` renders the portal tooltip with left alignment so+ the model-owned side anchor is respected by the shared tooltip shell.+- Near the right viewport edge, the model flips the tooltip to the left of the+ cursor instead of letting the scrub guide fall under the tooltip.+- Shared primitive guardrails now assert that summary sparkline tooltip+ placement stays in the shared sparkline model and portal contract.++## Proof++- From `frontend-modern`: `npm exec vitest run src/components/shared/__tests__/InteractiveSparkline.test.tsx src/components/shared/SharedPrimitives.guardrails.test.ts`+- Desktop Playwright proof on `http://127.0.0.1:5173/workloads` with the+ onboarding overlay disabled:+ - mouse x: `224.1`+ - tooltip left: `245.0`+ - tooltip right: `365.5`+ - `separated=true`+ - `guideInsideTooltip=false`+ - screenshot: `/tmp/pulse-issue-1452/after-tooltip-desktop.png`+- Narrow mobile Playwright smoke on `http://127.0.0.1:5173/workloads`:+ - `chartSurfaces=4`+ - `visibleChartSurfaces=0`+ - screenshot: `/tmp/pulse-issue-1452/after-tooltip-mobile.png`++## Outcome++The v6 candidate no longer knowingly carries the `#1452` tooltip-overlap+failure mode on shared summary sparklines. History-chart and summary-sparkline+tooltip paths both have RC3 evidence, and the remaining behavior is governed+through the `frontend-primitives` shared chart contract.diff --git a/docs/release-control/v6/internal/status.json b/docs/release-control/v6/internal/status.jsonindex 7c5f8c09a3..f4b3bdbeab 100644--- a/docs/release-control/v6/internal/status.json+++ b/docs/release-control/v6/internal/status.json@@ -4463,6 +4463,12 @@"kind": "file","evidence_tier": "managed-runtime-exercise"},+ {+ "repo": "pulse",+ "path": "docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-summary-sparkline-tooltip-2026-05-01.md",+ "kind": "file",+ "evidence_tier": "managed-runtime-exercise"+ },{"repo": "pulse","path": "docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-v5-129-delta-2026-05-01.md",diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex ed3ebad9da..8215d940bc 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -841,7 +841,7 @@ work extends shared components instead of creating new local variants.settings flows must present provider setup as BYOK/local/self-managed andmust not surface hosted-model credits, in-app trial starts, or genericmanaged-model claims.-19. Keep sparkline scrubbing source-local and sibling-sync timestamp-based. The chart a user is actively scrubbing in `frontend-modern/src/components/shared/InteractiveSparkline.tsx` and `frontend-modern/src/components/shared/useInteractiveSparklineState.ts` must keep its dashed hover cursor on the real local mouse `x`, while sibling cards may map the shared hover timestamp onto their own timelines. Shared cursor sync must not snap the source chart back onto the nearest sample timestamp, the rendered SVG/canvas hover cursor must bind to the actual numeric cursor coordinate rather than a boolean guard state, the time cursor must span the chart viewport instead of collapsing to the series height, and the hover tooltip must track the pointer instead of anchoring to the chart top edge while following the active theme rather than a hardcoded dark shell.+19. Keep sparkline scrubbing source-local and sibling-sync timestamp-based. The chart a user is actively scrubbing in `frontend-modern/src/components/shared/InteractiveSparkline.tsx` and `frontend-modern/src/components/shared/useInteractiveSparklineState.ts` must keep its dashed hover cursor on the real local mouse `x`, while sibling cards may map the shared hover timestamp onto their own timelines. Shared cursor sync must not snap the source chart back onto the nearest sample timestamp, the rendered SVG/canvas hover cursor must bind to the actual numeric cursor coordinate rather than a boolean guard state, the time cursor must span the chart viewport instead of collapsing to the series height, and the hover tooltip must track the pointer instead of anchoring to the chart top edge while following the active theme rather than a hardcoded dark shell. The hover tooltip must stay side-offset from the active scrub cursor and flip to the available side near viewport edges so it does not cover the highlighted guide or graph point.20. Keep shared contextual focus canonical after adoption. Once a summary or table surface enters route-backed contextual focus, future additions must extend `frontend-modern/src/components/shared/contextualFocus.ts` and its guardrail tests rather than forking another helper for workload IDs, resource IDs, or scroll-preserving same-route selection.21. Keep shared infrastructure/resource selectors on the canonical agent-facettruth. Shared primitives and settings-facing selector helpers must treat@@ -1436,7 +1436,8 @@ policy. Future sparkline work should extend those owners instead of pushingcanvas scheduling or chart-shape math back into the shared component shell.That same sparkline boundary now also owns floating tooltip shell routing:local hover tooltips must derive viewport anchor coordinates from the shared-runtime/model path and render through+runtime/model path, keep the tooltip beside rather than on top of the scrub+cursor, and render through`frontend-modern/src/components/shared/TooltipPortal.tsx`, not as HTML`foreignObject` shells inside the `preserveAspectRatio="none"` chart SVG wherecross-browser scaling can stretch the tooltip surface or drop its semanticdiff --git a/frontend-modern/src/components/shared/InteractiveSparkline.tsx b/frontend-modern/src/components/shared/InteractiveSparkline.tsxindex b5ad8a0bb6..ddba7188c9 100644--- a/frontend-modern/src/components/shared/InteractiveSparkline.tsx+++ b/frontend-modern/src/components/shared/InteractiveSparkline.tsx@@ -237,7 +237,7 @@ export const InteractiveSparkline: Component<InteractiveSparklineProps> = (props</div><Show when={sparkline.hoveredState()}>{(hover) => (- <TooltipPortal when={true} x={hover().tooltipX} y={hover().tooltipY}>+ <TooltipPortal when={true} x={hover().tooltipX} y={hover().tooltipY} align="left"><divdata-sparkline-tooltip="true"class={`max-w-[220px] text-[10px] ${diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex 160a7b121d..3a8344d72a 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -1069,7 +1069,8 @@ describe('shared primitive guardrails', () => {expect(interactiveSparklineModelSource).toContain('buildInteractiveSparklineChartData');expect(interactiveSparklineModelSource).toContain('computeInteractiveSparklineHoverState');expect(interactiveSparklineModelSource).toContain('getInteractiveSparklineCursorXForTimestamp');- expect(interactiveSparklineModelSource).toContain('const tooltipX = chartRect.left + mouseX;');+ expect(interactiveSparklineModelSource).toContain('getInteractiveSparklineTooltipSideX');+ expect(interactiveSparklineSource).toContain('align="left"');expect(interactiveSparklineModelSource).toContain('const tooltipY = chartRect.top + mouseY - 6;',);diff --git a/frontend-modern/src/components/shared/__tests__/InteractiveSparkline.test.tsx b/frontend-modern/src/components/shared/__tests__/InteractiveSparkline.test.tsxindex d8aa771266..bb27e627ad 100644--- a/frontend-modern/src/components/shared/__tests__/InteractiveSparkline.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/InteractiveSparkline.test.tsx@@ -4,7 +4,12 @@ import { InteractiveSparkline } from '@/components/shared/InteractiveSparkline';import interactiveSparklineSource from '@/components/shared/InteractiveSparkline.tsx?raw';import interactiveSparklineModelSource from '@/components/shared/interactiveSparklineModel.ts?raw';import interactiveSparklineStateSource from '@/components/shared/useInteractiveSparklineState.ts?raw';-import { buildInteractiveSparklineSynchronizedReadout } from '@/components/shared/interactiveSparklineModel';+import {+ buildInteractiveSparklineChartData,+ buildInteractiveSparklineSynchronizedReadout,+ computeInteractiveSparklineHoverState,+ getInteractiveSparklineTooltipSideX,+} from '@/components/shared/interactiveSparklineModel';describe('InteractiveSparkline hover behavior', () => {afterEach(() => {@@ -14,10 +19,12 @@ describe('InteractiveSparkline hover behavior', () => {});const mockImmediateRaf = () =>- vi.spyOn(window, 'requestAnimationFrame').mockImplementation((callback: FrameRequestCallback) => {- callback(0);- return 1;- });+ vi+ .spyOn(window, 'requestAnimationFrame')+ .mockImplementation((callback: FrameRequestCallback) => {+ callback(0);+ return 1;+ });it('keeps the sparkline on shell, runtime, and model owners', () => {expect(interactiveSparklineSource).toContain('useInteractiveSparklineState');@@ -26,10 +33,12 @@ describe('InteractiveSparkline hover behavior', () => {expect(interactiveSparklineSource).not.toContain('createEffect');expect(interactiveSparklineSource).not.toContain('createSignal');expect(interactiveSparklineSource).not.toContain('scheduleSparkline');+ expect(interactiveSparklineSource).toContain('align="left"');expect(interactiveSparklineStateSource).toContain('scheduleSparkline');expect(interactiveSparklineStateSource).toContain('createSignal');expect(interactiveSparklineModelSource).toContain('buildInteractiveSparklineChartData');expect(interactiveSparklineModelSource).toContain('computeInteractiveSparklineHoverState');+ expect(interactiveSparklineModelSource).toContain('getInteractiveSparklineTooltipSideX');});it('renders axis labels in fixed-size SVG shells so tick text does not stretch', () => {@@ -480,6 +489,83 @@ describe('InteractiveSparkline hover behavior', () => {expect(secondTop).toBeGreaterThan(firstTop);});+ it('offsets the tooltip beside the hover cursor so the scrub line remains visible', () => {+ vi.useFakeTimers();+ vi.setSystemTime(new Date('2024-01-01T12:00:00Z'));+ const now = Date.now();++ const chartData = buildInteractiveSparklineChartData({+ bridgeLeadingGap: false,+ series: [+ {+ name: 'CPU',+ color: '#ff0000',+ data: [+ { timestamp: now - 30_000, value: 40 },+ { timestamp: now - 10_000, value: 50 },+ ],+ },+ ],+ shouldUseCanvas: false,+ timeRange: '1h',+ vbH: 100,+ vbW: 200,+ yMode: 'percent',+ });+ const chartRect = {+ left: 100,+ top: 100,+ width: 260,+ height: 80,+ right: 360,+ bottom: 180,+ x: 100,+ y: 100,+ toJSON: () => ({}),+ } as DOMRect;++ const hover = computeInteractiveSparklineHoverState({+ chartData,+ chartRect,+ clientX: 220,+ clientY: 140,+ highlightNearestSeriesOnHover: false,+ lockedSeriesIndex: null,+ maxRows: 6,+ sortTooltipByValue: false,+ vbH: 100,+ vbW: 200,+ yMode: 'percent',+ });++ expect(hover).not.toBeNull();+ expect(hover?.x).toBeCloseTo((120 / 260) * 200, 3);+ expect(hover?.tooltipX).toBeGreaterThan(220 + 8);+ });++ it('moves the side tooltip left of the cursor near the viewport edge', () => {+ const chartRect = {+ left: 560,+ top: 100,+ width: 240,+ height: 80,+ right: 800,+ bottom: 180,+ x: 560,+ y: 100,+ toJSON: () => ({}),+ } as DOMRect;++ const cursorX = chartRect.left + 210;+ const tooltipX = getInteractiveSparklineTooltipSideX({+ chartRect,+ mouseX: 210,+ viewportWidth: 800,+ });++ expect(tooltipX).toBeLessThan(cursorX - 200);+ });+it('locks a hovered series on click and unlocks on second click', async () => {vi.useFakeTimers();vi.setSystemTime(new Date('2024-01-01T12:00:00Z'));diff --git a/frontend-modern/src/components/shared/interactiveSparklineModel.ts b/frontend-modern/src/components/shared/interactiveSparklineModel.tsindex 2d3e1da451..ff90f696dc 100644--- a/frontend-modern/src/components/shared/interactiveSparklineModel.ts+++ b/frontend-modern/src/components/shared/interactiveSparklineModel.ts@@ -76,6 +76,10 @@ interface HoverSeriesValue extends InteractiveSparklineDisplayValue {timestamp: number;}+const INTERACTIVE_SPARKLINE_TOOLTIP_GAP = 12;+const INTERACTIVE_SPARKLINE_TOOLTIP_MAX_WIDTH = 220;+const INTERACTIVE_SPARKLINE_VIEWPORT_PADDING = 4;+export const formatInteractiveSparklineHoverTime = (timestamp: number): string =>new Date(timestamp).toLocaleString([], {year: 'numeric',@@ -457,6 +461,37 @@ export const getInteractiveSparklineCursorXForTimestamp = ({return ((clampedTimestamp - chartData.windowStart) / chartData.rangeMs) * vbW;};+export const getInteractiveSparklineTooltipSideX = ({+ chartRect,+ mouseX,+ viewportWidth,+}: {+ chartRect: DOMRect;+ mouseX: number;+ viewportWidth?: number;+}): number => {+ const resolvedViewportWidth =+ viewportWidth ??+ (typeof window === 'undefined'+ ? chartRect.right+ : Math.max(chartRect.right, window.innerWidth));+ const absoluteCursorX = chartRect.left + mouseX;+ const rightX = absoluteCursorX + INTERACTIVE_SPARKLINE_TOOLTIP_GAP;+ const leftX =+ absoluteCursorX - INTERACTIVE_SPARKLINE_TOOLTIP_MAX_WIDTH - INTERACTIVE_SPARKLINE_TOOLTIP_GAP;+ const maxRight = Math.max(+ INTERACTIVE_SPARKLINE_VIEWPORT_PADDING,+ resolvedViewportWidth - INTERACTIVE_SPARKLINE_VIEWPORT_PADDING,+ );+ const canPlaceRight = rightX + INTERACTIVE_SPARKLINE_TOOLTIP_MAX_WIDTH <= maxRight;+ const canPlaceLeft = leftX >= INTERACTIVE_SPARKLINE_VIEWPORT_PADDING;++ if (canPlaceRight || !canPlaceLeft) {+ return rightX;+ }+ return leftX;+};+export const getInteractiveSparklineActiveEmphasisSeriesIndex = ({highlightNearestSeriesOnHover,lockedSeriesIndex,@@ -702,7 +737,7 @@ export const computeInteractiveSparklineHoverState = ({}const totalValues = focusedTooltip ? tooltipValues.length : values.length;- const tooltipX = chartRect.left + mouseX;+ const tooltipX = getInteractiveSparklineTooltipSideX({ chartRect, mouseX });const tooltipY = chartRect.top + mouseY - 6;return {