Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

fix(frontend): clear pinned scope from table surfaces

rcourtmanfb4f81dcf2fd
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 5113e7acc8..d42440143c 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -129,11 +129,9 @@ work extends shared components instead of creating new local variants.
107. `frontend-modern/src/utils/docsLinks.ts`
108. `tests/integration/tests/20-local-doc-links.spec.ts`
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`
-113. `frontend-modern/src/components/shared/SummaryRowActionButton.tsx`
-114. `frontend-modern/src/hooks/createNonSuspendingQuery.ts`
+110. `frontend-modern/src/components/shared/summaryInteractionA11y.ts`
+111. `frontend-modern/src/components/shared/SummaryRowActionButton.tsx`
+112. `frontend-modern/src/hooks/createNonSuspendingQuery.ts`
## Shared Boundaries
@@ -154,7 +152,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. 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.
+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 visible scoped state, not a second strip or search-row widget. Page shells therefore must not reintroduce always-on scope banners, preview bars, page-local chips, breadcrumbs, or search/filter-row scope accessories just to explain pinned state. 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` table-surface root 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 preview
semantics through
`frontend-modern/src/components/shared/summaryInteractionA11y.ts`.
@@ -165,9 +163,8 @@ work extends shared components instead of creating new local variants.
`Escape` preview clearing stay on the shared control instead of focusable-
table-row shims. Group headers are different: they may use the header row
itself as the deliberate pin target when that keeps the table chrome
- native, but they must not grow separate scope/pinned pill buttons beyond
- the shared off-screen `SummaryScopeBar.tsx` fallback inside the existing
- page controls row. Workloads, infrastructure,
+ native, but they must not grow separate scope/pinned pill buttons or
+ off-screen fallback strips. Workloads, infrastructure,
and storage must not rebuild row-as-button keyboard handling or trailing
one-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.md
index 602d9afebe..1ee55ca9ea 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, 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.
+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. That hot path stays row-first rather than adding fallback chrome: the on-screen row or group header is the scoped state, and clearing belongs to governed `data-summary-clear-surface` table-surface roots instead of bolting one-off clear buttons or search-row widgets into each page shell. That same hot path must keep chart-backed summary-card geometry explicit and stable so hover rerenders, synchronized readouts, or idle header metadata 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 and focus-preview continuity, while
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 6c8afcc608..bd73bef0e0 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -201,14 +201,10 @@ querying, and the operator-facing storage health presentation layer.
disk-temperature cards demote cleanly during pool focus, instead of
leaving stale row-local IDs or storage-local hover branches on the page.
Any page, group, or entity scope that becomes pinned through storage
- 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, 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.
+ interaction must stay row-first: the pinned row or group remains the
+ visible scoped state, and clearing belongs to the governed storage content
+ surface root via `data-summary-clear-surface` rather than an extra storage-
+ local strip or search-row widget.
When that scope is a storage
pool group, member pool rows should expose shared
`data-summary-group-member-active="preview|pinned"` state so the grouped
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 4a2768e499..83ce456396 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -215,15 +215,10 @@ assembly branch.
on the canonical infrastructure route through the shared `summaryGroup`
query state, so pinned scope is shareable, reversible, and owned by the
same route-backed summary contract as row focus. Infrastructure must stay
- row-first here: the pinned cluster header remains the primary visible
- 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 inside the
- existing page-controls search row or mobile trailing slot when that
- pinned cluster scrolls away. Cluster headers themselves should stay
- header-like: use the row as the deliberate pin target and do not add a
- second scope/pinned pill button inside the cluster row chrome.
+ row-first here: the pinned cluster header remains the visible scoped
+ state, and clearing belongs to the governed infrastructure table surface
+ root via `data-summary-clear-surface` rather than a search-row fallback
+ widget or a second scope/pinned pill inside the cluster row chrome.
14. Keep infrastructure row emphasis on the shared frontend presentation
contract. Host, PBS, and PMG table sections may decide whether a resource
is contextually active, but they must expose that state through
diff --git a/frontend-modern/src/components/Dashboard/Dashboard.tsx b/frontend-modern/src/components/Dashboard/Dashboard.tsx
index 286e939cb7..26a1beee77 100644
--- a/frontend-modern/src/components/Dashboard/Dashboard.tsx
+++ b/frontend-modern/src/components/Dashboard/Dashboard.tsx
@@ -3,7 +3,6 @@ import { InfrastructureSelector } from '@/components/shared/InfrastructureSelect
import { DashboardFilter } from './DashboardFilter';
import { WorkloadsSummary } from '@/components/Workloads/WorkloadsSummary';
import { ScrollToTopButton } from '@/components/shared/ScrollToTopButton';
-import { SummaryScopeBar } from '@/components/shared/SummaryScopeBar';
import { StickySummarySection } from '@/components/shared/StickySummarySection';
import { DashboardStateCards } from './DashboardStateCards';
import { DashboardStatsStrip } from './DashboardStatsStrip';
@@ -12,14 +11,6 @@ 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">
@@ -98,10 +89,8 @@ export function Dashboard(props: DashboardProps) {
}
containerRuntimeFilter={state.containerRuntimeFilterConfig()}
hostFilter={state.hostFilterConfig()}
- mobileTrailing={pinnedScopeFallback()}
namespaceFilter={state.namespaceFilterConfig()}
platformFilter={state.platformFilterConfig()}
- searchTrailing={pinnedScopeFallback()}
/>
</Show>
@@ -140,6 +129,7 @@ export function Dashboard(props: DashboardProps) {
setHoveredWorkloadGroupScope={state.setHoveredWorkloadGroupScope}
setHoveredWorkloadId={state.setHoveredWorkloadId}
setSelectedGuestId={state.setSelectedGuestId}
+ setTableRootRef={state.setTableRootRef}
setTableBodyRef={state.setTableBodyRef}
setTableWrapperRef={state.setTableWrapperRef}
sortDirection={state.sortDirection}
diff --git a/frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx b/frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx
index b5b051c107..4f25b82a00 100644
--- a/frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx
+++ b/frontend-modern/src/components/Dashboard/DashboardWorkloadTable.tsx
@@ -35,6 +35,7 @@ type DashboardWorkloadTableProps = Pick<
| 'setHoveredWorkloadGroupScope'
| 'setHoveredWorkloadId'
| 'setSelectedGuestId'
+ | 'setTableRootRef'
| 'setTableBodyRef'
| 'setTableWrapperRef'
| 'sortDirection'
@@ -50,13 +51,19 @@ type DashboardWorkloadTableProps = Pick<
export function DashboardWorkloadTable(props: DashboardWorkloadTableProps) {
return (
<ComponentErrorBoundary name="Guest Table">
- <Card padding="none" tone="card" class="mb-4 rounded-md">
+ <Card
+ ref={props.setTableRootRef}
+ padding="none"
+ tone="card"
+ class="mb-4 rounded-md"
+ data-summary-clear-surface
+ data-testid="workloads-table-surface"
+ >
<div class="border-b border-border bg-surface-hover px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-muted">
Workloads
</div>
<Table
wrapperRef={props.setTableWrapperRef}
- wrapperProps={{ 'data-summary-clear-surface': '' }}
class="whitespace-nowrap min-w-[max-content]"
style={{
'table-layout': 'fixed',
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.tsx
index 91beedc671..7ce81ada92 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,10 +720,12 @@ 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(dashboardSource).not.toContain('SummaryScopeBar');
+ expect(dashboardSource).not.toContain('searchTrailing={pinnedScopeFallback()}');
+ expect(dashboardSource).not.toContain('mobileTrailing={pinnedScopeFallback()}');
+ expect(dashboardSource).toContain('setTableRootRef={state.setTableRootRef}');
+ expect(dashboardWorkloadTableSource).toContain('data-summary-clear-surface');
+ expect(dashboardWorkloadTableSource).toContain('data-testid="workloads-table-surface"');
expect(dashboardFilterSource).not.toContain('const [filtersOpen, setFiltersOpen] =');
expect(dashboardFilterSource).not.toContain('useBreakpoint');
expect(dashboardFilterSource).not.toContain("props.setSortKey('name')");
diff --git a/frontend-modern/src/components/Dashboard/__tests__/useDashboardSelectionState.test.ts b/frontend-modern/src/components/Dashboard/__tests__/useDashboardSelectionState.test.ts
index b645756ae9..923aa67dc0 100644
--- a/frontend-modern/src/components/Dashboard/__tests__/useDashboardSelectionState.test.ts
+++ b/frontend-modern/src/components/Dashboard/__tests__/useDashboardSelectionState.test.ts
@@ -231,6 +231,7 @@ describe('useDashboardSelectionState', () => {
document.body.appendChild(tableWrapper);
result.setTableWrapperRef(tableWrapper as HTMLDivElement);
+ result.setTableRootRef(tableWrapper as HTMLDivElement);
result.setHoveredWorkloadId('app-container:truenas-main:nextcloud');
expect(result.activeSummaryWorkloadId()).toBe('app-container:truenas-main:nextcloud');
@@ -303,6 +304,7 @@ describe('useDashboardSelectionState', () => {
document.body.appendChild(tableWrapper);
result.setTableWrapperRef(tableWrapper as HTMLDivElement);
+ result.setTableRootRef(tableWrapper as HTMLDivElement);
result.setSelectedGuestId(workloadId);
vi.runAllTimers();
@@ -408,12 +410,6 @@ describe('useDashboardSelectionState', () => {
result.setTableWrapperRef(tableWrapper as HTMLDivElement);
expect(result.focusedSummaryWorkloadGroupId()).toBe('cluster-a');
- expect(result.shouldShowPinnedSummaryScopeFallback()).toBe(false);
-
- top = window.innerHeight + 120;
- window.dispatchEvent(new Event('scroll'));
-
- expect(result.shouldShowPinnedSummaryScopeFallback()).toBe(true);
});
it('clears row focus without leaving behind an inferred agent filter', () => {
diff --git a/frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts b/frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts
index 7ae45d9f03..46f757f430 100644
--- a/frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts
+++ b/frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts
@@ -79,6 +79,9 @@ export function useDashboardSelectionState(options: UseDashboardSelectionStateOp
const setTableWrapperRef = (element: HTMLDivElement | undefined) => {
setTableWrapperRefSignal(element);
+ };
+
+ const setTableRootRef = (element: HTMLDivElement | undefined) => {
summaryInteraction.setTableRootRef(element);
};
@@ -230,8 +233,8 @@ export function useDashboardSelectionState(options: UseDashboardSelectionStateOp
setHoveredWorkloadId,
setSelectedGuestId,
setTableBodyRef,
+ setTableRootRef,
setTableWrapperRef,
- shouldShowPinnedSummaryScopeFallback: summaryInteraction.shouldShowPinnedScopeFallback,
shouldShowJumpToActiveWorkloadRow: summaryInteraction.shouldShowJumpToActiveRow,
tableBodyRef,
} as const;
diff --git a/frontend-modern/src/components/Dashboard/useDashboardState.ts b/frontend-modern/src/components/Dashboard/useDashboardState.ts
index 5f5f5cbd87..6a69b30894 100644
--- a/frontend-modern/src/components/Dashboard/useDashboardState.ts
+++ b/frontend-modern/src/components/Dashboard/useDashboardState.ts
@@ -7,8 +7,6 @@ import { useAlertsActivation } from '@/stores/alertsActivation';
import { usePersistentSignal } from '@/hooks/usePersistentSignal';
import { useWorkloads } from '@/hooks/useWorkloads';
import { useKioskMode } from '@/hooks/useKioskMode';
-import { resolveSummaryScopeState } from '@/components/shared/summaryCardInteraction';
-import { buildSummaryScopePresentation } from '@/components/shared/summaryScopePresentation';
import {
getDashboardDisconnectedState,
getDashboardGuestsEmptyState,
@@ -227,44 +225,15 @@ export function useDashboardState(props: DashboardProps) {
setHoveredWorkloadId,
setSelectedGuestId,
setTableBodyRef,
+ setTableRootRef,
setTableWrapperRef,
shouldShowJumpToActiveWorkloadRow,
- shouldShowPinnedSummaryScopeFallback,
tableBodyRef,
} = useDashboardSelectionState({
filteredGuests,
summaryGroupScopes,
});
- const workloadNamesById = createMemo(() => {
- const names = new Map<string, string>();
- for (const guest of filteredGuests()) {
- const id = getCanonicalWorkloadId(guest);
- if (!id) {
- continue;
- }
- names.set(id, guest.name || id);
- }
- return names;
- });
-
- const pinnedSummaryScopeState = createMemo(() =>
- resolveSummaryScopeState({
- focusedSeriesId: selectedGuestId(),
- focusedGroupScope: focusedSummaryWorkloadGroupScope(),
- }),
- );
- const pinnedSummaryScopePresentation = createMemo(() =>
- buildSummaryScopePresentation({
- allLabel: 'All workloads',
- resolveEntityLabel: (seriesId) => workloadNamesById().get(seriesId) ?? seriesId,
- state: pinnedSummaryScopeState(),
- }),
- );
- const hasPinnedSummaryScope = createMemo(
- () => pinnedSummaryScopeState().source === 'pinned',
- );
-
const {
bottomSpacerHeight,
getGroupLabel,
@@ -365,13 +334,11 @@ export function useDashboardState(props: DashboardProps) {
setSortKey,
setStatusMode,
setTableBodyRef,
+ setTableRootRef,
setTableWrapperRef,
setViewMode,
setWorkloadsSummaryCollapsed,
setWorkloadsSummaryRange,
- pinnedSummaryScopePresentation,
- hasPinnedSummaryScope,
- shouldShowPinnedSummaryScopeFallback,
shouldShowJumpToActiveWorkloadRow,
sortDirection,
sortKey,
diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourceHostTableCard.tsx
index 149cd8d4fa..f33aeb2294 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" data-summary-clear-surface>
+ <div class="overflow-x-auto">
<Table
class="whitespace-nowrap min-w-[max-content]"
style={{
diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourcePBSTableSection.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourcePBSTableSection.tsx
index cebcabbc32..6a5225e863 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" data-summary-clear-surface>
+ <div class="overflow-x-auto">
<Table
class="whitespace-nowrap min-w-[max-content]"
style={{
diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourcePMGTableSection.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourcePMGTableSection.tsx
index 081a5e72f5..6d0b796d71 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" data-summary-clear-surface>
+ <div class="overflow-x-auto">
<Table
class="whitespace-nowrap min-w-[max-content]"
style={{
diff --git a/frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx b/frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx
index d09a422780..ef85f10dc6 100644
--- a/frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx
+++ b/frontend-modern/src/components/Infrastructure/UnifiedResourceTable.tsx
@@ -10,7 +10,12 @@ export const UnifiedResourceTable: Component<UnifiedResourceTableProps> = (props
const table = useUnifiedResourceTableState(props);
return (
- <div ref={props.setTableRootRef} class="space-y-4">
+ <div
+ ref={props.setTableRootRef}
+ class="space-y-4"
+ data-summary-clear-surface
+ data-testid="infrastructure-table-surface"
+ >
<UnifiedResourceHostTableCard table={table} tableProps={props} />
<UnifiedResourceServiceInfrastructureCard table={table} tableProps={props} />
</div>
diff --git a/frontend-modern/src/components/Storage/DiskList.tsx b/frontend-modern/src/components/Storage/DiskList.tsx
index 53f6bf4ac4..cac9c074d6 100644
--- a/frontend-modern/src/components/Storage/DiskList.tsx
+++ b/frontend-modern/src/components/Storage/DiskList.tsx
@@ -144,7 +144,6 @@ export const DiskList: Component<DiskListProps> = (props) => {
<Card padding="none" tone="card" class="overflow-hidden">
<div
class={PHYSICAL_DISK_TABLE_SCROLL_CLASS}
- data-summary-clear-surface
style={{ '-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.tsx
index dcc7f4f9cb..169df6c532 100644
--- a/frontend-modern/src/components/Storage/Storage.tsx
+++ b/frontend-modern/src/components/Storage/Storage.tsx
@@ -4,7 +4,6 @@ import StorageContentCard from '@/components/Storage/StorageContentCard';
import StoragePageBanners from '@/components/Storage/StoragePageBanners';
import StoragePageControls from '@/components/Storage/StoragePageControls';
import StoragePageSummary from '@/components/Storage/StoragePageSummary';
-import { SummaryScopeBar } from '@/components/shared/SummaryScopeBar';
import { StickySummarySection } from '@/components/shared/StickySummarySection';
import { isStorageRecordCeph } from './storagePageState';
import { useStoragePageModel } from './useStoragePageModel';
@@ -58,25 +57,13 @@ const Storage: Component = () => {
jumpToActiveStorageRow,
selectedDiskId,
setChartHoverSync,
- clearPinnedSummaryScope,
setFocusedStorageGroupScope,
setHoveredStorageGroupScope,
setHoveredStorageResourceId,
setSelectedDiskId,
setSummaryTableRootRef,
- hasPinnedSummaryScope,
- pinnedSummaryScopePresentation,
- shouldShowPinnedSummaryScopeFallback,
shouldShowJumpToActiveStorageRow,
} = useStoragePageModel();
- const pinnedScopeFallback = () =>
- hasPinnedSummaryScope() && shouldShowPinnedSummaryScopeFallback() ? (
- <SummaryScopeBar
- testId="storage-summary-scope"
- scope={pinnedSummaryScopePresentation()}
- onReset={clearPinnedSummaryScope}
- />
- ) : undefined;
return (
<div class="space-y-4">
@@ -110,7 +97,6 @@ const Storage: Component = () => {
setView={setView}
search={search}
setSearch={setSearch}
- searchTrailing={pinnedScopeFallback()}
groupBy={groupBy}
setGroupBy={setGroupBy}
sortKey={sortKey}
@@ -126,7 +112,6 @@ const Storage: Component = () => {
selectedNodeId={selectedNodeId}
setSelectedNodeId={setSelectedNodeId}
storageFilterGroupBy={storageFilterGroupBy}
- mobileTrailing={pinnedScopeFallback()}
/>
<StoragePageBanners kind={activeBannerKind} reconnect={reconnect} />
diff --git a/frontend-modern/src/components/Storage/StorageContentCard.tsx b/frontend-modern/src/components/Storage/StorageContentCard.tsx
index 9cf08bf61c..f2d97aabb5 100644
--- a/frontend-modern/src/components/Storage/StorageContentCard.tsx
+++ b/frontend-modern/src/components/Storage/StorageContentCard.tsx
@@ -50,7 +50,14 @@ export const StorageContentCard: Component<StorageContentCardProps> = (props) =>
});
return (
- <Card ref={props.setTableRootRef} padding="none" tone="card" class="overflow-hidden">
+ <Card
+ ref={props.setTableRootRef}
+ padding="none"
+ tone="card"
+ class="overflow-hidden"
+ data-summary-clear-surface
+ data-testid="storage-content-surface"
+ >
<div class={STORAGE_CONTENT_CARD_HEADER_CLASS}>{model.heading()}</div>
<Show when={model.showDisks()}>
<div class={STORAGE_CONTENT_CARD_BODY_CLASS}>
diff --git a/frontend-modern/src/components/Storage/StoragePoolsTable.tsx b/frontend-modern/src/components/Storage/StoragePoolsTable.tsx
index bd74e224dd..a93cf6ee8d 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} data-summary-clear-surface>
+ <div class={STORAGE_POOLS_SCROLL_WRAP_CLASS}>
<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.tsx
index e679f10db8..37a6872f2a 100644
--- a/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx
+++ b/frontend-modern/src/components/Storage/__tests__/Storage.test.tsx
@@ -792,7 +792,6 @@ describe('Storage', () => {
);
});
- expect(screen.queryByTestId('storage-summary-scope')).not.toBeInTheDocument();
expect(
screen.queryByRole('button', { name: 'Unpin summary scope for pve1' }),
).not.toBeInTheDocument();
@@ -816,11 +815,8 @@ describe('Storage', () => {
).toBeTruthy();
});
- const clearSurface = document.querySelector('[data-summary-clear-surface]') as HTMLElement | null;
+ const clearSurface = screen.getByTestId('storage-content-surface');
expect(clearSurface).not.toBeNull();
- if (!clearSurface) {
- return;
- }
fireEvent.click(clearSurface);
diff --git a/frontend-modern/src/components/Storage/useStoragePageModel.ts b/frontend-modern/src/components/Storage/useStoragePageModel.ts
index fcf2fb8c86..e12af6a333 100644
--- a/frontend-modern/src/components/Storage/useStoragePageModel.ts
+++ b/frontend-modern/src/components/Storage/useStoragePageModel.ts
@@ -6,10 +6,8 @@ import {
} from '@/features/storageBackups/storageMetricsIdentity';
import { useKioskMode } from '@/hooks/useKioskMode';
import { useSummaryPageInteractionState } from '@/components/shared/summaryTableFocus';
-import { buildSummaryScopePresentation } from '@/components/shared/summaryScopePresentation';
import {
isSummarySeriesInGroupScope,
- resolveSummaryScopeState,
type SummarySeriesGroupScope,
} from '@/components/shared/summaryCardInteraction';
import { createRouteStateNavigateScheduler } from '@/utils/routeStateNavigation';
@@ -360,33 +358,6 @@ export const useStoragePageModel = () => {
routeStateNavigate.cleanup();
});
- const storageNamesByMetricSeriesId = createMemo(() => {
- const names = new Map<string, string>();
- for (const record of filteredRecords()) {
- names.set(resolveStorageRecordMetricResourceId(record), record.name || record.id);
- }
- for (const disk of physicalDisks()) {
- names.set(resolvePhysicalDiskMetricResourceId(disk), disk.name || disk.id);
- }
- return names;
- });
- const pinnedSummaryScopeState = createMemo(() =>
- resolveSummaryScopeState({
- focusedSeriesId: focusedStorageResourceId(),
- focusedGroupScope: focusedStorageGroupScope(),
- }),
- );
- const pinnedSummaryScopePresentation = createMemo(() =>
- buildSummaryScopePresentation({
- allLabel: 'All storage',
- resolveEntityLabel: (seriesId) => storageNamesByMetricSeriesId().get(seriesId) ?? seriesId,
- state: pinnedSummaryScopeState(),
- }),
- );
- const hasPinnedSummaryScope = createMemo(
- () => pinnedSummaryScopeState().source === 'pinned',
- );
-
return {
activeSummaryScopeState: summaryInteraction.activeScopeState,
activeSummaryStorageGroupScope: summaryInteraction.activeGroupScope,
@@ -434,11 +405,9 @@ export const useStoragePageModel = () => {
hoveredStorageResourceId,
isLoadingPools,
jumpToActiveStorageRow: summaryInteraction.jumpToActiveRow,
- hasPinnedSummaryScope,
focusedSummaryStorageGroupScope: focusedStorageGroupScope,
focusedSummaryStorageGroupId: selectedStorageGroupId,
hoveredSummaryStorageGroupScope: hoveredStorageGroupScope,
- pinnedSummaryScopePresentation,
selectedDiskId,
setChartHoverSync: summaryInteraction.setChartHoverSync,
setFocusedStorageGroupScope,
@@ -446,7 +415,6 @@ export const useStoragePageModel = () => {
setHoveredStorageResourceId,
setSelectedDiskId,
setSummaryTableRootRef: summaryInteraction.setTableRootRef,
- shouldShowPinnedSummaryScopeFallback: summaryInteraction.shouldShowPinnedScopeFallback,
shouldShowJumpToActiveStorageRow: summaryInteraction.shouldShowJumpToActiveRow,
};
};
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index ef120b7ef4..c9aee25701 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -63,8 +63,6 @@ import summaryCardInteractionSource from '@/components/shared/summaryCardInterac
import summaryJumpToRowButtonSource from '@/components/shared/SummaryJumpToRowButton.tsx?raw';
import summaryRowActionButtonSource from '@/components/shared/SummaryRowActionButton.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';
import infrastructureSummaryTableSource from '@/components/shared/InfrastructureSummaryTable.tsx?raw';
import infrastructureSummaryTableRowSource from '@/components/shared/InfrastructureSummaryTableRow.tsx?raw';
@@ -341,24 +339,6 @@ describe('shared primitive guardrails', () => {
expect(workloadsSummarySource).not.toContain('const interactiveWorkloadIds = createMemo');
});
- it('keeps scope-bar presentation on one shared primitive and model', () => {
- expect(summaryScopePresentationSource).toContain('buildSummaryScopePresentation');
- expect(summaryScopePresentationSource).toContain("mode: 'all'");
- expect(summaryScopeBarSource).toContain('SummaryScopeBar');
- 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('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(');
- expect(summaryScopeBarSource).not.toContain('useNavigate(');
- });
-
it('keeps synchronized summary values on one shared card/readout contract', () => {
expect(summaryMetricCardSource).toContain('headerValue?: JSX.Element');
expect(summaryMetricCardSource).toContain("bodyLayout?: 'chart' | 'auto'");
diff --git a/frontend-modern/src/components/shared/SummaryScopeBar.tsx b/frontend-modern/src/components/shared/SummaryScopeBar.tsx
deleted file mode 100644
index d7df62e9ec..0000000000
--- a/frontend-modern/src/components/shared/SummaryScopeBar.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-import { Show, type Component } from 'solid-js';
-import type { SummaryScopePresentation } from './summaryScopePresentation';
-
-interface SummaryScopeBarProps {
- class?: string;
- onReset?: () => void;
- resetLabel?: string;
- scope: SummaryScopePresentation;
- testId?: string;
-}
-
-export const SummaryScopeBar: Component<SummaryScopeBarProps> = (props) => {
- const helperText = () => {
- if (props.scope.contextLabel) {
- return `Within ${props.scope.contextLabel}`;
- }
- return null;
- };
-
- return (
- <div
- data-testid={props.testId}
- data-summary-scope-mode={props.scope.mode}
- 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-xs text-muted">
- Pinned to
- </span>
- <span
- class="min-w-0 max-w-[16rem] truncate text-xs font-medium text-base-content"
- title={props.scope.label}
- >
- {props.scope.label}
- </span>
- <Show when={helperText()}>
- {(text) => (
- <>
- <span aria-hidden="true" class="shrink-0 text-xs text-muted/70">
- •
- </span>
- <span class="min-w-0 max-w-[10rem] truncate text-xs text-muted" title={text()}>
- {text()}
- </span>
- </>
- )}
- </Show>
- <Show when={props.onReset}>
- <button
- type="button"
- 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?.()}
- >
- Reset
- </button>
- </Show>
- </div>
- );
-};
-
-export default SummaryScopeBar;
diff --git a/frontend-modern/src/components/shared/__tests__/SummaryScopeBar.test.tsx b/frontend-modern/src/components/shared/__tests__/SummaryScopeBar.test.tsx
deleted file mode 100644
index e11a6241f6..0000000000
--- a/frontend-modern/src/components/shared/__tests__/SummaryScopeBar.test.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-import { fireEvent, render, screen } from '@solidjs/testing-library';
-import { describe, expect, it, vi } from 'vitest';
-import { SummaryScopeBar } from '@/components/shared/SummaryScopeBar';
-import type { SummaryScopePresentation } from '@/components/shared/summaryScopePresentation';
-
-const renderScopeBar = (scope: SummaryScopePresentation, options?: {
- onReset?: () => void;
-}) =>
- render(() => (
- <SummaryScopeBar
- testId="summary-scope"
- scope={scope}
- onReset={options?.onReset}
- />
- ));
-
-describe('SummaryScopeBar', () => {
- it('renders pinned scope as a compact inline context control', () => {
- renderScopeBar({
- kind: 'group',
- label: 'Production cluster',
- contextLabel: null,
- mode: 'pinned',
- });
-
- const scope = screen.getByTestId('summary-scope');
- expect(scope).toHaveTextContent('Pinned to');
- expect(scope).toHaveTextContent('Production cluster');
- expect(scope).not.toHaveTextContent('Previewing');
- expect(scope).not.toHaveTextContent('Showing');
- });
-
- it('keeps contextual group labels as secondary helper text', () => {
- renderScopeBar({
- kind: 'entity',
- label: 'finance-jump-01',
- contextLabel: 'Production cluster',
- mode: 'pinned',
- });
-
- const scope = screen.getByTestId('summary-scope');
- 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 onReset = vi.fn();
- renderScopeBar(
- {
- kind: 'group',
- label: 'tower',
- contextLabel: null,
- mode: 'pinned',
- },
- { onReset },
- );
-
- const button = screen.getByRole('button', { name: 'Reset pinned scope' });
- expect(button).toHaveTextContent('Reset');
-
- fireEvent.click(button);
- expect(onReset).toHaveBeenCalledTimes(1);
- });
-});
diff --git a/frontend-modern/src/components/shared/__tests__/summaryCardInteraction.test.ts b/frontend-modern/src/components/shared/__tests__/summaryCardInteraction.test.ts
index 046408adb1..e53781ed81 100644
--- a/frontend-modern/src/components/shared/__tests__/summaryCardInteraction.test.ts
+++ b/frontend-modern/src/components/shared/__tests__/summaryCardInteraction.test.ts
@@ -13,7 +13,6 @@ import {
resolveSummaryScopeState,
type SummarySeriesGroupScope,
} from '@/components/shared/summaryCardInteraction';
-import { buildSummaryScopePresentation } from '@/components/shared/summaryScopePresentation';
describe('summaryCardInteraction', () => {
beforeEach(() => {
@@ -202,57 +201,6 @@ describe('summaryCardInteraction', () => {
).toBe('default');
});
- it('builds consistent scope-bar presentation for page, group, and entity states', () => {
- const groupScope: SummarySeriesGroupScope = {
- id: 'cluster-a',
- label: 'Cluster A (2 workloads)',
- seriesIds: ['alpha', 'beta'],
- };
-
- expect(
- buildSummaryScopePresentation({
- allLabel: 'All workloads',
- resolveEntityLabel: (seriesId) => ({ alpha: 'Alpha VM' })[seriesId] ?? seriesId,
- state: resolveSummaryScopeState({}),
- }),
- ).toEqual({
- contextLabel: null,
- kind: 'page',
- label: 'All workloads',
- mode: 'all',
- });
-
- expect(
- buildSummaryScopePresentation({
- allLabel: 'All workloads',
- state: resolveSummaryScopeState({
- hoveredGroupScope: groupScope,
- }),
- }),
- ).toEqual({
- contextLabel: null,
- kind: 'group',
- label: 'Cluster A (2 workloads)',
- mode: 'preview',
- });
-
- expect(
- buildSummaryScopePresentation({
- allLabel: 'All workloads',
- resolveEntityLabel: (seriesId) => ({ alpha: 'Alpha VM' })[seriesId] ?? seriesId,
- state: resolveSummaryScopeState({
- focusedSeriesId: 'alpha',
- focusedGroupScope: groupScope,
- }),
- }),
- ).toEqual({
- contextLabel: 'Cluster A (2 workloads)',
- kind: 'entity',
- label: 'Alpha VM',
- mode: 'pinned',
- });
- });
-
it('filters contextual focus down to interactive series ids through one shared hook', () => {
const [hoveredSeriesId] = createSignal<string | null>('gamma');
const [focusedSeriesId] = createSignal<string | null>('alpha');
diff --git a/frontend-modern/src/components/shared/__tests__/summaryTableFocus.test.tsx b/frontend-modern/src/components/shared/__tests__/summaryTableFocus.test.tsx
index af0c22d5d3..9d4edda7ab 100644
--- a/frontend-modern/src/components/shared/__tests__/summaryTableFocus.test.tsx
+++ b/frontend-modern/src/components/shared/__tests__/summaryTableFocus.test.tsx
@@ -153,80 +153,6 @@ describe('useSummaryPageInteractionState', () => {
expect(scrollTo).toHaveBeenCalledWith({ top: 456, behavior: 'smooth' });
});
- it('shows the pinned-scope fallback when a focused row is mounted outside the viewport', () => {
- const [focusedSeriesId] = createSignal<string | null>('workload-a');
- const root = document.createElement('div');
- const row = document.createElement('div');
- row.setAttribute('data-summary-series-id', 'workload-a');
- Object.defineProperty(row, 'getBoundingClientRect', {
- configurable: true,
- value: () => buildRect(1200),
- });
- root.appendChild(row);
- document.body.appendChild(root);
-
- const { result } = renderHook(() =>
- useSummaryPageInteractionState({
- focusedSeriesId,
- }),
- );
-
- result.setTableRootRef(root);
-
- expect(result.shouldShowPinnedScopeFallback()).toBe(true);
- });
-
- it('keeps the pinned-scope fallback hidden while the focused group row is visible', () => {
- const [focusedGroupId] = createSignal<string | null>('group-a');
- const root = document.createElement('div');
- const row = document.createElement('div');
- row.setAttribute('data-summary-group-id', 'group-a');
- Object.defineProperty(row, 'getBoundingClientRect', {
- configurable: true,
- value: () => buildRect(120),
- });
- root.appendChild(row);
- document.body.appendChild(root);
-
- const { result } = renderHook(() =>
- useSummaryPageInteractionState({
- focusedGroupId,
- }),
- );
-
- result.setTableRootRef(root);
-
- expect(result.shouldShowPinnedScopeFallback()).toBe(false);
- });
-
- it('recomputes pinned-scope fallback visibility when scrolling moves the pinned row off-screen', () => {
- const [focusedSeriesId] = createSignal<string | null>('workload-a');
- let top = 120;
- const root = document.createElement('div');
- const row = document.createElement('div');
- row.setAttribute('data-summary-series-id', 'workload-a');
- Object.defineProperty(row, 'getBoundingClientRect', {
- configurable: true,
- value: () => buildRect(top),
- });
- root.appendChild(row);
- document.body.appendChild(root);
-
- const { result } = renderHook(() =>
- useSummaryPageInteractionState({
- focusedSeriesId,
- }),
- );
-
- result.setTableRootRef(root);
- expect(result.shouldShowPinnedScopeFallback()).toBe(false);
-
- top = 1200;
- window.dispatchEvent(new Event('scroll'));
-
- 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();
diff --git a/frontend-modern/src/components/shared/summaryScopePresentation.ts b/frontend-modern/src/components/shared/summaryScopePresentation.ts
deleted file mode 100644
index 9db3139b71..0000000000
--- a/frontend-modern/src/components/shared/summaryScopePresentation.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-import type {
- SummaryScopeKind,
- SummaryScopeSource,
- SummaryScopeState,
- SummarySeriesGroupScope,
-} from './summaryCardInteraction';
-
-export interface SummaryScopePresentation {
- contextLabel: string | null;
- kind: SummaryScopeKind;
- label: string;
- mode: 'all' | 'preview' | 'pinned';
-}
-
-interface BuildSummaryScopePresentationOptions {
- allLabel: string;
- resolveEntityLabel?: (seriesId: string) => string | null | undefined;
- resolveGroupLabel?: (scope: SummarySeriesGroupScope) => string | null | undefined;
- state: SummaryScopeState;
-}
-
-const modeFromSource = (source: SummaryScopeSource): SummaryScopePresentation['mode'] => {
- switch (source) {
- case 'preview':
- return 'preview';
- case 'pinned':
- return 'pinned';
- default:
- return 'all';
- }
-};
-
-export const buildSummaryScopePresentation = (
- options: BuildSummaryScopePresentationOptions,
-): SummaryScopePresentation => {
- const resolveGroupLabel =
- options.resolveGroupLabel ?? ((scope: SummarySeriesGroupScope) => scope.label ?? scope.id);
- const resolveEntityLabel =
- options.resolveEntityLabel ?? ((seriesId: string) => seriesId);
-
- if (options.state.kind === 'group' && options.state.groupScope) {
- return {
- contextLabel: null,
- kind: 'group',
- label: resolveGroupLabel(options.state.groupScope)?.trim() || options.allLabel,
- mode: modeFromSource(options.state.source),
- };
- }
-
- if (options.state.kind === 'entity' && options.state.seriesId) {
- return {
- contextLabel: options.state.groupScope
- ? (resolveGroupLabel(options.state.groupScope)?.trim() ?? null)
- : null,
- kind: 'entity',
- label: resolveEntityLabel(options.state.seriesId)?.trim() || options.state.seriesId,
- mode: modeFromSource(options.state.source),
- };
- }
-
- return {
- contextLabel: null,
- kind: 'page',
- label: options.allLabel,
- mode: 'all',
- };
-};
diff --git a/frontend-modern/src/components/shared/summaryTableFocus.ts b/frontend-modern/src/components/shared/summaryTableFocus.ts
index 6caf94052a..31224efe44 100644
--- a/frontend-modern/src/components/shared/summaryTableFocus.ts
+++ b/frontend-modern/src/components/shared/summaryTableFocus.ts
@@ -129,30 +129,6 @@ export function useSummaryTableFocusBridge(options: UseSummaryTableFocusBridgeOp
return Boolean(normalizedActiveSeriesId()) && !isActiveRowVisible();
});
- const isPinnedScopeVisible = createMemo<boolean>(() => {
- viewportVersion();
- const focusedId = normalizeSeriesId(focusedSeriesId());
- if (focusedId) {
- const row = focusedRow();
- return row ? isElementVisibleWithinViewport(row) : false;
- }
-
- const focusedGroup = normalizeSeriesId(focusedGroupId());
- if (focusedGroup) {
- const row = focusedGroupRow();
- return row ? isElementVisibleWithinViewport(row) : false;
- }
-
- return false;
- });
-
- const shouldShowPinnedScopeFallback = createMemo<boolean>(() => {
- return (
- Boolean(normalizeSeriesId(focusedSeriesId()) || normalizeSeriesId(focusedGroupId())) &&
- !isPinnedScopeVisible()
- );
- });
-
createEffect(() => {
const root = tableRoot();
if (!root || !options.clearPinnedScope) {
@@ -329,14 +305,48 @@ export function useSummaryTableFocusBridge(options: UseSummaryTableFocusBridgeOp
onCleanup(cleanup);
});
+ createEffect(() => {
+ const focusedId = normalizeSeriesId(focusedGroupId());
+ const root = tableRoot();
+ if (!focusedId || !root || typeof window === 'undefined') {
+ return;
+ }
+
+ let rafId: number | undefined;
+ let remainingFrames = 12;
+
+ const attemptReveal = () => {
+ const row = focusedGroupRow();
+ if (!row) {
+ if (remainingFrames <= 0) {
+ return;
+ }
+ remainingFrames -= 1;
+ rafId = window.requestAnimationFrame(attemptReveal);
+ return;
+ }
+ if (
+ !isElementVisibleWithinViewport(row) &&
+ typeof (row as HTMLElement).scrollIntoView === 'function'
+ ) {
+ row.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
+ }
+ };
+
+ rafId = window.requestAnimationFrame(attemptReveal);
+ onCleanup(() => {
+ if (rafId !== undefined) {
+ window.cancelAnimationFrame(rafId);
+ }
+ });
+ });
+
return {
activeRow,
isActiveRowVisible,
- isPinnedScopeVisible,
jumpToActiveRow,
setTableRootRef: (element: HTMLElement | undefined) => setTableRoot(element ?? null),
shouldShowJumpToActiveRow,
- shouldShowPinnedScopeFallback,
} as const;
}
@@ -402,6 +412,5 @@ export function useSummaryPageInteractionState(options: UseSummaryPageInteractio
setChartHoverSync,
setTableRootRef: tableFocus.setTableRootRef,
shouldShowJumpToActiveRow: tableFocus.shouldShowJumpToActiveRow,
- shouldShowPinnedScopeFallback: tableFocus.shouldShowPinnedScopeFallback,
} as const;
}
diff --git a/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx b/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx
index c1c6f7693e..67acb35bfc 100644
--- a/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx
+++ b/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx
@@ -6,7 +6,6 @@ import { Card } from '@/components/shared/Card';
import { FilterSegmentedControl, LabeledFilterSelect } from '@/components/shared/FilterToolbar';
import { PageControls } from '@/components/shared/PageControls';
import { SearchInput } from '@/components/shared/SearchInput';
-import { SummaryScopeBar } from '@/components/shared/SummaryScopeBar';
import { StickySummarySection } from '@/components/shared/StickySummarySection';
import { UnifiedResourceTable } from '@/components/Infrastructure/UnifiedResourceTable';
import { InfrastructureSummary } from '@/components/Infrastructure/InfrastructureSummary';
@@ -45,7 +44,6 @@ export function InfrastructurePageSurface() {
setGroupingMode,
activeSummaryResourceId,
activeSummaryResourceGroupScope,
- clearPinnedSummaryScope,
focusedSummaryResourceGroupId,
focusedSummaryResourceGroupScope,
expandedResourceId,
@@ -68,9 +66,6 @@ export function InfrastructurePageSurface() {
kioskMode,
sourceOptions,
statusOptions,
- pinnedSummaryScopePresentation,
- hasPinnedSummaryScope,
- shouldShowPinnedSummaryScopeFallback,
hasActiveFilters,
clearFilters,
filteredResources,
@@ -79,15 +74,6 @@ 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();
const infrastructureLoadFailureState = () => getInfrastructureLoadFailureState();
@@ -195,8 +181,6 @@ export function InfrastructurePageSurface() {
onToggle: () => setFiltersOpen((o) => !o),
count: activeFilterCount(),
}}
- searchTrailing={pinnedScopeFallback()}
- mobileTrailing={pinnedScopeFallback()}
resetAction={{
show: hasActiveFilters(),
onClick: clearFilters,
diff --git a/frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.ts b/frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.ts
index 1384b29509..0436afb44f 100644
--- a/frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.ts
+++ b/frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.ts
@@ -3,6 +3,7 @@ import infrastructurePageSurfaceSource from '@/features/infrastructure/Infrastru
import infrastructurePageModelSource from '@/features/infrastructure/infrastructurePageModel.ts?raw';
import infrastructurePageStateSource from '@/features/infrastructure/useInfrastructurePageState.ts?raw';
import infrastructurePageRouteStateSource from '@/features/infrastructure/useInfrastructurePageRouteState.ts?raw';
+import unifiedResourceTableSource from '@/components/Infrastructure/UnifiedResourceTable.tsx?raw';
import unifiedResourceTableStateSource from '@/components/Infrastructure/useUnifiedResourceTableState.ts?raw';
import unifiedResourceTableViewportSyncSource from '@/components/Infrastructure/useUnifiedResourceTableViewportSync.ts?raw';
@@ -50,20 +51,15 @@ describe('InfrastructurePageSurface guardrails', () => {
expect(infrastructurePageSurfaceSource).toContain('focusedSummaryGroupScope={focusedSummaryResourceGroupScope()}');
expect(infrastructurePageSurfaceSource).toContain('onGroupHoverChange={setHoveredResourceGroupScope}');
expect(infrastructurePageSurfaceSource).toContain('setTableRootRef={setSummaryTableRootRef}');
- expect(infrastructurePageSurfaceSource).toContain('SummaryScopeBar');
- 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('SummaryScopeBar');
+ expect(infrastructurePageSurfaceSource).not.toContain('searchTrailing={pinnedScopeFallback()}');
+ expect(infrastructurePageSurfaceSource).not.toContain('mobileTrailing={pinnedScopeFallback()}');
expect(infrastructurePageSurfaceSource).not.toContain('useSummaryPageInteractionState');
expect(infrastructurePageStateSource).toContain('useSummaryPageInteractionState');
expect(infrastructurePageStateSource).toContain('hoveredSummaryResourceGroupScope');
expect(infrastructurePageStateSource).toContain('activeSummaryResourceGroupScope');
expect(infrastructurePageStateSource).toContain('focusedSummaryResourceGroupScope');
- expect(infrastructurePageStateSource).toContain('pinnedSummaryScopePresentation');
- expect(infrastructurePageStateSource).toContain('shouldShowPinnedSummaryScopeFallback');
expect(infrastructurePageStateSource).toContain('clearPinnedSummaryScope');
expect(infrastructurePageStateSource).toContain('setHoveredResourceGroupScope');
expect(infrastructurePageStateSource).toContain('jumpToActiveResourceRow');
@@ -74,6 +70,8 @@ describe('InfrastructurePageSurface guardrails', () => {
expect(infrastructurePageStateSource).not.toContain('setSkipNextFocusedReveal(true)');
expect(infrastructurePageStateSource).not.toContain('querySelector<HTMLElement>(');
expect(infrastructurePageStateSource).not.toContain('scrollIntoView({ behavior: \'smooth\', block: \'center\' })');
+ expect(unifiedResourceTableSource).toContain('data-summary-clear-surface');
+ expect(unifiedResourceTableSource).toContain('data-testid="infrastructure-table-surface"');
expect(infrastructurePageRouteStateSource).not.toContain('useSummaryPageInteractionState');
expect(infrastructurePageRouteStateSource).not.toContain('setSummaryTableRootRef');
diff --git a/frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts b/frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts
index 4e010df386..42cbf72d0f 100644
--- a/frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts
+++ b/frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts
@@ -8,7 +8,6 @@ import { STORAGE_KEYS } from '@/utils/localStorage';
import { useKioskMode } from '@/hooks/useKioskMode';
import { useSummaryPageInteractionState } from '@/components/shared/summaryTableFocus';
import { isSummaryTimeRange } from '@/components/shared/summaryTimeRange';
-import { buildSummaryScopePresentation } from '@/components/shared/summaryScopePresentation';
import { capturePendingAppShellRestoreTop } from '@/utils/appShellScrollRestoration';
import {
buildInfrastructureSummaryGroupScope,
@@ -17,10 +16,8 @@ import {
} from '@/components/Infrastructure/infrastructureSelectors';
import {
isSummarySeriesInGroupScope,
- resolveSummaryScopeState,
type SummarySeriesGroupScope,
} from '@/components/shared/summaryCardInteraction';
-import { getPreferredInfrastructureDisplayName } from '@/utils/resourceIdentity';
import { useInfrastructurePageRouteState } from './useInfrastructurePageRouteState';
import { buildInfrastructurePageFilterDerivation } from './infrastructurePageModel';
@@ -203,33 +200,6 @@ export function useInfrastructurePageState() {
}
});
- const resourceNamesById = createMemo(() => {
- const names = new Map<string, string>();
- for (const resource of filteredResources()) {
- if (!resource.id?.trim()) {
- continue;
- }
- names.set(resource.id.trim(), getPreferredInfrastructureDisplayName(resource));
- }
- return names;
- });
- const pinnedSummaryScopeState = createMemo(() =>
- resolveSummaryScopeState({
- focusedSeriesId: routeState.expandedResourceId(),
- focusedGroupScope: focusedResourceGroupScope(),
- }),
- );
- const pinnedSummaryScopePresentation = createMemo(() =>
- buildSummaryScopePresentation({
- allLabel: 'All resources',
- resolveEntityLabel: (seriesId) => resourceNamesById().get(seriesId) ?? seriesId,
- state: pinnedSummaryScopeState(),
- }),
- );
- const hasPinnedSummaryScope = createMemo(
- () => pinnedSummaryScopeState().source === 'pinned',
- );
-
return {
loading,
error,
@@ -254,9 +224,7 @@ export function useInfrastructurePageState() {
clearPinnedSummaryScope,
focusedSummaryResourceGroupScope: focusedResourceGroupScope,
focusedSummaryResourceGroupId: routeState.focusedResourceGroupId,
- hasPinnedSummaryScope,
hoveredSummaryResourceGroupScope: hoveredResourceGroupScope,
- pinnedSummaryScopePresentation,
...routeState,
chartHoverSync: summaryInteraction.chartHoverSync,
isMobile,
@@ -278,7 +246,6 @@ export function useInfrastructurePageState() {
setChartHoverSync: summaryInteraction.setChartHoverSync,
setHoveredResourceGroupScope,
setSummaryTableRootRef,
- shouldShowPinnedSummaryScopeFallback: summaryInteraction.shouldShowPinnedScopeFallback,
shouldShowJumpToActiveResourceRow: summaryInteraction.shouldShowJumpToActiveRow,
setFocusedResourceGroupId,
};
diff --git a/tests/integration/tests/48-summary-hover-selection.spec.ts b/tests/integration/tests/48-summary-hover-selection.spec.ts
index 062063f94d..52399924f6 100644
--- a/tests/integration/tests/48-summary-hover-selection.spec.ts
+++ b/tests/integration/tests/48-summary-hover-selection.spec.ts
@@ -1000,21 +1000,20 @@ test.describe.serial("Summary hover selection", () => {
{
path: "/workloads",
summaryTestId: "workloads-summary",
- scopeBarTestId: "workloads-summary-scope",
+ clearSurfaceTestId: "workloads-table-surface",
tableRowSelector: "tr[data-guest-id]",
},
{
path: "/infrastructure",
summaryTestId: "infrastructure-summary",
- scopeBarTestId: "infrastructure-summary-scope",
+ clearSurfaceTestId: "infrastructure-table-surface",
tableRowSelector: "tr[data-summary-series-id]",
},
] as const) {
await page.goto(surface.path, { waitUntil: "domcontentloaded" });
const summary = page.getByTestId(surface.summaryTestId);
- const scopeBar = page.getByTestId(surface.scopeBarTestId);
await expect(summary).toBeVisible();
- await expect(scopeBar).toHaveCount(0);
+ await expect(page.getByText("Pinned to")).toHaveCount(0);
await expect
.poll(async () => {
@@ -1059,19 +1058,19 @@ test.describe.serial("Summary hover selection", () => {
}
await matchedGroupRow.hover();
- await expect(scopeBar).toHaveCount(0);
+ await expect(page.getByText("Pinned to")).toHaveCount(0);
await expect(page.locator('tr[data-summary-group-member-active="preview"]')).toHaveCount(
matchedGroupSeriesCount,
);
await page.mouse.move(1, 1);
- await expect(scopeBar).toHaveCount(0);
+ await expect(page.getByText("Pinned to")).toHaveCount(0);
await expect(page.locator('tr[data-summary-group-member-active="preview"]')).toHaveCount(0);
await matchedGroupRow.click();
await expect
.poll(() => new URL(page.url()).searchParams.get("summaryGroup"))
.toBe(matchedGroupId);
- await expect(scopeBar).toHaveCount(0);
+ await expect(page.getByText("Pinned to")).toHaveCount(0);
await expect(page.locator('tr[data-summary-group-member-active="preview"]')).toHaveCount(
matchedGroupSeriesCount,
);
@@ -1113,19 +1112,15 @@ test.describe.serial("Summary hover selection", () => {
}, matchedGroupId),
)
.toBe(true);
- await expect(scopeBar).toHaveCount(1);
- 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(page.getByText("Pinned to")).toHaveCount(0);
+
+ await page.getByTestId(surface.clearSurfaceTestId).evaluate((element) => {
+ element.dispatchEvent(new MouseEvent("click", { bubbles: true }));
+ });
await expect
.poll(() => new URL(page.url()).searchParams.get("summaryGroup"))
.toBeNull();
- await expect(scopeBar).toHaveCount(0);
+ await expect(page.getByText("Pinned to")).toHaveCount(0);
await expect(page.locator('tr[data-summary-group-member-active="pinned"]')).toHaveCount(0);
await page.mouse.move(1, 1);
await expect
@@ -1146,9 +1141,9 @@ test.describe.serial("Summary hover selection", () => {
await page.goto("/storage?group=node", { waitUntil: "domcontentloaded" });
const storageSummary = page.getByTestId("storage-summary");
- const storageScopeBar = page.getByTestId("storage-summary-scope");
+ const storageContentSurface = page.getByTestId("storage-content-surface");
await expect(storageSummary).toBeVisible();
- await expect(storageScopeBar).toHaveCount(0);
+ await expect(page.getByText("Pinned to")).toHaveCount(0);
await expect
.poll(async () => {
@@ -1193,19 +1188,19 @@ test.describe.serial("Summary hover selection", () => {
}
await matchedGroupRow.hover();
- await expect(storageScopeBar).toHaveCount(0);
+ await expect(page.getByText("Pinned to")).toHaveCount(0);
await expect(page.locator('tr[data-summary-group-member-active="preview"]')).toHaveCount(
matchedGroupSeriesCount,
);
await page.mouse.move(1, 1);
- await expect(storageScopeBar).toHaveCount(0);
+ await expect(page.getByText("Pinned to")).toHaveCount(0);
await expect(page.locator('tr[data-summary-group-member-active="preview"]')).toHaveCount(0);
await matchedGroupRow.click();
await expect
.poll(() => new URL(page.url()).searchParams.get("summaryGroup"))
.toBe(matchedGroupId);
- await expect(storageScopeBar).toHaveCount(0);
+ await expect(page.getByText("Pinned to")).toHaveCount(0);
await expect(page.locator('tr[data-summary-group-member-active="preview"]')).toHaveCount(
matchedGroupSeriesCount,
);
@@ -1244,20 +1239,16 @@ test.describe.serial("Summary hover selection", () => {
}, matchedGroupId),
)
.toBe(true);
- await expect(storageScopeBar).toHaveCount(1);
- await expect(storageScopeBar).toContainText("Pinned to");
+ await expect(page.getByText("Pinned to")).toHaveCount(0);
- await page
- .locator("[data-summary-clear-surface]")
- .first()
- .evaluate((element) => {
- element.dispatchEvent(new MouseEvent("click", { bubbles: true }));
- });
+ await storageContentSurface.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"))
.toBeNull();
- await expect(storageScopeBar).toHaveCount(0);
+ await expect(page.getByText("Pinned to")).toHaveCount(0);
await page.mouse.move(1, 1);
await expect
.poll(() => readRenderedSeriesCounts(storageSummary))