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): inline pinned scope and clear it from table whitespace
rcourtmanc1259154c4df
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 3f6deb99b8..5113e7acc8 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -154,7 +154,7 @@ work extends shared components instead of creating new local variants.8. Keep summary chart interaction identity on one shared helper. Summary surfaces that expose row-hover, group-hover, chart-hover, or route-focus-driven chart emphasis must derive page/group/entity scope through `frontend-modern/src/components/shared/summaryCardInteraction.ts` and pass that same resolved scope into card-state, sparkline, and density-map primitives, rather than letting cards read `hovered || focused` while charts listen to a different page-local ID source. Hovering one summary chart must promote that series into the shared active entity so sibling cards highlight the same object instead of keeping chart-local hover islands, and hovering or pinning a workload group header, infrastructure cluster header, or storage pool-group header must scope the matching summary cards through that same shared contract instead of forking a page-local summary filter path. Sibling cards should surface that synchronized hover as one compact header readout through the shared summary-card contract, while the chart under the pointer keeps the only floating tooltip. `frontend-modern/src/components/Recovery/RecoverySummary.tsx` is explicitly outside this interaction dialect: recovery posture cards may share summary framing, but they must not silently grow row/group/chart hover behavior without a separate governed product decision.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. Pinned page/group/entity scope on workloads, infrastructure, or storage must stay row-first: the pinned row or group header is the primary visible state while it remains on-screen, and the shared `frontend-modern/src/components/shared/SummaryScopeBar.tsx` plus `frontend-modern/src/components/shared/summaryScopePresentation.ts` contract may appear only as a compact fallback when that pinned target scrolls out of view. Page shells therefore must not reintroduce always-on scope banners, preview bars, page-local chips, breadcrumbs, or hidden route-only focus. 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: infrastructure and workload row toggles that already have the row in view must hand the current `.app-scroll-shell` position through `frontend-modern/src/utils/appShellScrollRestoration.ts` so the remounted shell in `frontend-modern/src/App.tsx` can reopen the inline detail without looking like a page refresh, and then still route through the shared reveal helper whenever the opened drawer would otherwise land below the fold. Same-route drawers must therefore scroll only enough to keep the row header plus the top of the inline detail visible, never hard-center the row just because the route state changed.+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. Pinned page/group/entity scope on workloads, infrastructure, or storage must stay row-first: the pinned row or group header is the primary visible state while it remains on-screen, and the shared `frontend-modern/src/components/shared/SummaryScopeBar.tsx` plus `frontend-modern/src/components/shared/summaryScopePresentation.ts` contract may appear only as a compact fallback when that pinned target scrolls out of view. That fallback belongs inside existing page-controls chrome through the search-row accessory or mobile trailing slot, not as a dedicated strip that burns extra vertical space or crowds the desktop filter row. Page shells therefore must not reintroduce always-on scope banners, preview bars, page-local chips, breadcrumbs, or hidden route-only focus. 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. That same shared table-focus owner now also owns whitespace clearing: clicking a governed `data-summary-clear-surface` background may clear pinned scope, but row cells, group headers, inline detail, and explicit controls must not accidentally clear it. Deliberate row focus may reveal inline detail automatically, but that reveal must be drawer-aware: infrastructure and workload row toggles that already have the row in view must hand the current `.app-scroll-shell` position through `frontend-modern/src/utils/appShellScrollRestoration.ts` so the remounted shell in `frontend-modern/src/App.tsx` can reopen the inline detail without looking like a page refresh, and then still route through the shared reveal helper whenever the opened drawer would otherwise land below the fold. Same-route drawers must therefore scroll only enough to keep the row header plus the top of the inline detail visible, never hard-center the row just because the route state changed.Shared summary-linked rows and group headers must also route their previewsemantics through`frontend-modern/src/components/shared/summaryInteractionA11y.ts`.@@ -166,7 +166,8 @@ work extends shared components instead of creating new local variants.table-row shims. Group headers are different: they may use the header rowitself as the deliberate pin target when that keeps the table chromenative, but they must not grow separate scope/pinned pill buttons beyond- the shared off-screen `SummaryScopeBar.tsx` fallback. Workloads, infrastructure,+ the shared off-screen `SummaryScopeBar.tsx` fallback inside the existing+ page controls row. Workloads, infrastructure,and storage must not rebuild row-as-button keyboard handling or trailingone-off expand columns once the shared action primitive exists.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. Group-scoped preview and pin must use that same shared presentation boundary: child rows that belong to a hovered or pinned summary group should expose `data-summary-group-member-active="preview|pinned"` so the block-level emphasis stays subtle, consistent, and reversible instead of each table inventing its own outline, badge, or full-strength fill treatment.diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex 62bf0dc6fa..602d9afebe 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -166,7 +166,7 @@ regression protection.24. Extend dashboard shell rendering through `frontend-modern/src/components/Dashboard/DashboardStateCards.tsx`, `frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx`, and `frontend-modern/src/components/Dashboard/DashboardStatsStrip.tsx` rather than accreting loading cards, workload table markup, or stats-strip presentation back into `frontend-modern/src/components/Dashboard/Dashboard.tsx`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, but it is now row-first rather than always-on chrome: `frontend-modern/src/components/shared/SummaryScopeBar.tsx` and `frontend-modern/src/components/shared/summaryScopePresentation.ts` own the compact off-screen pinned-scope fallback and clear affordance, while the on-screen row or group header remains the primary visible pinned state. That affordance must stay visually quiet and inline with the summary shell rather than reintroducing chip, badge, or banner chrome that competes with the charts themselves. 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.+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, but it is now row-first rather than always-on chrome: `frontend-modern/src/components/shared/SummaryScopeBar.tsx` and `frontend-modern/src/components/shared/summaryScopePresentation.ts` own the compact off-screen pinned-scope fallback and clear affordance, while the on-screen row or group header remains the primary visible pinned state. That affordance must stay visually quiet, single-line, and embedded in existing page-controls chrome, with desktop fallback detail living in the search row accessory rather than crowding the filter toolbar or reintroducing chip, badge, banner, or standalone-strip chrome that competes with the charts themselves. The same hot path should also clear pinned scope from whitespace through governed `data-summary-clear-surface` backgrounds instead of bolting one-off clear buttons into each table shell. 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` ownsfine-pointer preview and focus-preview continuity, whilediff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 69cd0d0529..6c8afcc608 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -204,9 +204,12 @@ querying, and the operator-facing storage health presentation layer.interaction must stay row-first and only fall back to the shared`frontend-modern/src/components/shared/SummaryScopeBar.tsx` plus`frontend-modern/src/components/shared/summaryScopePresentation.ts`- contract once the pinned row or group scrolls off-screen, so touch users- and mouse users keep the same explicit, reversible scope state without- adding an always-on storage-local banner. When that scope is a storage+ contract once the pinned row or group scrolls off-screen, with that+ fallback embedded in the existing storage controls search row or mobile+ trailing slot rather than a separate strip, so touch users and mouse+ users keep the same explicit, reversible scope state without adding an+ always-on storage-local banner.+ When that scope is a storagepool group, member pool rows should expose shared`data-summary-group-member-active="preview|pinned"` state so the groupedblock reads as one scoped set without adding storage-local outlines, pilldiff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex 6846d6d8d3..4a2768e499 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -219,7 +219,8 @@ assembly branch.state while it is on-screen, and the shared`frontend-modern/src/components/shared/SummaryScopeBar.tsx` plus`frontend-modern/src/components/shared/summaryScopePresentation.ts`- contract should appear only as the compact off-screen fallback when that+ contract should appear only as the compact off-screen fallback inside the+ existing page-controls search row or mobile trailing slot when thatpinned cluster scrolls away. Cluster headers themselves should stayheader-like: use the row as the deliberate pin target and do not add asecond scope/pinned pill button inside the cluster row chrome.diff --git a/frontend-modern/src/components/Dashboard/Dashboard.tsx b/frontend-modern/src/components/Dashboard/Dashboard.tsxindex 33fd29f4f2..286e939cb7 100644--- a/frontend-modern/src/components/Dashboard/Dashboard.tsx+++ b/frontend-modern/src/components/Dashboard/Dashboard.tsx@@ -12,6 +12,14 @@ import { useDashboardState, type DashboardProps } from './useDashboardState';export function Dashboard(props: DashboardProps) {const state = useDashboardState(props);+ const pinnedScopeFallback = () =>+ state.hasPinnedSummaryScope() && state.shouldShowPinnedSummaryScopeFallback() ? (+ <SummaryScopeBar+ testId="workloads-summary-scope"+ scope={state.pinnedSummaryScopePresentation()}+ onReset={state.clearPinnedSummaryScope}+ />+ ) : undefined;return (<div class="space-y-3">@@ -90,23 +98,10 @@ export function Dashboard(props: DashboardProps) {}containerRuntimeFilter={state.containerRuntimeFilterConfig()}hostFilter={state.hostFilterConfig()}+ mobileTrailing={pinnedScopeFallback()}namespaceFilter={state.namespaceFilterConfig()}platformFilter={state.platformFilterConfig()}- />- </Show>-- <Show- when={- state.surfaceConnected() &&- state.surfaceInitialDataReceived() &&- state.hasPinnedSummaryScope() &&- state.shouldShowPinnedSummaryScopeFallback()- }- >- <SummaryScopeBar- testId="workloads-summary-scope"- scope={state.pinnedSummaryScopePresentation()}- onClear={state.clearPinnedSummaryScope}+ searchTrailing={pinnedScopeFallback()}/></Show>diff --git a/frontend-modern/src/components/Dashboard/DashboardFilter.tsx b/frontend-modern/src/components/Dashboard/DashboardFilter.tsxindex 7a42228fe1..f07245f79e 100644--- a/frontend-modern/src/components/Dashboard/DashboardFilter.tsx+++ b/frontend-modern/src/components/Dashboard/DashboardFilter.tsx@@ -35,11 +35,13 @@ export const DashboardFilter: Component<DashboardFilterProps> = (props) => {history={{ storageKey: STORAGE_KEYS.DASHBOARD_SEARCH_HISTORY }}/>}+ searchTrailing={props.searchTrailing}mobileFilters={{enabled: isMobile(),onToggle: toggleFilters,count: activeFilterCount(),}}+ mobileTrailing={props.mobileTrailing}columnVisibility={pageControlsColumnVisibility()}resetAction={{show: showReset(),diff --git a/frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx b/frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsxindex 3deed14301..b5b051c107 100644--- a/frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx+++ b/frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx@@ -54,57 +54,56 @@ export function DashboardWorkloadTable(props: DashboardWorkloadTableProps) {<div class="border-b border-border bg-surface-hover px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted">Workloads</div>- <div class="overflow-x-auto">- <Table- wrapperRef={props.setTableWrapperRef}- class="whitespace-nowrap min-w-[max-content]"- style={{- 'table-layout': 'fixed',- 'min-width': props.isMobile() ? '100%' : 'max-content',- }}- >- <WorkloadTableHeader- handleSort={props.handleSort}- isMobile={props.isMobile}- mobileVisibleColumns={props.mobileVisibleColumns}- sortDirection={props.sortDirection}- sortKey={props.sortKey}- visibleColumns={props.visibleColumns}- />- <WorkloadPanel- activeAlerts={props.activeAlerts}- alertsEnabled={props.alertsEnabled}- bottomSpacerHeight={props.bottomSpacerHeight}- getGroupLabel={props.getGroupLabel}- groupedGuests={props.groupedGuests}- groupedWindowing={props.groupedWindowing}- guestMetadata={props.guestMetadata}- guestParentNodeMap={props.guestParentNodeMap}- groupingMode={props.groupingMode}- handleCustomUrlUpdate={props.handleCustomUrlUpdate}- handleTagClick={props.handleTagClick}- activeSummaryWorkloadGroupScope={props.activeSummaryWorkloadGroupScope}- activeSummaryWorkloadId={props.activeSummaryWorkloadId}- focusedSummaryWorkloadGroupScope={props.focusedSummaryWorkloadGroupScope}- focusedSummaryWorkloadGroupId={props.focusedSummaryWorkloadGroupId}- hoveredSummaryWorkloadGroupScope={props.hoveredSummaryWorkloadGroupScope}- mobileVisibleColumnIds={props.mobileVisibleColumnIds}- nodeByInstance={props.nodeByInstance}- search={props.search}- selectedGuestId={props.selectedGuestId}- setFocusedWorkloadGroupScope={props.setFocusedWorkloadGroupScope}- setHoveredWorkloadGroupScope={props.setHoveredWorkloadGroupScope}- setHoveredWorkloadId={props.setHoveredWorkloadId}- setSelectedGuestId={props.setSelectedGuestId}- setTableBodyRef={props.setTableBodyRef}- topSpacerHeight={props.topSpacerHeight}- totalColumns={props.totalColumns}- visibleGroupKeys={props.visibleGroupKeys}- windowedGroupedGuests={props.windowedGroupedGuests}- workloadIOEmphasis={props.workloadIOEmphasis}- />- </Table>- </div>+ <Table+ wrapperRef={props.setTableWrapperRef}+ wrapperProps={{ 'data-summary-clear-surface': '' }}+ class="whitespace-nowrap min-w-[max-content]"+ style={{+ 'table-layout': 'fixed',+ 'min-width': props.isMobile() ? '100%' : 'max-content',+ }}+ >+ <WorkloadTableHeader+ handleSort={props.handleSort}+ isMobile={props.isMobile}+ mobileVisibleColumns={props.mobileVisibleColumns}+ sortDirection={props.sortDirection}+ sortKey={props.sortKey}+ visibleColumns={props.visibleColumns}+ />+ <WorkloadPanel+ activeAlerts={props.activeAlerts}+ alertsEnabled={props.alertsEnabled}+ bottomSpacerHeight={props.bottomSpacerHeight}+ getGroupLabel={props.getGroupLabel}+ groupedGuests={props.groupedGuests}+ groupedWindowing={props.groupedWindowing}+ guestMetadata={props.guestMetadata}+ guestParentNodeMap={props.guestParentNodeMap}+ groupingMode={props.groupingMode}+ handleCustomUrlUpdate={props.handleCustomUrlUpdate}+ handleTagClick={props.handleTagClick}+ activeSummaryWorkloadGroupScope={props.activeSummaryWorkloadGroupScope}+ activeSummaryWorkloadId={props.activeSummaryWorkloadId}+ focusedSummaryWorkloadGroupScope={props.focusedSummaryWorkloadGroupScope}+ focusedSummaryWorkloadGroupId={props.focusedSummaryWorkloadGroupId}+ hoveredSummaryWorkloadGroupScope={props.hoveredSummaryWorkloadGroupScope}+ mobileVisibleColumnIds={props.mobileVisibleColumnIds}+ nodeByInstance={props.nodeByInstance}+ search={props.search}+ selectedGuestId={props.selectedGuestId}+ setFocusedWorkloadGroupScope={props.setFocusedWorkloadGroupScope}+ setHoveredWorkloadGroupScope={props.setHoveredWorkloadGroupScope}+ setHoveredWorkloadId={props.setHoveredWorkloadId}+ setSelectedGuestId={props.setSelectedGuestId}+ setTableBodyRef={props.setTableBodyRef}+ topSpacerHeight={props.topSpacerHeight}+ totalColumns={props.totalColumns}+ visibleGroupKeys={props.visibleGroupKeys}+ windowedGroupedGuests={props.windowedGroupedGuests}+ workloadIOEmphasis={props.workloadIOEmphasis}+ />+ </Table></Card></ComponentErrorBoundary>);diff --git a/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx b/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsxindex 7b48008993..91beedc671 100644--- a/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx+++ b/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx@@ -720,9 +720,15 @@ describe('Dashboard performance contract', () => {it('keeps dashboard filter state in canonical dashboard filter owners', () => {expect(dashboardFilterSource).toContain('useDashboardFilterState');+ expect(dashboardSource).toContain('SummaryScopeBar');+ expect(dashboardSource).toContain('mobileTrailing={pinnedScopeFallback()}');+ expect(dashboardSource).toContain('searchTrailing={pinnedScopeFallback()}');+ expect(dashboardSource).not.toContain('<Show when={state.hasPinnedSummaryScope()');expect(dashboardFilterSource).not.toContain('const [filtersOpen, setFiltersOpen] =');expect(dashboardFilterSource).not.toContain('useBreakpoint');expect(dashboardFilterSource).not.toContain("props.setSortKey('name')");+ expect(dashboardFilterSource).toContain('searchTrailing={props.searchTrailing}');+ expect(dashboardFilterSource).toContain('mobileTrailing={props.mobileTrailing}');expect(dashboardFilterStateSource).toContain('countActiveDashboardFilters');expect(dashboardFilterStateSource).not.toContain('props.containerRuntimeFilter?.onChange');expect(dashboardFilterStateSource).toContain('useBreakpoint');@@ -730,6 +736,9 @@ describe('Dashboard performance contract', () => {expect(dashboardFilterModelSource).toContain('export const countActiveDashboardFilters');expect(dashboardFilterModelSource).toContain('export const hasActiveDashboardFilters');expect(dashboardFilterModelSource).toContain("DEFAULT_DASHBOARD_SORT_KEY: DashboardSortKey = 'type'");+ expect(dashboardFilterModelSource).toContain('searchTrailing?: JSX.Element;');+ expect(dashboardFilterModelSource).toContain('utilityActions?: JSX.Element;');+ expect(dashboardFilterModelSource).toContain('mobileTrailing?: JSX.Element;');expect(dashboardStateSource).toContain('useDashboardWorkloadRouteState');expect(dashboardStateSource).toContain('filterWorkloads(params)');expect(dashboardStateSource).not.toContain('const containerRuntimeFilterConfig = createMemo');diff --git a/frontend-modern/src/components/Dashboard/dashboardFilterModel.ts b/frontend-modern/src/components/Dashboard/dashboardFilterModel.tsindex 3949195975..7421ecfb7f 100644--- a/frontend-modern/src/components/Dashboard/dashboardFilterModel.ts+++ b/frontend-modern/src/components/Dashboard/dashboardFilterModel.ts@@ -1,5 +1,6 @@import type { ColumnDef } from '@/hooks/useColumnVisibility';import type { ViewMode, WorkloadGuest } from '@/types/workloads';+import type { JSX } from 'solid-js';export type DashboardStatusMode = 'all' | 'running' | 'degraded' | 'stopped';export type DashboardGroupingMode = 'grouped' | 'flat';@@ -42,6 +43,9 @@ export interface DashboardFilterProps {containerRuntimeFilter?: DashboardToolbarFilterConfig;chartsCollapsed?: () => boolean;onChartsToggle?: () => void;+ searchTrailing?: JSX.Element;+ utilityActions?: JSX.Element;+ mobileTrailing?: JSX.Element;}export interface CountActiveDashboardFiltersOptions {diff --git a/frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts b/frontend-modern/src/components/Dashboard/useDashboardSelectionState.tsindex 823f9acbc5..7ae45d9f03 100644--- a/frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts+++ b/frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts@@ -51,7 +51,24 @@ export function useDashboardSelectionState(options: UseDashboardSelectionStateOpreturn options.summaryGroupScopes().get(selectedGroupId) ?? null;});+ const clearPinnedSummaryScope = () => {+ preserveScrollableAncestorVerticalOffset(tableWrapperRef(), () => {+ setSelectedGuestIdRaw(null);+ setSelectedWorkloadGroupIdRaw(null);+ });+ const nextPath = resolveDashboardSelectionNavigateTarget({+ pathname: location.pathname,+ search: location.search,+ resourceId: null,+ summaryGroupId: null,+ });+ if (nextPath) {+ routeStateNavigate.schedule(nextPath);+ }+ };+const summaryInteraction = useSummaryPageInteractionState({+ clearPinnedScope: clearPinnedSummaryScope,hoveredSeriesId: hoveredWorkloadId,hoveredGroupScope: hoveredWorkloadGroupScope,focusedSeriesId: selectedGuestId,@@ -118,22 +135,6 @@ export function useDashboardSelectionState(options: UseDashboardSelectionStateOp}};- const clearPinnedSummaryScope = () => {- preserveScrollableAncestorVerticalOffset(tableWrapperRef(), () => {- setSelectedGuestIdRaw(null);- setSelectedWorkloadGroupIdRaw(null);- });- const nextPath = resolveDashboardSelectionNavigateTarget({- pathname: location.pathname,- search: location.search,- resourceId: null,- summaryGroupId: null,- });- if (nextPath) {- routeStateNavigate.schedule(nextPath);- }- };-createEffect(() => {const selection = resolveDashboardResourceSelection(location.search);if (!selection) {diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsxindex c2b1051107..149cd8d4fa 100644--- a/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx+++ b/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx@@ -62,7 +62,7 @@ export const UnifiedResourceHostTableCard: Component<UnifiedResourceHostTableCar<div class="border-b border-border bg-surface-hover px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted">Agent Infrastructure</div>- <div class="overflow-x-auto">+ <div class="overflow-x-auto" data-summary-clear-surface><Tableclass="whitespace-nowrap min-w-[max-content]"style={{diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourcePBSTableSection.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourcePBSTableSection.tsxindex 96bc3e2afa..cebcabbc32 100644--- a/frontend-modern/src/components/Infrastructure/UnifiedResourcePBSTableSection.tsx+++ b/frontend-modern/src/components/Infrastructure/UnifiedResourcePBSTableSection.tsx@@ -48,7 +48,7 @@ export const UnifiedResourcePBSTableSection: Component<UnifiedResourcePBSTableSe<div class="border-b border-border bg-surface-hover px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted">PBS Services</div>- <div class="overflow-x-auto">+ <div class="overflow-x-auto" data-summary-clear-surface><Tableclass="whitespace-nowrap min-w-[max-content]"style={{diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourcePMGTableSection.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourcePMGTableSection.tsxindex 4e77e53a15..081a5e72f5 100644--- a/frontend-modern/src/components/Infrastructure/UnifiedResourcePMGTableSection.tsx+++ b/frontend-modern/src/components/Infrastructure/UnifiedResourcePMGTableSection.tsx@@ -48,7 +48,7 @@ export const UnifiedResourcePMGTableSection: Component<UnifiedResourcePMGTableSe<div class="border-b border-border bg-surface-hover px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted">PMG Services</div>- <div class="overflow-x-auto">+ <div class="overflow-x-auto" data-summary-clear-surface><Tableclass="whitespace-nowrap min-w-[max-content]"style={{diff --git a/frontend-modern/src/components/Storage/DiskList.tsx b/frontend-modern/src/components/Storage/DiskList.tsxindex cac9c074d6..53f6bf4ac4 100644--- a/frontend-modern/src/components/Storage/DiskList.tsx+++ b/frontend-modern/src/components/Storage/DiskList.tsx@@ -144,6 +144,7 @@ export const DiskList: Component<DiskListProps> = (props) => {<Card padding="none" tone="card" class="overflow-hidden"><divclass={PHYSICAL_DISK_TABLE_SCROLL_CLASS}+ data-summary-clear-surfacestyle={{ '-webkit-overflow-scrolling': 'touch' }}><Table class={PHYSICAL_DISK_TABLE_CLASS}>diff --git a/frontend-modern/src/components/Storage/Storage.tsx b/frontend-modern/src/components/Storage/Storage.tsxindex 67cf3aa98c..dcc7f4f9cb 100644--- a/frontend-modern/src/components/Storage/Storage.tsx+++ b/frontend-modern/src/components/Storage/Storage.tsx@@ -69,6 +69,14 @@ const Storage: Component = () => {shouldShowPinnedSummaryScopeFallback,shouldShowJumpToActiveStorageRow,} = useStoragePageModel();+ const pinnedScopeFallback = () =>+ hasPinnedSummaryScope() && shouldShowPinnedSummaryScopeFallback() ? (+ <SummaryScopeBar+ testId="storage-summary-scope"+ scope={pinnedSummaryScopePresentation()}+ onReset={clearPinnedSummaryScope}+ />+ ) : undefined;return (<div class="space-y-4">@@ -102,6 +110,7 @@ const Storage: Component = () => {setView={setView}search={search}setSearch={setSearch}+ searchTrailing={pinnedScopeFallback()}groupBy={groupBy}setGroupBy={setGroupBy}sortKey={sortKey}@@ -117,18 +126,11 @@ const Storage: Component = () => {selectedNodeId={selectedNodeId}setSelectedNodeId={setSelectedNodeId}storageFilterGroupBy={storageFilterGroupBy}+ mobileTrailing={pinnedScopeFallback()}/><StoragePageBanners kind={activeBannerKind} reconnect={reconnect} />- <Show when={hasPinnedSummaryScope() && shouldShowPinnedSummaryScopeFallback()}>- <SummaryScopeBar- testId="storage-summary-scope"- scope={pinnedSummaryScopePresentation()}- onClear={clearPinnedSummaryScope}- />- </Show>-<StorageContentCardview={view}physicalDisks={physicalDisks}diff --git a/frontend-modern/src/components/Storage/StorageControls.tsx b/frontend-modern/src/components/Storage/StorageControls.tsxindex 9cdec931a0..0170800772 100644--- a/frontend-modern/src/components/Storage/StorageControls.tsx+++ b/frontend-modern/src/components/Storage/StorageControls.tsx@@ -20,6 +20,7 @@ type StorageControlsProps = {onViewChange: (value: StorageView) => void;search: () => string;setSearch: (value: string) => void;+ searchTrailing?: JSX.Element;groupBy?: () => StorageGroupByFilter;setGroupBy?: (value: StorageGroupByFilter) => void;sortKey: () => StorageSortKey;@@ -35,6 +36,8 @@ type StorageControlsProps = {nodeFilterOptions: Array<{ value: string; label: string }>;selectedNodeId: () => string;setSelectedNodeId: (value: string) => void;+ mobileTrailing?: JSX.Element;+ utilityActions?: JSX.Element;};export const StorageControls: Component<StorageControlsProps> = (props) => {@@ -72,6 +75,7 @@ export const StorageControls: Component<StorageControlsProps> = (props) => {<StorageFiltersearch={props.search}setSearch={props.setSearch}+ searchTrailing={props.searchTrailing}groupBy={props.groupBy}setGroupBy={props.setGroupBy}sortKey={props.sortKey}@@ -86,6 +90,8 @@ export const StorageControls: Component<StorageControlsProps> = (props) => {setSourceFilter={props.setSourceFilter}sourceOptions={props.sourceOptions}leadingFilters={leadingFilters()}+ mobileTrailing={props.mobileTrailing}+ utilityActions={props.utilityActions}/></>);diff --git a/frontend-modern/src/components/Storage/StorageFilter.tsx b/frontend-modern/src/components/Storage/StorageFilter.tsxindex e21fef0359..d4c2cd0626 100644--- a/frontend-modern/src/components/Storage/StorageFilter.tsx+++ b/frontend-modern/src/components/Storage/StorageFilter.tsx@@ -39,6 +39,7 @@ export type StorageGroupByFilter = 'node' | 'type' | 'status' | 'none';interface StorageFilterProps {search: () => string;setSearch: (value: string) => void;+ searchTrailing?: JSX.Element;groupBy?: () => StorageGroupByFilter;setGroupBy?: (value: StorageGroupByFilter) => void;sortKey: () => string;@@ -61,6 +62,8 @@ interface StorageFilterProps {toggle: (id: string) => void;resetToDefaults: () => void;};+ mobileTrailing?: JSX.Element;+ utilityActions?: JSX.Element;}export const StorageFilter: Component<StorageFilterProps> = (props) => {@@ -121,11 +124,13 @@ export const StorageFilter: Component<StorageFilterProps> = (props) => {}}/>}+ searchTrailing={props.searchTrailing}mobileFilters={{enabled: isMobile(),onToggle: () => setFiltersOpen((o) => !o),count: activeFilterCount(),}}+ mobileTrailing={props.mobileTrailing}columnVisibility={props.columnVisibility}resetAction={{show: showReset(),@@ -150,6 +155,7 @@ export const StorageFilter: Component<StorageFilterProps> = (props) => {}}showFilters={!isMobile() || filtersOpen()}toolbarClass="gap-x-1.5 gap-y-2 sm:gap-x-2"+ utilityActions={props.utilityActions}>{props.leadingFilters}diff --git a/frontend-modern/src/components/Storage/StoragePageControls.tsx b/frontend-modern/src/components/Storage/StoragePageControls.tsxindex 120608f754..f23f4732e0 100644--- a/frontend-modern/src/components/Storage/StoragePageControls.tsx+++ b/frontend-modern/src/components/Storage/StoragePageControls.tsx@@ -1,4 +1,4 @@-import { Component, Show } from 'solid-js';+import { Component, JSX, Show } from 'solid-js';import StorageControls from '@/components/Storage/StorageControls';import type { StorageView } from './storagePageState';import type { StorageGroupKey, StorageSortKey } from './useStorageModel';@@ -12,6 +12,7 @@ type StoragePageControlsProps = {setView: (value: StorageView) => void;search: () => string;setSearch: (value: string) => void;+ searchTrailing?: JSX.Element;groupBy: () => StorageGroupKey;setGroupBy: (value: StorageGroupKey) => void;sortKey: () => StorageSortKey;@@ -27,6 +28,8 @@ type StoragePageControlsProps = {selectedNodeId: () => string;setSelectedNodeId: (value: string) => void;storageFilterGroupBy: () => StorageGroupByFilter;+ mobileTrailing?: JSX.Element;+ utilityActions?: JSX.Element;};export const StoragePageControls: Component<StoragePageControlsProps> = (props) => {@@ -45,6 +48,7 @@ export const StoragePageControls: Component<StoragePageControlsProps> = (props)onViewChange={props.setView}search={props.search}setSearch={props.setSearch}+ searchTrailing={props.searchTrailing}groupBy={model.groupBy()}setGroupBy={model.setGroupBy()}sortKey={props.sortKey}@@ -60,6 +64,8 @@ export const StoragePageControls: Component<StoragePageControlsProps> = (props)nodeFilterOptions={props.nodeFilterOptions}selectedNodeId={props.selectedNodeId}setSelectedNodeId={props.setSelectedNodeId}+ mobileTrailing={props.mobileTrailing}+ utilityActions={props.utilityActions}/></Show>);diff --git a/frontend-modern/src/components/Storage/StoragePoolsTable.tsx b/frontend-modern/src/components/Storage/StoragePoolsTable.tsxindex a93cf6ee8d..bd74e224dd 100644--- a/frontend-modern/src/components/Storage/StoragePoolsTable.tsx+++ b/frontend-modern/src/components/Storage/StoragePoolsTable.tsx@@ -66,7 +66,7 @@ export const StoragePoolsTable: Component<StoragePoolsTableProps> = (props) => {<div class={STORAGE_POOLS_EMPTY_STATE_CLASS}>{getStorageEmptyStateMessage()}</div>}>- <div class={STORAGE_POOLS_SCROLL_WRAP_CLASS}>+ <div class={STORAGE_POOLS_SCROLL_WRAP_CLASS} data-summary-clear-surface><Table class={STORAGE_POOLS_TABLE_CLASS}><TableHeader><TableRow class={STORAGE_POOLS_HEADER_ROW_CLASS}>diff --git a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsxindex fa3a34bfb7..e679f10db8 100644--- a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx+++ b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx@@ -798,6 +798,37 @@ describe('Storage', () => {).not.toBeInTheDocument();});+ it('clears pinned storage group scope from table whitespace', async () => {+ hookResources = [+ buildStorageResource('storage-1', 'Node-Store', 'pve1'),+ buildStorageResource('storage-2', 'Edge-Store', 'pve2'),+ ];+ mockLocationSearch = '?group=node&summaryGroup=storage%3Anode%3Apve1';+ navigateSpy.mockImplementation((nextPath: string) => {+ mockLocationSearch = nextPath.includes('?') ? nextPath.slice(nextPath.indexOf('?')) : '';+ });++ render(() => <Storage />);++ await waitFor(() => {+ expect(+ document.querySelector('tr[data-summary-group-id="storage:node:pve1"]'),+ ).toBeTruthy();+ });++ const clearSurface = document.querySelector('[data-summary-clear-surface]') as HTMLElement | null;+ expect(clearSurface).not.toBeNull();+ if (!clearSurface) {+ return;+ }++ fireEvent.click(clearSurface);++ await waitFor(() => {+ expect(navigateSpy).toHaveBeenCalledWith('/storage?group=node', ROUTE_STATE_REPLACE_OPTIONS);+ });+ });+it('uses shared preview and pinned group-member emphasis for storage pool rows', async () => {hookResources = [buildStorageResource('storage-1', 'Node-Store', 'pve1'),diff --git a/frontend-modern/src/components/Storage/useStoragePageModel.ts b/frontend-modern/src/components/Storage/useStoragePageModel.tsindex 4bad051def..fcf2fb8c86 100644--- a/frontend-modern/src/components/Storage/useStoragePageModel.ts+++ b/frontend-modern/src/components/Storage/useStoragePageModel.ts@@ -329,6 +329,7 @@ export const useStoragePageModel = () => {setExpandedPoolId,});const summaryInteraction = useSummaryPageInteractionState({+ clearPinnedScope: clearPinnedSummaryScope,hoveredGroupScope: hoveredStorageGroupScope,hoveredSeriesId: hoveredStorageResourceId,focusedGroupScope: focusedStorageGroupScope,diff --git a/frontend-modern/src/components/shared/PageControls.guardrails.test.ts b/frontend-modern/src/components/shared/PageControls.guardrails.test.tsindex 62bbd0e09a..b187146a90 100644--- a/frontend-modern/src/components/shared/PageControls.guardrails.test.ts+++ b/frontend-modern/src/components/shared/PageControls.guardrails.test.ts@@ -22,6 +22,12 @@ describe('page controls guardrails', () => {expect(pageControlsSource).toContain('splitProps');expect(pageControlsSource).toContain('<FilterHeader');expect(pageControlsSource).toContain('{...divProps}');+ expect(pageControlsSource).toContain('searchTrailing?: JSX.Element;');+ expect(pageControlsSource).toContain('const mobileControlsEnabled = () => local.mobileFilters?.enabled === true;');+ expect(pageControlsSource).toContain('const activeMobileTrailing = () => (mobileControlsEnabled() ? local.mobileTrailing : undefined);');+ expect(pageControlsSource).toContain('const activeUtilityActions = () => (mobileControlsEnabled() ? undefined : local.utilityActions);');+ expect(pageControlsSource).toContain('const activeSearchTrailing = () => (mobileControlsEnabled() ? undefined : local.searchTrailing);');+ expect(pageControlsSource).toContain('searchAccessory={activeSearchTrailing() ?? mobileSearchAccessory()}');expect(dashboardFilterSource).toContain('PageControls');expect(dashboardFilterSource).not.toContain('<FilterHeader');@@ -111,7 +117,8 @@ describe('page controls guardrails', () => {expect(recoveryPageSource).not.toContain('variant="control"');expect(recoveryPageSource).not.toContain('listClass=');expect(recoveryPageSource).not.toContain('tabClass=');- expect(recoveryPageSource).toContain('class="w-full"');+ expect(recoveryPageSource).toContain('const workspaceControls = () => (');+ expect(recoveryPageSource).toContain('<Subtabs');expect(recoveryPageSource).not.toContain('Focused drill-in');});});diff --git a/frontend-modern/src/components/shared/PageControls.test.tsx b/frontend-modern/src/components/shared/PageControls.test.tsxindex 9c23b541ec..3b2b014106 100644--- a/frontend-modern/src/components/shared/PageControls.test.tsx+++ b/frontend-modern/src/components/shared/PageControls.test.tsx@@ -44,4 +44,38 @@ describe('PageControls', () => {fireEvent.click(screen.getByLabelText('Subject'));expect(onToggleColumn).toHaveBeenCalledWith('subject');});++ it('renders at most one scope utility slot for the active breakpoint', () => {+ const { unmount } = render(() => (+ <PageControls+ search={<div data-testid="search">Search</div>}+ showFilters={true}+ mobileFilters={{ enabled: false, count: 0, onToggle: vi.fn() }}+ mobileTrailing={<div data-testid="scope-slot">mobile scope</div>}+ utilityActions={<div data-testid="scope-slot">desktop scope</div>}+ >+ <div>Filters</div>+ </PageControls>+ ));++ expect(screen.getAllByTestId('scope-slot')).toHaveLength(1);+ expect(screen.getByTestId('scope-slot')).toHaveTextContent('desktop scope');++ unmount();++ render(() => (+ <PageControls+ search={<div data-testid="search">Search</div>}+ showFilters={true}+ mobileFilters={{ enabled: true, count: 0, onToggle: vi.fn() }}+ mobileTrailing={<div data-testid="scope-slot">mobile scope</div>}+ utilityActions={<div data-testid="scope-slot">desktop scope</div>}+ >+ <div>Filters</div>+ </PageControls>+ ));++ expect(screen.getAllByTestId('scope-slot')).toHaveLength(1);+ expect(screen.getByTestId('scope-slot')).toHaveTextContent('mobile scope');+ });});diff --git a/frontend-modern/src/components/shared/PageControls.tsx b/frontend-modern/src/components/shared/PageControls.tsxindex 646e7f3faf..aaca6a83d5 100644--- a/frontend-modern/src/components/shared/PageControls.tsx+++ b/frontend-modern/src/components/shared/PageControls.tsx@@ -32,6 +32,7 @@ interface PageControlsMobileFilters {interface PageControlsProps extends JSX.HTMLAttributes<HTMLDivElement> {searchLeading?: JSX.Element;+ searchTrailing?: JSX.Element;search: JSX.Element;showFilters: boolean;children: JSX.Element;@@ -50,6 +51,7 @@ interface PageControlsProps extends JSX.HTMLAttributes<HTMLDivElement> {export const PageControls: Component<PageControlsProps> = (props) => {const [local, divProps] = splitProps(props, ['searchLeading',+ 'searchTrailing','search','showFilters','children',@@ -73,27 +75,31 @@ export const PageControls: Component<PageControlsProps> = (props) => {/></Show>);+ const mobileControlsEnabled = () => local.mobileFilters?.enabled === true;+ const activeMobileTrailing = () => (mobileControlsEnabled() ? local.mobileTrailing : undefined);+ const activeUtilityActions = () => (mobileControlsEnabled() ? undefined : local.utilityActions);+ const activeSearchTrailing = () => (mobileControlsEnabled() ? undefined : local.searchTrailing);return (<FilterHeader{...divProps}searchLeading={local.searchLeading}search={local.search}- searchAccessory={mobileSearchAccessory()}+ searchAccessory={activeSearchTrailing() ?? mobileSearchAccessory()}showFilters={local.showFilters}contentClass={local.contentClass}searchRowClass={local.searchRowClass}toolbarClass={local.toolbarClass}mobileRowClass={local.mobileRowClass}mobileLeading={local.mobileLeading}- mobileTrailing={local.mobileTrailing}+ mobileTrailing={activeMobileTrailing()}class={local.class}>{local.children}- <Show when={local.utilityActions}>+ <Show when={activeUtilityActions()}><FilterDivider />- {local.utilityActions}+ {activeUtilityActions()}</Show><Showdiff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex f54201563a..ef120b7ef4 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -314,6 +314,8 @@ describe('shared primitive guardrails', () => {expect(summaryTableFocusSource).toContain('findInlineDetailElement');expect(summaryTableFocusSource).toContain('revealInlineDetailInViewport');expect(summaryTableFocusSource).toContain('MutationObserver');+ expect(summaryTableFocusSource).toContain('clearPinnedScope?: () => void;');+ expect(summaryTableFocusSource).toContain("target.closest('[data-summary-clear-surface]')");expect(summaryTableFocusSource).toContain('querySelector<HTMLElement>(');expect(summaryTableFocusSource).toContain("row.scrollIntoView({ behavior: 'smooth', block: 'center' })",@@ -343,12 +345,14 @@ describe('shared primitive guardrails', () => {expect(summaryScopePresentationSource).toContain('buildSummaryScopePresentation');expect(summaryScopePresentationSource).toContain("mode: 'all'");expect(summaryScopeBarSource).toContain('SummaryScopeBar');- expect(summaryScopeBarSource).toContain('Scoped to');- expect(summaryScopeBarSource).toContain('Clear pinned scope');+ expect(summaryScopeBarSource).toContain('Pinned to');+ expect(summaryScopeBarSource).toContain('Reset pinned scope');+ expect(summaryScopeBarSource).toContain('data-summary-scope-variant="inline"');+ expect(summaryScopeBarSource).toContain('inline-flex min-w-0 max-w-full items-center');expect(summaryScopeBarSource).not.toContain('Previewing');expect(summaryScopeBarSource).not.toContain('Showing');- expect(summaryScopeBarSource).not.toContain('Pinned to');- expect(summaryScopeBarSource).not.toContain('Reset pinned scope');+ expect(summaryScopeBarSource).not.toContain('Scoped to');+ expect(summaryScopeBarSource).not.toContain('Clear pinned scope');expect(summaryScopeBarSource).not.toContain('rounded-full');expect(summaryScopeBarSource).not.toContain('bg-surface-alt/60');expect(summaryScopeBarSource).not.toContain('useLocation(');diff --git a/frontend-modern/src/components/shared/SummaryScopeBar.tsx b/frontend-modern/src/components/shared/SummaryScopeBar.tsxindex 90bffae1d8..d7df62e9ec 100644--- a/frontend-modern/src/components/shared/SummaryScopeBar.tsx+++ b/frontend-modern/src/components/shared/SummaryScopeBar.tsx@@ -3,8 +3,8 @@ import type { SummaryScopePresentation } from './summaryScopePresentation';interface SummaryScopeBarProps {class?: string;- clearLabel?: string;- onClear?: () => void;+ onReset?: () => void;+ resetLabel?: string;scope: SummaryScopePresentation;testId?: string;}@@ -21,14 +21,14 @@ export const SummaryScopeBar: Component<SummaryScopeBarProps> = (props) => {<divdata-testid={props.testId}data-summary-scope-mode={props.scope.mode}- data-summary-scope-variant="fallback"- class={`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 px-0 py-0.5 ${props.class ?? ''}`.trim()}+ data-summary-scope-variant="inline"+ class={`inline-flex min-w-0 max-w-full items-center gap-1.5 overflow-hidden ${props.class ?? ''}`.trim()}>- <span class="shrink-0 text-[11px] font-semibold tracking-[0.01em] text-muted">- Scoped to+ <span class="shrink-0 text-xs text-muted">+ Pinned to</span><span- class="min-w-0 truncate text-xs font-medium text-base-content"+ class="min-w-0 max-w-[16rem] truncate text-xs font-medium text-base-content"title={props.scope.label}>{props.scope.label}@@ -36,23 +36,23 @@ export const SummaryScopeBar: Component<SummaryScopeBarProps> = (props) => {<Show when={helperText()}>{(text) => (<>- <span aria-hidden="true" class="shrink-0 text-[11px] text-muted/70">+ <span aria-hidden="true" class="shrink-0 text-xs text-muted/70">•</span>- <span class="min-w-0 truncate text-[11px] text-muted" title={text()}>+ <span class="min-w-0 max-w-[10rem] truncate text-xs text-muted" title={text()}>{text()}</span></>)}</Show>- <Show when={props.onClear}>+ <Show when={props.onReset}><buttontype="button"- aria-label={props.clearLabel ?? 'Clear pinned scope'}- class="ml-auto shrink-0 text-[11px] font-medium text-muted transition-colors hover:text-base-content focus-visible:text-base-content"- onClick={() => props.onClear?.()}+ aria-label={props.resetLabel ?? 'Reset pinned scope'}+ class="shrink-0 text-xs font-medium text-muted transition-colors hover:text-base-content focus-visible:text-base-content"+ onClick={() => props.onReset?.()}>- Clear+ Reset</button></Show></div>diff --git a/frontend-modern/src/components/shared/Table.tsx b/frontend-modern/src/components/shared/Table.tsxindex 93436d9915..f9075d9b76 100644--- a/frontend-modern/src/components/shared/Table.tsx+++ b/frontend-modern/src/components/shared/Table.tsx@@ -2,13 +2,21 @@ import { JSX, splitProps } from 'solid-js';export interface TableProps extends JSX.HTMLAttributes<HTMLTableElement> {wrapperClass?: string;+ wrapperProps?: JSX.HTMLAttributes<HTMLDivElement>;wrapperRef?: (el: HTMLDivElement) => void;}export function Table(props: TableProps) {- const [local, rest] = splitProps(props, ['class', 'children', 'wrapperClass', 'wrapperRef']);+ const [local, rest] = splitProps(props, [+ 'class',+ 'children',+ 'wrapperClass',+ 'wrapperProps',+ 'wrapperRef',+ ]);return (<div+ {...local.wrapperProps}ref={local.wrapperRef}class={`w-full overflow-x-auto ${local.wrapperClass || ''}`}style={{ '-webkit-overflow-scrolling': 'touch' }}diff --git a/frontend-modern/src/components/shared/__tests__/InfrastructureSummaryTable.test.tsx b/frontend-modern/src/components/shared/__tests__/InfrastructureSummaryTable.test.tsxindex 8e36938fd2..7940477075 100644--- a/frontend-modern/src/components/shared/__tests__/InfrastructureSummaryTable.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/InfrastructureSummaryTable.test.tsx@@ -160,6 +160,19 @@ describe('InfrastructureSummaryTable', () => {).toBe(true);});+ it('keeps the shared horizontal-scroll wrapper around the table shell', () => {+ const { container } = render(() => (+ <InfrastructureSummaryTable+ nodes={[makeNode()]}+ selectedNode={null}+ currentTab="dashboard"+ onNodeClick={vi.fn()}+ />+ ));++ expect(container.querySelector('div.overflow-x-auto > table')).toBeTruthy();+ });+it('matches drawer agents by shared linked-agent aliases', () => {infrastructureDetailsDrawerMock.mockClear();diff --git a/frontend-modern/src/components/shared/__tests__/SummaryScopeBar.test.tsx b/frontend-modern/src/components/shared/__tests__/SummaryScopeBar.test.tsxindex 79446afed4..e11a6241f6 100644--- a/frontend-modern/src/components/shared/__tests__/SummaryScopeBar.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/SummaryScopeBar.test.tsx@@ -4,18 +4,18 @@ import { SummaryScopeBar } from '@/components/shared/SummaryScopeBar';import type { SummaryScopePresentation } from '@/components/shared/summaryScopePresentation';const renderScopeBar = (scope: SummaryScopePresentation, options?: {- onClear?: () => void;+ onReset?: () => void;}) =>render(() => (<SummaryScopeBartestId="summary-scope"scope={scope}- onClear={options?.onClear}+ onReset={options?.onReset}/>));describe('SummaryScopeBar', () => {- it('renders pinned scope as a compact fallback context line', () => {+ it('renders pinned scope as a compact inline context control', () => {renderScopeBar({kind: 'group',label: 'Production cluster',@@ -24,10 +24,9 @@ describe('SummaryScopeBar', () => {});const scope = screen.getByTestId('summary-scope');- expect(scope).toHaveTextContent('Scoped to');+ expect(scope).toHaveTextContent('Pinned to');expect(scope).toHaveTextContent('Production cluster');expect(scope).not.toHaveTextContent('Previewing');- expect(scope).not.toHaveTextContent('Pinned to');expect(scope).not.toHaveTextContent('Showing');});@@ -40,13 +39,13 @@ describe('SummaryScopeBar', () => {});const scope = screen.getByTestId('summary-scope');- expect(scope).toHaveTextContent('Scoped to');+ expect(scope).toHaveTextContent('Pinned to');expect(scope).toHaveTextContent('finance-jump-01');expect(scope).toHaveTextContent('Within Production cluster');});it('keeps the clear affordance explicit but quiet', () => {- const onClear = vi.fn();+ const onReset = vi.fn();renderScopeBar({kind: 'group',@@ -54,13 +53,13 @@ describe('SummaryScopeBar', () => {contextLabel: null,mode: 'pinned',},- { onClear },+ { onReset },);- const button = screen.getByRole('button', { name: 'Clear pinned scope' });- expect(button).toHaveTextContent('Clear');+ const button = screen.getByRole('button', { name: 'Reset pinned scope' });+ expect(button).toHaveTextContent('Reset');fireEvent.click(button);- expect(onClear).toHaveBeenCalledTimes(1);+ expect(onReset).toHaveBeenCalledTimes(1);});});diff --git a/frontend-modern/src/components/shared/__tests__/summaryTableFocus.test.tsx b/frontend-modern/src/components/shared/__tests__/summaryTableFocus.test.tsxindex d9838b0c21..af0c22d5d3 100644--- a/frontend-modern/src/components/shared/__tests__/summaryTableFocus.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/summaryTableFocus.test.tsx@@ -226,4 +226,49 @@ describe('useSummaryPageInteractionState', () => {expect(result.shouldShowPinnedScopeFallback()).toBe(true);});++ it('clears pinned scope when operators click table whitespace on a clear surface', () => {+ const [focusedSeriesId] = createSignal<string | null>('workload-a');+ const clearPinnedScope = vi.fn();+ const root = document.createElement('div');+ root.setAttribute('data-summary-clear-surface', '');+ const filler = document.createElement('div');+ root.appendChild(filler);+ document.body.appendChild(root);++ const { result } = renderHook(() =>+ useSummaryPageInteractionState({+ clearPinnedScope,+ focusedSeriesId,+ }),+ );++ result.setTableRootRef(root);+ filler.click();++ expect(clearPinnedScope).toHaveBeenCalledTimes(1);+ });++ it('does not clear pinned scope when operators click an active summary row', () => {+ const [focusedSeriesId] = createSignal<string | null>('workload-a');+ const clearPinnedScope = vi.fn();+ const root = document.createElement('div');+ root.setAttribute('data-summary-clear-surface', '');+ const row = document.createElement('div');+ row.setAttribute('data-summary-series-id', 'workload-a');+ root.appendChild(row);+ document.body.appendChild(root);++ const { result } = renderHook(() =>+ useSummaryPageInteractionState({+ clearPinnedScope,+ focusedSeriesId,+ }),+ );++ result.setTableRootRef(root);+ row.click();++ expect(clearPinnedScope).not.toHaveBeenCalled();+ });});diff --git a/frontend-modern/src/components/shared/summaryTableFocus.ts b/frontend-modern/src/components/shared/summaryTableFocus.tsindex 2fc67b1629..6caf94052a 100644--- a/frontend-modern/src/components/shared/summaryTableFocus.ts+++ b/frontend-modern/src/components/shared/summaryTableFocus.ts@@ -17,6 +17,22 @@ const normalizeSeriesId = (value: string | null | undefined): string => value?.tconst escapeAttributeSelectorValue = (value: string): string =>value.split('\\').join('\\\\').split('"').join('\\"');+const SUMMARY_CLEAR_IGNORE_SELECTOR = [+ 'button',+ 'a',+ 'input',+ 'select',+ 'textarea',+ 'label',+ 'summary',+ '[role="button"]',+ '[role="link"]',+ '[role="menuitem"]',+ '[data-summary-series-id]',+ '[data-summary-group-id]',+ '[data-inline-detail-for]',+].join(', ');+const isElementVisibleWithinViewport = (element: HTMLElement): boolean => {const rect = element.getBoundingClientRect();if (rect.height <= 0 || rect.width <= 0) {@@ -52,6 +68,7 @@ export interface UseSummaryTableFocusBridgeOptions {activeSeriesId: Accessor<string | null | undefined>;focusedSeriesId?: Accessor<string | null | undefined>;focusedGroupId?: Accessor<string | null | undefined>;+ clearPinnedScope?: () => void;revealActiveSeries?: (seriesId: string) => void;}@@ -136,6 +153,35 @@ export function useSummaryTableFocusBridge(options: UseSummaryTableFocusBridgeOp);});+ createEffect(() => {+ const root = tableRoot();+ if (!root || !options.clearPinnedScope) {+ return;+ }++ const handleRootClick = (event: MouseEvent) => {+ if (!normalizeSeriesId(focusedSeriesId()) && !normalizeSeriesId(focusedGroupId())) {+ return;+ }+ const target = event.target;+ if (!(target instanceof HTMLElement) || !root.contains(target)) {+ return;+ }+ if (!target.closest('[data-summary-clear-surface]')) {+ return;+ }+ if (target.closest(SUMMARY_CLEAR_IGNORE_SELECTOR)) {+ return;+ }+ options.clearPinnedScope?.();+ };++ root.addEventListener('click', handleRootClick);+ onCleanup(() => {+ root.removeEventListener('click', handleRootClick);+ });+ });+const jumpToActiveRow = () => {const activeSeriesId = normalizedActiveSeriesId();if (!activeSeriesId) {@@ -300,6 +346,7 @@ export interface UseSummaryPageInteractionStateOptions {focusedGroupId?: Accessor<string | null | undefined>;hoveredGroupScope?: Accessor<SummarySeriesGroupScope | null | undefined>;focusedGroupScope?: Accessor<SummarySeriesGroupScope | null | undefined>;+ clearPinnedScope?: () => void;revealActiveSeries?: (seriesId: string) => void;}@@ -340,6 +387,7 @@ export function useSummaryPageInteractionState(options: UseSummaryPageInteractioconst tableFocus = useSummaryTableFocusBridge({activeSeriesId,+ clearPinnedScope: options.clearPinnedScope,focusedSeriesId,focusedGroupId,revealActiveSeries: options.revealActiveSeries,diff --git a/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx b/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsxindex 355b942a20..c1c6f7693e 100644--- a/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx+++ b/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx@@ -79,6 +79,14 @@ export function InfrastructurePageSurface() {setSummaryTableRootRef,shouldShowJumpToActiveResourceRow,} = useInfrastructurePageState();+ const pinnedScopeFallback = () =>+ hasPinnedSummaryScope() && shouldShowPinnedSummaryScopeFallback() ? (+ <SummaryScopeBar+ testId="infrastructure-summary-scope"+ scope={pinnedSummaryScopePresentation()}+ onReset={clearPinnedSummaryScope}+ />+ ) : undefined;const infrastructureEmptyState = () => getInfrastructureEmptyState();const infrastructureFilterEmptyState = () => getInfrastructureFilterEmptyState();@@ -187,6 +195,8 @@ export function InfrastructurePageSurface() {onToggle: () => setFiltersOpen((o) => !o),count: activeFilterCount(),}}+ searchTrailing={pinnedScopeFallback()}+ mobileTrailing={pinnedScopeFallback()}resetAction={{show: hasActiveFilters(),onClick: clearFilters,@@ -325,13 +335,6 @@ export function InfrastructurePageSurface() {}><div class="space-y-3">- <Show when={hasPinnedSummaryScope() && shouldShowPinnedSummaryScopeFallback()}>- <SummaryScopeBar- testId="infrastructure-summary-scope"- scope={pinnedSummaryScopePresentation()}- onClear={clearPinnedSummaryScope}- />- </Show><UnifiedResourceTableresources={filteredResources()}expandedResourceId={expandedResourceId()}diff --git a/frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.ts b/frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.tsindex 8fbe9166d5..1384b29509 100644--- a/frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.ts+++ b/frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.ts@@ -54,6 +54,8 @@ describe('InfrastructurePageSurface guardrails', () => {expect(infrastructurePageSurfaceSource).toContain('hasPinnedSummaryScope() && shouldShowPinnedSummaryScopeFallback()');expect(infrastructurePageSurfaceSource).toContain('scope={pinnedSummaryScopePresentation()}');expect(infrastructurePageSurfaceSource).toContain('clearPinnedSummaryScope');+ expect(infrastructurePageSurfaceSource).toContain('searchTrailing={pinnedScopeFallback()}');+ expect(infrastructurePageSurfaceSource).toContain('mobileTrailing={pinnedScopeFallback()}');expect(infrastructurePageSurfaceSource).not.toContain('useSummaryPageInteractionState');expect(infrastructurePageStateSource).toContain('useSummaryPageInteractionState');diff --git a/frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts b/frontend-modern/src/features/infrastructure/useInfrastructurePageState.tsindex 1947e09a40..4e010df386 100644--- a/frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts+++ b/frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts@@ -103,7 +103,15 @@ export function useInfrastructurePageState() {}return null;});+ const clearPinnedSummaryScope = () => {+ capturePendingAppShellRestoreTop();+ preserveTableScrollAnchor(() => {+ routeState.setExpandedResourceId(null);+ routeState.setFocusedResourceGroupId(null);+ });+ };const summaryInteraction = useSummaryPageInteractionState({+ clearPinnedScope: clearPinnedSummaryScope,hoveredSeriesId: routeState.hoveredResourceId,hoveredGroupScope: hoveredResourceGroupScope,focusedSeriesId: routeState.expandedResourceId,@@ -140,14 +148,6 @@ export function useInfrastructurePageState() {});};- const clearPinnedSummaryScope = () => {- capturePendingAppShellRestoreTop();- preserveTableScrollAnchor(() => {- routeState.setExpandedResourceId(null);- routeState.setFocusedResourceGroupId(null);- });- };-const clearFilters = () => {setSelectedSource('');setSelectedStatus('');diff --git a/tests/integration/tests/48-summary-hover-selection.spec.ts b/tests/integration/tests/48-summary-hover-selection.spec.tsindex 08a7ce23c5..062063f94d 100644--- a/tests/integration/tests/48-summary-hover-selection.spec.ts+++ b/tests/integration/tests/48-summary-hover-selection.spec.ts@@ -1114,9 +1114,14 @@ test.describe.serial("Summary hover selection", () => {).toBe(true);await expect(scopeBar).toHaveCount(1);- await expect(scopeBar).toContainText("Scoped to");-- await scopeBar.getByRole("button", { name: "Clear pinned scope" }).click();+ await expect(scopeBar).toContainText("Pinned to");++ await page+ .locator("[data-summary-clear-surface]")+ .first()+ .evaluate((element) => {+ element.dispatchEvent(new MouseEvent("click", { bubbles: true }));+ });await expect.poll(() => new URL(page.url()).searchParams.get("summaryGroup")).toBeNull();@@ -1240,11 +1245,14 @@ test.describe.serial("Summary hover selection", () => {).toBe(true);await expect(storageScopeBar).toHaveCount(1);- await expect(storageScopeBar).toContainText("Scoped to");+ await expect(storageScopeBar).toContainText("Pinned to");- await storageScopeBar- .getByRole("button", { name: "Clear pinned scope" })- .click();+ await page+ .locator("[data-summary-clear-surface]")+ .first()+ .evaluate((element) => {+ element.dispatchEvent(new MouseEvent("click", { bubbles: true }));+ });await expect(page.locator('tr[data-summary-group-member-active="pinned"]')).toHaveCount(0);await expect.poll(() => new URL(page.url()).searchParams.get("summaryGroup"))