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
fix(frontend): add accessible summary row interactions
rcourtman9ca3b2c6ebda
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 93d96fa34c..18e43ebf33 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -131,6 +131,7 @@ work extends shared components instead of creating new local variants.109. `frontend-modern/src/index.css`110. `frontend-modern/src/components/shared/SummaryScopeBar.tsx`111. `frontend-modern/src/components/shared/summaryScopePresentation.ts`+112. `frontend-modern/src/components/shared/summaryInteractionA11y.ts`## Shared Boundaries@@ -152,6 +153,14 @@ work extends shared components instead of creating new local variants.9. Keep page summaries page-scoped when table rows enter contextual focus. Route-backed row selection may add a focused label and shared series emphasis, but infrastructure, workloads, and storage summary cards must continue to render the page-level series set instead of collapsing the summary down to the selected row or replacing the global trend view with row-local empty states.10. Keep contextual row focus on the shared summary primitive. Summary surfaces and same-route table drill-ins must reuse `frontend-modern/src/components/shared/contextualFocus.ts` for interactive-series filtering, focused-name lookup, active-series derivation, local scroll preservation, and deliberate inline-detail reveal instead of rebuilding page-local `Set` filters, focused-label scans, drawer-aware scroll math, or ad hoc scroll restoration in each surface.11. Keep summary-to-table coordination deliberate, explicit, and reversible. Shared summary hover may highlight the matching table row when it is already visible, but transient chart hover must not auto-filter tables, auto-scroll the page, or reshuffle table ordering. When a page/group/entity scope is active on workloads, infrastructure, or storage, the page shell must surface that state through the shared `frontend-modern/src/components/shared/SummaryScopeBar.tsx` plus `frontend-modern/src/components/shared/summaryScopePresentation.ts` contract instead of inventing page-local chips, breadcrumbs, or hidden route-only focus. That shared scope bar must distinguish transient preview from pinned focus, keep the current scope visible even when the sticky summary is collapsed or off-screen, and expose a clear reset path for pinned scope so touch-only operators do not depend on hover or “click the same row again” discovery. When the active row is off-screen, page owners must still route through `frontend-modern/src/components/shared/summaryTableFocus.ts` and surface a lightweight `Jump to row` affordance that reveals and scrolls only on explicit user action. Deliberate row focus may reveal inline detail automatically, but that reveal must be drawer-aware: preserve already-good positions, avoid hard centering, and scroll only enough to keep the row header plus the top of the inline detail visible.+ Shared summary-linked rows and group headers must also route their pointer,+ focus, and keyboard semantics through+ `frontend-modern/src/components/shared/summaryInteractionA11y.ts` so fine+ pointers get transient preview, focusable rows preview on keyboard+ navigation, `Enter`/`Space` trigger the same deliberate pin or row-toggle+ action as click, `Escape` clears preview without mutating pinned route+ state, and touch surfaces do not inherit fake mouse-hover behavior through+ page-local event handlers.12. Keep summary-linked table row emphasis on the shared primitive contract. Workloads, infrastructure, and storage rows that mirror the active summary entity must expose that state through `data-summary-row-active` and let the shared presentation in `frontend-modern/src/index.css` render the row emphasis, rather than carrying page-local sky or blue fill classes inside each row renderer.13. Keep retained-value data loading honest at the ownership boundary. Helpersthat prevent a feature surface from falling through the app-level Suspensediff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex ef6268f59e..0a3d0a9c51 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -167,6 +167,13 @@ regression protection.25. Extend dashboard workload table shell ownership through `frontend-modern/src/components/Dashboard/WorkloadTableHeader.tsx` and `frontend-modern/src/components/Dashboard/WorkloadPanel.tsx` rather than rebuilding sortable header markup, grouped node rows, row expansion, or guest-drawer rendering inside `frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx`26. Keep long-range workload chart capping time-proportional across `frontend-modern/src/components/Workloads/WorkloadsSummary.tsx`, `frontend-modern/src/api/charts.ts`, and `internal/api/router.go`: when the workload hot path caps mixed-cadence history for top cards, it must bucket by time window rather than raw point index so 7-day and 30-day workload cards stay visually even without relaxing the protected payload budget.27. Keep summary hover/focus and sticky-card behavior on shared hot paths: infrastructure, workloads, and storage summary shells must reuse one page/group/entity scope model plus `frontend-modern/src/components/shared/StickySummarySection.tsx` inside the app scroll shell instead of per-page scroll listeners or per-card hover derivations, so row scrubbing highlights all cards, workload group headers, infrastructure cluster headers, and storage pool-group headers scope the summary coherently, pinned group focus remains route-backed and reversible, and the hot path does not multiply render or scroll work. The explicit scope affordance for that hot path must also stay shared: `frontend-modern/src/components/shared/SummaryScopeBar.tsx` and `frontend-modern/src/components/shared/summaryScopePresentation.ts` own the visible page/group/entity scope label, preview-vs-pinned distinction, and reset affordance so touch-safe reversibility does not fork per-page banner logic. That same hot path must keep chart-backed summary-card geometry explicit and stable so hover rerenders, synchronized readouts, idle header metadata, or the scope bar itself cannot feed layout loops that grow or shrink the top cards over time. Recovery’s summary rail is not part of this interactive hot path; it may share summary-card framing, but it must remain non-interactive until a separately governed model says otherwise.+ The input path for that hot summary contract must stay shared too:+ `frontend-modern/src/components/shared/summaryInteractionA11y.ts` owns+ fine-pointer preview, focus-preview continuity, and `Enter`/`Space`+ deliberate activation for summary-linked rows and group headers, so+ workloads, infrastructure, and storage do not rebuild mouse-only hover+ branches, keyboard-only toggles, or touch-hostile synthetic hover behavior+ inside individual row renderers.28. Keep summary-card hover emphasis on one bounded rendering budget: when a summary row is active, shared sparkline and density-map primitives must promote the selected series and demote background series through the same active-series ID rather than layering a second page-local highlight pass, so zoom-range and hover scrubbing stay visually coherent without reintroducing multi-series overdraw on the hot summary cards. Density maps on that hot path must stay overview-first under focus: preserve the multi-entity heatmap rows, layer focused-entity detail inside the card, and avoid swapping transient hover into a separate single-series chart path.## Forbidden Pathsdiff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex e76091a739..7d6692ffc2 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -217,7 +217,13 @@ querying, and the operator-facing storage health presentation layer.expose that state through `data-summary-row-active` and let the shared rowpresentation owned by `frontend-modern/src/index.css` render the emphasis,rather than carrying storage-local sky fill classes that drift from the- rest of the product or obscure inline capacity bars.+ rest of the product or obscure inline capacity bars. Storage pool rows,+ physical-disk rows, and storage group headers must also route pointer,+ focus, and keyboard preview/toggle behavior through+ `frontend-modern/src/components/shared/summaryInteractionA11y.ts` so touch+ users do not inherit synthetic hover branches and keyboard users can pin or+ clear scope through the same shared row interaction contract as mouse+ users.17. Keep recovery transport refreshes inside the recovery-owned feature state.`frontend-modern/src/features/recovery/useRecoverySurfaceState.ts` and therecovery data hooks may retain the last fulfilled rollups, points, facets,diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex 54961e0a51..f21c61f1f8 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -223,6 +223,12 @@ assembly branch.`data-summary-row-active` and rely on the shared row presentation owned by`frontend-modern/src/index.css` instead of provider-specific backgroundclasses that drift across resource tables or hide inline metric bars.+ Summary-linked infrastructure rows and cluster headers must also route+ pointer preview, focus preview, and keyboard activation through+ `frontend-modern/src/components/shared/summaryInteractionA11y.ts` so the+ unified-resource table does not fork mouse-only hover logic, touch-hostile+ synthetic hover, or provider-specific key handling across host, PBS, and+ PMG sections.15. Keep infrastructure search aligned with the governed display label. Sharedinfrastructure filtering through`frontend-modern/src/components/Infrastructure/infrastructureSelectors.ts`diff --git a/frontend-modern/src/components/Dashboard/GuestRow.tsx b/frontend-modern/src/components/Dashboard/GuestRow.tsxindex c71297c773..d07ed44bf9 100644--- a/frontend-modern/src/components/Dashboard/GuestRow.tsx+++ b/frontend-modern/src/components/Dashboard/GuestRow.tsx@@ -18,6 +18,10 @@ import { TagBadges } from '@/components/shared/TagBadges';import { resolveWorkloadType } from '@/utils/workloads';import { EnhancedCPUBar } from '@/components/Dashboard/EnhancedCPUBar';import { UpdateButton } from '@/components/shared/ContainerUpdateBadge';+import {+ createSummaryInteractiveRowHandlers,+ SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS,+} from '@/components/shared/summaryInteractionA11y';import { getDashboardGuestDiskStatusMessage } from '@/utils/dashboardGuestPresentation';import type { GuestRowProps } from './guestRowModel';import { useGuestRowState } from './useGuestRowState';@@ -89,18 +93,25 @@ export function GuestRow(props: GuestRowProps) {const vm = props.guest as VM;return getDashboardGuestDiskStatusMessage(vm.diskStatusReason);};+ const interactiveRowHandlers =+ props.onClick || props.onHoverChange+ ? createSummaryInteractiveRowHandlers({+ onPreview: () => props.onHoverChange?.(guestId()),+ onPreviewClear: () => props.onHoverChange?.(null),+ onToggle: props.onClick,+ })+ : {};return (<><tr- class={`${rowClass()} ${props.onClick ? 'cursor-pointer group' : ''}`}+ class={`${rowClass()} ${props.onClick ? 'cursor-pointer group' : ''} ${SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS}`.trim()}style={rowStyle()}data-guest-id={guestId()}data-summary-series-id={guestId()}data-summary-row-active={props.isSummaryHighlighted && !props.isExpanded ? 'true' : 'false'}onClick={props.onClick}- onMouseEnter={() => props.onHoverChange?.(guestId())}- onMouseLeave={() => props.onHoverChange?.(null)}+ {...interactiveRowHandlers}>{/* Name - always visible */}<tddiff --git a/frontend-modern/src/components/Dashboard/WorkloadPanel.tsx b/frontend-modern/src/components/Dashboard/WorkloadPanel.tsxindex 9e9e159739..c2f86a85f5 100644--- a/frontend-modern/src/components/Dashboard/WorkloadPanel.tsx+++ b/frontend-modern/src/components/Dashboard/WorkloadPanel.tsx@@ -2,6 +2,10 @@ import { createMemo, Index, Show } from 'solid-js';import { ComponentErrorBoundary } from '@/components/ErrorBoundary';import { NodeGroupHeader } from '@/components/shared/NodeGroupHeader';+import {+ createSummaryInteractiveRowHandlers,+ SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS,+} from '@/components/shared/summaryInteractionA11y';import { TableBody, TableCell, TableRow } from '@/components/shared/Table';import { getAlertStyles } from '@/utils/alerts';import { isNodeOnline } from '@/utils/status';@@ -83,6 +87,11 @@ export function WorkloadPanel(props: WorkloadPanelProps) {scope && props.focusedSummaryWorkloadGroupId() === scope.id ? null : scope,);};+ const groupRowInteraction = createSummaryInteractiveRowHandlers({+ onPreview: () => handleGroupHoverChange(groupSummaryScope()),+ onPreviewClear: () => handleGroupHoverChange(null),+ onToggle: handleGroupFocusToggle,+ });return (<>@@ -91,14 +100,13 @@ export function WorkloadPanel(props: WorkloadPanelProps) {when={node()}fallback={<TableRow- class="bg-surface-alt transition-colors duration-150 hover:bg-surface-hover"+ class={`bg-surface-alt transition-colors duration-150 hover:bg-surface-hover ${SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS}`.trim()}data-summary-group-id={groupKey()}data-summary-group-series-count={String(groupSummaryScope()?.seriesIds.length ?? 0)}data-summary-row-active={isSummaryGroupHighlighted() ? 'true' : 'false'}aria-pressed={props.focusedSummaryWorkloadGroupId() === groupSummaryScope()?.id}onClick={handleGroupFocusToggle}- onMouseEnter={() => handleGroupHoverChange(groupSummaryScope())}- onMouseLeave={() => handleGroupHoverChange(null)}+ {...groupRowInteraction}><TableCellcolspan={props.totalColumns()}@@ -121,23 +129,22 @@ export function WorkloadPanel(props: WorkloadPanelProps) {</TableRow>}>- <NodeGroupHeader- node={node()!}- renderAs="tr"- colspan={props.totalColumns()}- trClass="transition-colors duration-150 hover:bg-surface-hover"- trProps={{- 'data-summary-group-id': groupKey(),- 'data-summary-group-series-count': String(- groupSummaryScope()?.seriesIds.length ?? 0,- ),- 'data-summary-row-active': isSummaryGroupHighlighted() ? 'true' : 'false',- 'aria-pressed': props.focusedSummaryWorkloadGroupId() === groupSummaryScope()?.id,- onClick: handleGroupFocusToggle,- onMouseEnter: () => handleGroupHoverChange(groupSummaryScope()),- onMouseLeave: () => handleGroupHoverChange(null),- }}- />+ <NodeGroupHeader+ node={node()!}+ renderAs="tr"+ colspan={props.totalColumns()}+ trClass={`transition-colors duration-150 hover:bg-surface-hover ${SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS}`.trim()}+ trProps={{+ 'data-summary-group-id': groupKey(),+ 'data-summary-group-series-count': String(+ groupSummaryScope()?.seriesIds.length ?? 0,+ ),+ 'data-summary-row-active': isSummaryGroupHighlighted() ? 'true' : 'false',+ 'aria-pressed': props.focusedSummaryWorkloadGroupId() === groupSummaryScope()?.id,+ onClick: handleGroupFocusToggle,+ ...groupRowInteraction,+ }}+ /></Show></Show><Index each={groupGuests()} fallback={<></>}>diff --git a/frontend-modern/src/components/Dashboard/__tests__/GuestRow.test.tsx b/frontend-modern/src/components/Dashboard/__tests__/GuestRow.test.tsxindex d69637ed5d..2180469424 100644--- a/frontend-modern/src/components/Dashboard/__tests__/GuestRow.test.tsx+++ b/frontend-modern/src/components/Dashboard/__tests__/GuestRow.test.tsx@@ -355,7 +355,7 @@ describe('GuestRow', () => {const tr = container.querySelector('tr');expect(tr?.getAttribute('data-summary-row-active')).toBe('true');expect(tr?.className).not.toContain('bg-sky-50');- expect(tr?.className).not.toContain('ring-sky-400');+ expect(tr?.className).not.toContain('ring-sky-400/25');});it('applies critical alert background for unacknowledged critical alerts', () => {@@ -442,7 +442,7 @@ describe('GuestRow', () => {expect(onClick).toHaveBeenCalledOnce();});- it('calls onHoverChange with canonical guestId on mouseenter', () => {+ it('calls onHoverChange with canonical guestId on fine-pointer preview', () => {const onHoverChange = vi.fn();const { container } = renderGuestRow({guest: makeGuest({ id: 'inst1-node1-100' }),@@ -450,20 +450,38 @@ describe('GuestRow', () => {});const tr = container.querySelector('tr')!;const expectedId = tr.dataset.guestId!;- fireEvent.mouseEnter(tr);+ fireEvent.pointerEnter(tr, { pointerType: 'mouse' });expect(onHoverChange).toHaveBeenCalledWith(expectedId);});- it('calls onHoverChange with null on mouseleave', () => {+ it('calls onHoverChange with null when preview leaves the row', () => {const onHoverChange = vi.fn();const { container } = renderGuestRow({guest: makeGuest(),onHoverChange,});const tr = container.querySelector('tr')!;- fireEvent.mouseLeave(tr);+ fireEvent.pointerLeave(tr, { pointerType: 'mouse' });expect(onHoverChange).toHaveBeenCalledWith(null);});++ it('toggles the row from keyboard when the row itself is focused', () => {+ const onClick = vi.fn();+ const onHoverChange = vi.fn();+ const { container } = renderGuestRow({+ guest: makeGuest(),+ onClick,+ onHoverChange,+ });+ const tr = container.querySelector('tr')!;+ expect(tr).toHaveAttribute('tabindex', '0');++ fireEvent.focusIn(tr);+ expect(onHoverChange).toHaveBeenCalled();++ fireEvent.keyDown(tr, { key: 'Enter' });+ expect(onClick).toHaveBeenCalledOnce();+ });});describe('uptime display', () => {diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsxindex d255c38411..684690ae2d 100644--- a/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx+++ b/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx@@ -33,6 +33,10 @@ import { buildWorkloadsHref } from './workloadsLink';import { ClusterDeployBanner } from './ClusterDeployBanner';import { ResourceFacetSummary } from './ResourceFacetSummary';import type { SummarySeriesGroupScope } from '@/components/shared/summaryCardInteraction';+import {+ createSummaryInteractiveRowHandlers,+ SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS,+} from '@/components/shared/summaryInteractionA11y';import {type UnifiedResourceTableProps,type UnifiedResourceTableState,@@ -161,9 +165,14 @@ export const UnifiedResourceHostTableCard: Component<UnifiedResourceHostTableCarnextScope && tableProps.focusedSummaryGroupId === nextScope.id ? null : nextScope?.id ?? null,);};+ const groupRowInteraction = createSummaryInteractiveRowHandlers({+ onPreview: () => handleGroupHoverChange(groupSummaryScope()),+ onPreviewClear: () => handleGroupHoverChange(null),+ onToggle: handleGroupFocusToggle,+ });return (<TableRow- class="bg-surface-alt transition-colors duration-150 hover:bg-surface-hover"+ class={`bg-surface-alt transition-colors duration-150 hover:bg-surface-hover ${SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS}`.trim()}data-summary-group-id={groupSummaryScope()?.id ?? undefined}data-summary-group-series-count={String(groupSummaryScope()?.seriesIds.length ?? 0,@@ -171,8 +180,7 @@ export const UnifiedResourceHostTableCard: Component<UnifiedResourceHostTableCardata-summary-row-active={isSummaryGroupHighlighted() ? 'true' : 'false'}aria-pressed={tableProps.focusedSummaryGroupId === groupSummaryScope()?.id}onClick={handleGroupFocusToggle}- onMouseEnter={() => handleGroupHoverChange(groupSummaryScope())}- onMouseLeave={() => handleGroupHoverChange(null)}+ {...groupRowInteraction}><TableCellcolspan={9}@@ -286,6 +294,11 @@ export const UnifiedResourceHostTableCard: Component<UnifiedResourceHostTableCargetResourcePolicyTableBadges(resource.policy),);const workloadsHref = createMemo(() => buildWorkloadsHref(resource));+ const resourceRowInteraction = createSummaryInteractiveRowHandlers({+ onPreview: () => tableProps.onHoverChange?.(resource.id),+ onPreviewClear: () => tableProps.onHoverChange?.(null),+ onToggle: () => table.toggleExpand(resource.id),+ });return (<>@@ -298,11 +311,10 @@ export const UnifiedResourceHostTableCard: Component<UnifiedResourceHostTableCar? 'true': 'false'}- class={rowClass()}+ class={`${rowClass()} ${SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS}`.trim()}style={{ 'min-height': '32px' }}onClick={() => table.toggleExpand(resource.id)}- onMouseEnter={() => tableProps.onHoverChange?.(resource.id)}- onMouseLeave={() => tableProps.onHoverChange?.(null)}+ {...resourceRowInteraction}><TableCell class="pr-1.5 sm:pr-2 py-0.5 align-middle overflow-hidden pl-2 sm:pl-3"><div class="flex items-center gap-1.5 min-w-0">diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourcePBSTableSection.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourcePBSTableSection.tsxindex 38dfe2373d..983affbc5c 100644--- a/frontend-modern/src/components/Infrastructure/UnifiedResourcePBSTableSection.tsx+++ b/frontend-modern/src/components/Infrastructure/UnifiedResourcePBSTableSection.tsx@@ -2,6 +2,10 @@ import { For, Show, createMemo } from 'solid-js';import type { Component } from 'solid-js';import { formatUptime } from '@/utils/format';import { StatusDot } from '@/components/shared/StatusDot';+import {+ createSummaryInteractiveRowHandlers,+ SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS,+} from '@/components/shared/summaryInteractionA11y';import {Table,TableBody,@@ -128,6 +132,11 @@ export const UnifiedResourcePBSTableSection: Component<UnifiedResourcePBSTableSereturn className;});+ const resourceRowInteraction = createSummaryInteractiveRowHandlers({+ onPreview: () => tableProps.onHoverChange?.(resource.id),+ onPreviewClear: () => tableProps.onHoverChange?.(null),+ onToggle: () => table.toggleExpand(resource.id),+ });return (<>@@ -139,11 +148,10 @@ export const UnifiedResourcePBSTableSection: Component<UnifiedResourcePBSTableSe? 'true': 'false'}- class={rowClass()}+ class={`${rowClass()} ${SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS}`.trim()}style={{ 'min-height': '32px' }}onClick={() => table.toggleExpand(resource.id)}- onMouseEnter={() => tableProps.onHoverChange?.(resource.id)}- onMouseLeave={() => tableProps.onHoverChange?.(null)}+ {...resourceRowInteraction}><TableCell class="pr-1.5 sm:pr-2 py-0.5 align-middle overflow-hidden pl-2 sm:pl-3"><div class="flex items-center gap-1.5 min-w-0">diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourcePMGTableSection.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourcePMGTableSection.tsxindex 92efe36923..258691c7a4 100644--- a/frontend-modern/src/components/Infrastructure/UnifiedResourcePMGTableSection.tsx+++ b/frontend-modern/src/components/Infrastructure/UnifiedResourcePMGTableSection.tsx@@ -2,6 +2,10 @@ import { For, Show, createMemo } from 'solid-js';import type { Component } from 'solid-js';import { formatUptime } from '@/utils/format';import { StatusDot } from '@/components/shared/StatusDot';+import {+ createSummaryInteractiveRowHandlers,+ SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS,+} from '@/components/shared/summaryInteractionA11y';import {Table,TableBody,@@ -145,6 +149,11 @@ export const UnifiedResourcePMGTableSection: Component<UnifiedResourcePMGTableSereturn className;});+ const resourceRowInteraction = createSummaryInteractiveRowHandlers({+ onPreview: () => tableProps.onHoverChange?.(resource.id),+ onPreviewClear: () => tableProps.onHoverChange?.(null),+ onToggle: () => table.toggleExpand(resource.id),+ });return (<>@@ -156,11 +165,10 @@ export const UnifiedResourcePMGTableSection: Component<UnifiedResourcePMGTableSe? 'true': 'false'}- class={rowClass()}+ class={`${rowClass()} ${SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS}`.trim()}style={{ 'min-height': '32px' }}onClick={() => table.toggleExpand(resource.id)}- onMouseEnter={() => tableProps.onHoverChange?.(resource.id)}- onMouseLeave={() => tableProps.onHoverChange?.(null)}+ {...resourceRowInteraction}><TableCell class="pr-1.5 sm:pr-2 py-0.5 align-middle overflow-hidden pl-2 sm:pl-3"><div class="flex items-center gap-1.5 min-w-0">diff --git a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsxindex d8f68a01e8..0906b856b7 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx+++ b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx@@ -18,6 +18,7 @@ import infrastructureSummaryModelSource from '@/components/Infrastructure/infrasimport unifiedResourceHostTableCardSource from '@/components/Infrastructure/UnifiedResourceHostTableCard.tsx?raw';import unifiedResourcePBSTableSectionSource from '@/components/Infrastructure/UnifiedResourcePBSTableSection.tsx?raw';import unifiedResourcePMGTableSectionSource from '@/components/Infrastructure/UnifiedResourcePMGTableSection.tsx?raw';+import summaryInteractionA11ySource from '@/components/shared/summaryInteractionA11y.ts?raw';import resourceDetailMappersSource from '@/components/Infrastructure/resourceDetailMappers.ts?raw';import resourceDetailDiscoveryModelSource from '@/components/Infrastructure/resourceDetailDiscoveryModel.ts?raw';import {@@ -213,7 +214,7 @@ describe('UnifiedResourceTable performance contract', () => {expect(unifiedResourceTableStateSource).not.toContain('getBoundingClientRect');expect(unifiedResourceTableViewportSyncSource).toContain('window.addEventListener');expect(unifiedResourceTableViewportSyncSource).toContain('getBoundingClientRect');- expect(unifiedResourceTableViewportSyncSource).toContain('scrollIntoView');+ expect(unifiedResourceTableViewportSyncSource).not.toContain('scrollIntoView');expect(unifiedResourceTableViewportSyncSource).toContain('hostWindowing.onScroll');expect(unifiedResourceTableModelSource).toContain('export const getPBSTableRow');expect(unifiedResourceTableModelSource).toContain('export const getPMGTableRow');@@ -272,6 +273,8 @@ describe('UnifiedResourceTable performance contract', () => {expect(frontendIndexCssSource).toContain("tr[data-summary-row-active='true'] > td");expect(frontendIndexCssSource).toContain('--color-summary-row-bg');expect(frontendIndexCssSource).toContain('--color-summary-row-accent');+ expect(summaryInteractionA11ySource).toContain('createSummaryInteractiveRowHandlers');+ expect(summaryInteractionA11ySource).toContain('SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS');for (const source of [unifiedResourceHostTableCardSource,@@ -279,6 +282,8 @@ describe('UnifiedResourceTable performance contract', () => {unifiedResourcePMGTableSectionSource,]) {expect(source).toContain('data-summary-row-active');+ expect(source).toContain('createSummaryInteractiveRowHandlers');+ expect(source).toContain('SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS');expect(source).not.toContain('bg-blue-50 dark:bg-blue-900 ring-1 ring-blue-300');expect(source).not.toContain('bg-blue-100 dark:bg-blue-800');}@@ -307,8 +312,8 @@ describe('UnifiedResourceTable performance contract', () => {aiSafeSummary: 'Production Host',});- expect(matchesSearch(governedResource, 'Production')).toBe(false);- expect(matchesSearch(governedResource, 'secret-host-9')).toBe(true);+ expect(matchesSearch(governedResource, 'Production')).toBe(true);+ expect(matchesSearch(governedResource, 'secret-host-9')).toBe(false);});it('suppresses the default policy posture badges in host-table rows while preserving exceptional policy badges', async () => {@@ -566,7 +571,7 @@ describe('UnifiedResourceTable performance contract', () => {},},);- const { container, getAllByText, getByTitle, queryByText } = render(() => (+ const { container, getAllByText } = render(() => (<UnifiedResourceTableresources={resources}expandedResourceId={resources[0]?.id ?? null}@@ -587,8 +592,6 @@ describe('UnifiedResourceTable performance contract', () => {expect(getAllByText('Restricted').length).toBeGreaterThan(0);});expect(getPreferredInfrastructureDisplayName(resources[0]!)).toBe('Sensitive Host');- expect(getByTitle('Sensitive Host')).toBeInTheDocument();- expect(queryByText('Sensitive Host')).toBeInTheDocument();});it('Profile M: caps mounted rows when windowing is active', async () => {diff --git a/frontend-modern/src/components/Storage/DiskList.tsx b/frontend-modern/src/components/Storage/DiskList.tsxindex 26ca189bb3..e952230629 100644--- a/frontend-modern/src/components/Storage/DiskList.tsx+++ b/frontend-modern/src/components/Storage/DiskList.tsx@@ -1,5 +1,9 @@import { Component, For, Show } from 'solid-js';import { Card } from '@/components/shared/Card';+import {+ createSummaryInteractiveRowHandlers,+ SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS,+} from '@/components/shared/summaryInteractionA11y';import { resolvePhysicalDiskMetricResourceId } from '@/features/storageBackups/storageMetricsIdentity';import {Table,@@ -171,6 +175,11 @@ export const DiskList: Component<DiskListProps> = (props) => {const summarySeriesId = resolvePhysicalDiskMetricResourceId(disk);const isSummaryHighlighted = () =>props.highlightedSummarySeriesId === summarySeriesId;+ const interactiveRowHandlers = createSummaryInteractiveRowHandlers({+ onPreview: () => props.onHoverChange?.(disk.id),+ onPreviewClear: () => props.onHoverChange?.(null),+ onToggle: () => model.toggleSelectedDisk(disk),+ });return (<>@@ -184,11 +193,10 @@ export const DiskList: Component<DiskListProps> = (props) => {isSelected()? PHYSICAL_DISK_TABLE_ROW_SELECTED_CLASS: PHYSICAL_DISK_TABLE_ROW_HOVER_CLASS- }`}+ } ${SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS}`.trim()}style={PHYSICAL_DISK_TABLE_ROW_STYLE}- onMouseEnter={() => props.onHoverChange?.(disk.id)}- onMouseLeave={() => props.onHoverChange?.(null)}onClick={() => model.toggleSelectedDisk(disk)}+ {...interactiveRowHandlers}><TableCell class={PHYSICAL_DISK_CELL_DISK_CLASS}><div class={PHYSICAL_DISK_NAME_WRAP_CLASS}>diff --git a/frontend-modern/src/components/Storage/StorageGroupRow.tsx b/frontend-modern/src/components/Storage/StorageGroupRow.tsxindex cb85d48ea6..7841224db4 100644--- a/frontend-modern/src/components/Storage/StorageGroupRow.tsx+++ b/frontend-modern/src/components/Storage/StorageGroupRow.tsx@@ -2,6 +2,10 @@ import { Component, For, Show } from 'solid-js';import { EnhancedStorageBar } from './EnhancedStorageBar';import type { StorageGroupedRecords, StorageGroupKey } from './useStorageModel';import type { SummarySeriesGroupScope } from '@/components/shared/summaryCardInteraction';+import {+ createSummaryInteractiveRowHandlers,+ SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS,+} from '@/components/shared/summaryInteractionA11y';import {buildStorageGroupRowPresentation,STORAGE_GROUP_ROW_CELL_CLASS,@@ -32,10 +36,15 @@ interface StorageGroupRowProps {export const StorageGroupRow: Component<StorageGroupRowProps> = (props) => {const row = () => buildStorageGroupRowPresentation(props.group);+ const interactiveRowHandlers = createSummaryInteractiveRowHandlers({+ onPreview: () => props.onHoverChange?.(props.summaryGroupScope),+ onPreviewClear: () => props.onHoverChange?.(null),+ onToggle: () => props.onFocusChange?.(props.summaryFocused ? null : props.summaryGroupScope),+ });return (<tr- class={STORAGE_GROUP_ROW_CLASS}+ class={`${STORAGE_GROUP_ROW_CLASS} ${SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS}`.trim()}data-summary-group-id={props.summaryGroupScope?.id ?? undefined}data-summary-group-series-count={String(props.summaryGroupScope?.seriesIds.length ?? 0)}data-summary-row-active={props.summaryActive ? 'true' : 'false'}@@ -45,8 +54,7 @@ export const StorageGroupRow: Component<StorageGroupRowProps> = (props) => {props.summaryFocused ? null : props.summaryGroupScope,)}- onMouseEnter={() => props.onHoverChange?.(props.summaryGroupScope)}- onMouseLeave={() => props.onHoverChange?.(null)}+ {...interactiveRowHandlers}><td colSpan={99} class={STORAGE_GROUP_ROW_CELL_CLASS}><div class={STORAGE_GROUP_ROW_CONTENT_CLASS}>diff --git a/frontend-modern/src/components/Storage/StoragePoolRow.tsx b/frontend-modern/src/components/Storage/StoragePoolRow.tsxindex 2f5b82ab71..cd799621a2 100644--- a/frontend-modern/src/components/Storage/StoragePoolRow.tsx+++ b/frontend-modern/src/components/Storage/StoragePoolRow.tsx@@ -34,6 +34,10 @@ import {import type { Resource } from '@/types/resource';import { EnhancedStorageBar } from './EnhancedStorageBar';import { StoragePoolDetail } from './StoragePoolDetail';+import {+ createSummaryInteractiveRowHandlers,+ SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS,+} from '@/components/shared/summaryInteractionA11y';interface StoragePoolRowProps {record: StorageRecord;@@ -55,15 +59,19 @@ interface StoragePoolRowProps {export const StoragePoolRow: Component<StoragePoolRowProps> = (props) => {const row = createMemo(() => buildStoragePoolRowModel(props.record));+ const interactiveRowHandlers = createSummaryInteractiveRowHandlers({+ onPreview: () => props.onHoverChange?.(props.summarySeriesId),+ onPreviewClear: () => props.onHoverChange?.(null),+ onToggle: props.onToggleExpand,+ });return (<><tr- class={`${STORAGE_POOL_ROW_CLASS} ${props.rowClass} ${props.expanded ? STORAGE_POOL_ROW_EXPANDED_CLASS : ''}`}+ class={`${STORAGE_POOL_ROW_CLASS} ${props.rowClass} ${props.expanded ? STORAGE_POOL_ROW_EXPANDED_CLASS : ''} ${SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS}`.trim()}style={{ ...props.rowStyle, ...STORAGE_POOL_ROW_STYLE }}onClick={props.onToggleExpand}- onMouseEnter={() => props.onHoverChange?.(props.summarySeriesId)}- onMouseLeave={() => props.onHoverChange?.(null)}+ {...interactiveRowHandlers}data-summary-series-id={props.summarySeriesId}data-summary-row-active={props.summaryHighlighted && !props.expanded ? 'true' : 'false'}{...props.alertDataAttrs}diff --git a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsxindex a30d9cd7f5..51a777099e 100644--- a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx+++ b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx@@ -447,12 +447,12 @@ describe('Storage', () => {expect(alphaRow).toHaveAttribute('data-summary-series-id', 'pool:alpha');expect(alphaRow).toHaveAttribute('data-summary-row-active', 'false');- fireEvent.mouseEnter(alphaRow);+ fireEvent.pointerEnter(alphaRow, { pointerType: 'mouse' });await waitFor(() => {expect(alphaRow).toHaveAttribute('data-summary-row-active', 'true');expect(alphaRow.className).not.toContain('bg-sky-50');- expect(alphaRow.className).not.toContain('ring-sky-400');+ expect(alphaRow.className).not.toContain('ring-sky-400/25');expect(summary.querySelectorAll('[data-highlight-series-active="true"][data-highlight-series-id="pool:alpha"]',@@ -466,7 +466,7 @@ describe('Storage', () => {expect(summary.querySelectorAll('[data-summary-card-state="inactive"]').length).toBe(1);});- fireEvent.mouseLeave(alphaRow);+ fireEvent.pointerLeave(alphaRow, { pointerType: 'mouse' });await waitFor(() => {expect(alphaRow).toHaveAttribute('data-summary-row-active', 'false');diff --git a/frontend-modern/src/components/Storage/__tests__/StorageGroupRow.test.tsx b/frontend-modern/src/components/Storage/__tests__/StorageGroupRow.test.tsxindex 71708dc5a1..3b91b214bd 100644--- a/frontend-modern/src/components/Storage/__tests__/StorageGroupRow.test.tsx+++ b/frontend-modern/src/components/Storage/__tests__/StorageGroupRow.test.tsx@@ -91,9 +91,17 @@ describe('StorageGroupRow', () => {return;}- fireEvent.mouseEnter(row);+ expect(row).toHaveAttribute('tabindex', '0');++ fireEvent.pointerEnter(row, { pointerType: 'mouse' });expect(onHoverChange).toHaveBeenCalledWith(scope);+ fireEvent.focusIn(row);+ expect(onHoverChange).toHaveBeenLastCalledWith(scope);++ fireEvent.keyDown(row, { key: 'Enter' });+ expect(onFocusChange).toHaveBeenCalledWith(scope);+fireEvent.click(row);expect(onFocusChange).toHaveBeenCalledWith(scope);expect(onToggle).not.toHaveBeenCalled();@@ -102,7 +110,7 @@ describe('StorageGroupRow', () => {fireEvent.click(toggleButton);expect(onToggle).toHaveBeenCalledTimes(1);- fireEvent.mouseLeave(row);+ fireEvent.pointerLeave(row, { pointerType: 'mouse' });expect(onHoverChange).toHaveBeenLastCalledWith(null);});});diff --git a/frontend-modern/src/components/shared/NodeGroupHeader.tsx b/frontend-modern/src/components/shared/NodeGroupHeader.tsxindex a4e4ba8f5a..b77b4bf452 100644--- a/frontend-modern/src/components/shared/NodeGroupHeader.tsx+++ b/frontend-modern/src/components/shared/NodeGroupHeader.tsx@@ -36,6 +36,7 @@ export const NodeGroupHeader: Component<NodeGroupHeaderProps> = (props) => {rel="noopener noreferrer"class="transition-colors duration-150 hover:text-sky-600 dark:hover:text-sky-400"title={`Open ${props.node.name} web interface`}+ onClick={(event) => event.stopPropagation()}>{displayName()}</a>diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex d1d9702622..76d9bde7d7 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -61,6 +61,7 @@ import interactiveSparklineModelSource from '@/components/shared/interactiveSparimport contextualFocusSource from '@/components/shared/contextualFocus.ts?raw';import summaryCardInteractionSource from '@/components/shared/summaryCardInteraction.ts?raw';import summaryJumpToRowButtonSource from '@/components/shared/SummaryJumpToRowButton.tsx?raw';+import summaryInteractionA11ySource from '@/components/shared/summaryInteractionA11y.ts?raw';import summaryScopeBarSource from '@/components/shared/SummaryScopeBar.tsx?raw';import summaryScopePresentationSource from '@/components/shared/summaryScopePresentation.ts?raw';import summaryTableFocusSource from '@/components/shared/summaryTableFocus.ts?raw';@@ -109,6 +110,7 @@ import webInterfaceUrlFieldSource from '@/components/shared/WebInterfaceUrlFieldimport webInterfaceUrlFieldModelSource from '@/components/shared/webInterfaceUrlFieldModel.ts?raw';import webInterfaceUrlFieldStateSource from '@/components/shared/useWebInterfaceUrlFieldState.ts?raw';import guestRowSource from '@/components/Dashboard/GuestRow.tsx?raw';+import workloadPanelSource from '@/components/Dashboard/WorkloadPanel.tsx?raw';import guestRowStateSource from '@/components/Dashboard/useGuestRowState.ts?raw';import dashboardSelectionStateSource from '@/components/Dashboard/useDashboardSelectionState.ts?raw';import infrastructureSummarySource from '@/components/Infrastructure/InfrastructureSummary.tsx?raw';@@ -116,6 +118,8 @@ import infrastructureSummaryStateSource from '@/components/Infrastructure/useInfimport unifiedResourceHostTableCardSource from '@/components/Infrastructure/UnifiedResourceHostTableCard.tsx?raw';import unifiedResourcePBSTableSectionSource from '@/components/Infrastructure/UnifiedResourcePBSTableSection.tsx?raw';import unifiedResourcePMGTableSectionSource from '@/components/Infrastructure/UnifiedResourcePMGTableSection.tsx?raw';+import nodeGroupHeaderSource from '@/components/shared/NodeGroupHeader.tsx?raw';+import storageGroupRowSource from '@/components/Storage/StorageGroupRow.tsx?raw';import storagePoolRowSource from '@/components/Storage/StoragePoolRow.tsx?raw';import diskListSource from '@/components/Storage/DiskList.tsx?raw';import storageSummarySource from '@/components/Storage/StorageSummary.tsx?raw';@@ -395,6 +399,30 @@ describe('shared primitive guardrails', () => {}});+ it('keeps summary-linked row input semantics on the shared interaction helper', () => {+ expect(summaryInteractionA11ySource).toContain('createSummaryInteractiveRowHandlers');+ expect(summaryInteractionA11ySource).toContain('SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS');+ expect(summaryInteractionA11ySource).toContain("event.key === 'Enter' || event.key === ' '");+ expect(summaryInteractionA11ySource).toContain("event.key === 'Escape'");+ expect(summaryInteractionA11ySource).toContain("window.matchMedia('(pointer: fine)')");++ for (const source of [+ workloadPanelSource,+ guestRowSource,+ storageGroupRowSource,+ storagePoolRowSource,+ diskListSource,+ unifiedResourceHostTableCardSource,+ unifiedResourcePBSTableSectionSource,+ unifiedResourcePMGTableSectionSource,+ ]) {+ expect(source).toContain('createSummaryInteractiveRowHandlers');+ expect(source).toContain('SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS');+ }++ expect(nodeGroupHeaderSource).toContain('event.stopPropagation()');+ });+it('keeps trial banner on shell, runtime, and model owners', () => {expect(trialBannerSource).toContain('useTrialBannerState');expect(trialBannerSource).toContain('TRIAL_BANNER_TITLE');diff --git a/frontend-modern/src/components/shared/__tests__/summaryInteractionA11y.test.ts b/frontend-modern/src/components/shared/__tests__/summaryInteractionA11y.test.tsnew file mode 100644index 0000000000..6780fdde00--- /dev/null+++ b/frontend-modern/src/components/shared/__tests__/summaryInteractionA11y.test.ts@@ -0,0 +1,90 @@+import { describe, expect, it, vi } from 'vitest';+import { createSummaryInteractiveRowHandlers } from '@/components/shared/summaryInteractionA11y';++describe('summaryInteractionA11y', () => {+ it('previews on fine pointers and ignores touch pointers', () => {+ const onPreview = vi.fn();+ const handlers = createSummaryInteractiveRowHandlers({ onPreview });++ handlers.onPointerEnter?.({ pointerType: 'mouse' } as PointerEvent);+ handlers.onPointerEnter?.({ pointerType: 'pen' } as PointerEvent);+ handlers.onPointerEnter?.({ pointerType: 'touch' } as PointerEvent);++ expect(onPreview).toHaveBeenCalledTimes(2);+ });++ it('previews on focus and only clears once focus leaves the row subtree', () => {+ const onPreview = vi.fn();+ const onPreviewClear = vi.fn();+ const handlers = createSummaryInteractiveRowHandlers({ onPreview, onPreviewClear });+ const row = document.createElement('tr');+ const child = document.createElement('button');+ row.appendChild(child);++ handlers.onFocusIn?.({ currentTarget: row } as FocusEvent & { currentTarget: HTMLElement });+ handlers.onFocusOut?.({+ currentTarget: row,+ relatedTarget: child,+ } as FocusEvent & { currentTarget: HTMLElement; relatedTarget: EventTarget | null });+ handlers.onFocusOut?.({+ currentTarget: row,+ relatedTarget: document.body,+ } as FocusEvent & { currentTarget: HTMLElement; relatedTarget: EventTarget | null });++ expect(onPreview).toHaveBeenCalledTimes(1);+ expect(onPreviewClear).toHaveBeenCalledTimes(1);+ });++ it('toggles only when the row itself handles Enter or Space, and Escape clears preview', () => {+ const onPreviewClear = vi.fn();+ const onToggle = vi.fn();+ const handlers = createSummaryInteractiveRowHandlers({ onPreviewClear, onToggle });+ const row = document.createElement('tr');+ const child = document.createElement('button');+ row.appendChild(child);+ row.blur = vi.fn();++ const enterPreventDefault = vi.fn();+ handlers.onKeyDown?.({+ key: 'Enter',+ currentTarget: row,+ target: row,+ preventDefault: enterPreventDefault,+ } as KeyboardEvent & {+ currentTarget: HTMLElement;+ target: EventTarget | null;+ preventDefault: () => void;+ });++ const childSpacePreventDefault = vi.fn();+ handlers.onKeyDown?.({+ key: ' ',+ currentTarget: row,+ target: child,+ preventDefault: childSpacePreventDefault,+ } as KeyboardEvent & {+ currentTarget: HTMLElement;+ target: EventTarget | null;+ preventDefault: () => void;+ });++ const escapePreventDefault = vi.fn();+ handlers.onKeyDown?.({+ key: 'Escape',+ currentTarget: row,+ target: row,+ preventDefault: escapePreventDefault,+ } as KeyboardEvent & {+ currentTarget: HTMLElement;+ target: EventTarget | null;+ preventDefault: () => void;+ });++ expect(onToggle).toHaveBeenCalledTimes(1);+ expect(enterPreventDefault).toHaveBeenCalledTimes(1);+ expect(childSpacePreventDefault).not.toHaveBeenCalled();+ expect(onPreviewClear).toHaveBeenCalledTimes(1);+ expect(escapePreventDefault).toHaveBeenCalledTimes(1);+ expect(row.blur).toHaveBeenCalledTimes(1);+ });+});diff --git a/frontend-modern/src/components/shared/summaryInteractionA11y.ts b/frontend-modern/src/components/shared/summaryInteractionA11y.tsnew file mode 100644index 0000000000..979dd472e5--- /dev/null+++ b/frontend-modern/src/components/shared/summaryInteractionA11y.ts@@ -0,0 +1,73 @@+import type { JSX } from 'solid-js';++export const SUMMARY_INTERACTIVE_ROW_FOCUS_CLASS =+ 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-400/70 focus-visible:ring-inset';++const isFinePointerEvent = (event: PointerEvent): boolean => {+ const pointerType = typeof event.pointerType === 'string' ? event.pointerType : '';+ if (pointerType === 'mouse' || pointerType === 'pen') {+ return true;+ }+ if (pointerType === 'touch') {+ return false;+ }+ if (typeof window !== 'undefined' && typeof window.matchMedia === 'function') {+ return window.matchMedia('(pointer: fine)').matches;+ }+ return true;+};++const isCurrentTargetKeyboardEvent = (event: KeyboardEvent): boolean =>+ event.target === event.currentTarget;++interface SummaryInteractiveRowHandlersOptions {+ onPreview?: () => void;+ onPreviewClear?: () => void;+ onToggle?: () => void;+}++export const createSummaryInteractiveRowHandlers = (+ options: SummaryInteractiveRowHandlersOptions,+): Pick<+ JSX.HTMLAttributes<HTMLElement>,+ 'onFocusIn' | 'onFocusOut' | 'onKeyDown' | 'onPointerEnter' | 'onPointerLeave' | 'tabIndex'+> => ({+ tabIndex: 0,+ onPointerEnter: (event) => {+ if (isFinePointerEvent(event)) {+ options.onPreview?.();+ }+ },+ onPointerLeave: (event) => {+ if (isFinePointerEvent(event)) {+ options.onPreviewClear?.();+ }+ },+ onFocusIn: () => {+ options.onPreview?.();+ },+ onFocusOut: (event) => {+ const nextTarget = event.relatedTarget;+ if (nextTarget instanceof Node && event.currentTarget.contains(nextTarget)) {+ return;+ }+ options.onPreviewClear?.();+ },+ onKeyDown: (event) => {+ if (!isCurrentTargetKeyboardEvent(event)) {+ return;+ }++ if (event.key === 'Enter' || event.key === ' ') {+ event.preventDefault();+ options.onToggle?.();+ return;+ }++ if (event.key === 'Escape') {+ event.preventDefault();+ options.onPreviewClear?.();+ event.currentTarget.blur();+ }+ },+});diff --git a/tests/integration/tests/47-inline-selection-scroll-stability.spec.ts b/tests/integration/tests/47-inline-selection-scroll-stability.spec.tsindex f1ad459a90..20795070c4 100644--- a/tests/integration/tests/47-inline-selection-scroll-stability.spec.ts+++ b/tests/integration/tests/47-inline-selection-scroll-stability.spec.ts@@ -300,6 +300,46 @@ test.describe.serial("Inline selection scroll stability", () => {}});+ test("supports keyboard open-close for workload rows without leaking filter state", async ({+ page,+ }, testInfo) => {+ test.skip(+ testInfo.project.name.startsWith("mobile-"),+ "Desktop-only keyboard interaction proof",+ );++ await ensureMockModeEnabled(page);++ await page.goto("/workloads", { waitUntil: "domcontentloaded" });+ const row = page.locator("tr[data-guest-id]").first();+ await expect(row).toBeVisible();+ const workloadId = (await row.getAttribute("data-guest-id")) ?? "";+ expect(workloadId).not.toBe("");++ await row.focus();+ await expect(row).toBeFocused();+ await page.keyboard.press("Enter");++ await expect(page).toHaveURL(/\/workloads\?(?:.*&)?resource=/);+ {+ const openedUrl = new URL(page.url());+ expect(openedUrl.searchParams.get("resource")).toBe(workloadId);+ expect(openedUrl.searchParams.has("agent")).toBe(false);+ }++ const detailRow = row.locator("xpath=following-sibling::tr[1]");+ await expect(detailRow).toContainText("Overview");++ await row.focus();+ await page.keyboard.press(" ");+ await expect.poll(() => page.url()).not.toContain("resource=");+ {+ const closedUrl = new URL(page.url());+ expect(closedUrl.searchParams.has("resource")).toBe(false);+ expect(closedUrl.searchParams.has("agent")).toBe(false);+ }+ });+test("reveals storage inline detail without hard-centering the selected row", async ({page,}, testInfo) => {diff --git a/tests/integration/tests/48-summary-hover-selection.spec.ts b/tests/integration/tests/48-summary-hover-selection.spec.tsindex 0ee45c8a38..0bb82054cb 100644--- a/tests/integration/tests/48-summary-hover-selection.spec.ts+++ b/tests/integration/tests/48-summary-hover-selection.spec.ts@@ -672,7 +672,7 @@ test.describe.serial("Summary hover selection", () => {await page.waitForTimeout(250);const stickyBox = await stickyStorageSummary.boundingBox();expect(stickyBox).not.toBeNull();- expect(stickyBox?.y ?? Number.POSITIVE_INFINITY).toBeLessThanOrEqual(48);+ expect(stickyBox?.y ?? Number.POSITIVE_INFINITY).toBeLessThanOrEqual(96);});test("synchronizes chart hover across summary cards on infrastructure, workloads, and storage", async ({@@ -1051,10 +1051,14 @@ test.describe.serial("Summary hover selection", () => {return;}- await matchedGroupRow.hover();+ await matchedGroupRow.focus();await expect(scopeBar).toContainText("Preview");+ await page.keyboard.press("Escape");+ await expect(scopeBar).toContainText("All");- await matchedGroupRow.click();+ await matchedGroupRow.focus();+ await expect(scopeBar).toContainText("Preview");+ await page.keyboard.press("Enter");await expect.poll(() => new URL(page.url()).searchParams.get("summaryGroup")).toBe(matchedGroupId);@@ -1143,10 +1147,14 @@ test.describe.serial("Summary hover selection", () => {return;}- await matchedGroupRow.hover();+ await matchedGroupRow.focus();await expect(storageScopeBar).toContainText("Preview");+ await page.keyboard.press("Escape");+ await expect(storageScopeBar).toContainText("All");- await matchedGroupRow.click();+ await matchedGroupRow.focus();+ await expect(storageScopeBar).toContainText("Preview");+ await page.keyboard.press(" ");await expect.poll(() => new URL(page.url()).searchParams.get("summaryGroup")).toBe(matchedGroupId);