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): restore anchored inline drawer reveal
rcourtman01e4633a5eb1
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 450a89778b..86ff33d7a7 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -133,6 +133,7 @@ work extends shared components instead of creating new local variants.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`## Shared Boundaries@@ -153,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. When a page/group/entity scope is active on workloads, infrastructure, or storage, the page shell must surface that state through the shared `frontend-modern/src/components/shared/SummaryScopeBar.tsx` plus `frontend-modern/src/components/shared/summaryScopePresentation.ts` contract instead of inventing page-local chips, breadcrumbs, or hidden route-only focus. That shared scope presenter must read like native page context, not a pill/badge widget: it should distinguish transient preview from pinned focus with quiet inline language, keep the current scope visible even when the sticky summary is collapsed or off-screen, and expose a clear reset path for pinned scope so touch-only operators do not depend on hover or “click the same row again” discovery. When the active row is off-screen, page owners must still route through `frontend-modern/src/components/shared/summaryTableFocus.ts` and surface a lightweight `Jump to row` affordance that reveals and scrolls only on explicit user action. Deliberate row focus may reveal inline detail automatically, but that reveal must be drawer-aware: 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 in place instead of looking like a page refresh, while storage and other non-local reveal paths may still scroll only enough to keep the row header plus the top of the inline detail visible.+11. Keep summary-to-table coordination deliberate, explicit, and reversible. Shared summary hover may highlight the matching table row when it is already visible, but transient chart hover must not auto-filter tables, auto-scroll the page, or reshuffle table ordering. When a page/group/entity scope is active on workloads, infrastructure, or storage, the page shell must surface that state through the shared `frontend-modern/src/components/shared/SummaryScopeBar.tsx` plus `frontend-modern/src/components/shared/summaryScopePresentation.ts` contract instead of inventing page-local chips, breadcrumbs, or hidden route-only focus. That shared scope presenter must read like native page context, not a pill/badge widget: it should distinguish transient preview from pinned focus with quiet inline language, keep the current scope visible even when the sticky summary is collapsed or off-screen, and expose a clear reset path for pinned scope so touch-only operators do not depend on hover or “click the same row again” discovery. When the active row is off-screen, page owners must still route through `frontend-modern/src/components/shared/summaryTableFocus.ts` and surface a lightweight `Jump to row` affordance that reveals and scrolls only on explicit user action. Deliberate row focus may reveal inline detail automatically, but that reveal must be drawer-aware: 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`.@@ -171,11 +172,12 @@ work extends shared components instead of creating new local variants.12. Keep summary-linked table row emphasis on the shared primitive contract. Workloads, infrastructure, and storage rows that mirror the active summary entity must expose that state through `data-summary-row-active` and let the shared presentation in `frontend-modern/src/index.css` render the row emphasis, rather than carrying page-local sky or blue fill classes inside each row renderer.13. Keep retained-value data loading honest at the ownership boundary. Helpersthat prevent a feature surface from falling through the app-level Suspense- boundary during in-flight refresh belong under that feature's- `frontend-modern/src/features/` owner until multiple surfaces truly share- the behavior; do not promote them into `components/shared/` or a generic- global hook namespace just because more than one local hook calls them- inside the same feature area.+ boundary during in-flight refresh should stay feature-local until multiple+ governed surfaces truly share the behavior. Once that boundary is shared,+ promote the helper into an explicit shared hook owner such as+ `frontend-modern/src/hooks/createNonSuspendingQuery.ts` rather than+ re-copying suspense-escape logic into each feature area or burying it+ inside one feature's private state model.## Forbidden Paths@@ -363,6 +365,13 @@ The subsystem registry now also requires explicit proof-policy coverage for allshared runtime files, and shared-component guardrails fail if raw tablecomposition is reintroduced in new shared components outside the canonicalallowlist.+Retained-value query ownership is now part of that shared floor too.+`frontend-modern/src/hooks/createNonSuspendingQuery.ts` is the canonical+shared helper for page-local fetches that must stay inside the mounted+surface instead of falling through the app-level `Loading view...` fallback.+Feature slices such as recovery and infrastructure drawers may consume that+helper, but they must not fork new suspense-escape helpers once the shared+contract exists.The settings reporting shell now also owns a deliberate split betweenhistorical performance reports and current-state VM inventory export.`frontend-modern/src/components/Settings/ReportingPanel.tsx`,diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex 9a3d9b8f9c..60989de145 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -262,6 +262,11 @@ card instead of dimming the rest of the map into unusable background noise orswapping the hot path into a transient single-series chart. Line-cardisolation must still flow through the shared sparkline runtime instead of apage-local focus overlay.+That same hot-path rule now also covers infrastructure drawer hydration. Row+focus may mount drawer-local facet and intelligence fetches, but those+requests must retain the mounted page shell through the shared non-suspending+query helper instead of bubbling a transient `Loading view...` fallback through+`AppLayout.tsx` when an inline infrastructure drawer opens.That same hot-path rule now has one shared runtime boundary. Interactive-seriesfiltering, active-series derivation, focused-label lookup, and localscroll-preserving row focus must extend@@ -275,10 +280,11 @@ must still flow through the shared contextual-focus and summary-table helpers.Direct row toggles that already have the row in view must capture the currentapp-shell scroll position before the focus write and let the remounted rootshell restore that position, so the interaction stays anchored instead of-looking like a full refresh; non-local reveal paths may still mark the-movement as deliberate so route-state restore does not replay over it, and-then scroll only enough to keep the row header plus the top of the detail-visible instead of hard-centering every expansion.+looking like a full refresh. Once the drawer is mounted, the shared reveal+helper must still take over whenever the opened detail would land below the+fold, marking that movement as deliberate so route-state restore does not+replay over it and then scrolling only enough to keep the row header plus the+top of the detail visible instead of hard-centering every expansion.That same hot-path ownership now includes summary cache invalidation.Infrastructure and workload summary caches may hydrate charts for fast remounts,but when the summary chart timeline contract changes, the cache version mustdiff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex 56f2486b91..6b4eafbe29 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -2515,6 +2515,7 @@"frontend-modern/src/features/dashboardOverview/TrendCharts.tsx","frontend-modern/src/features/operations/operationsPageModel.ts","frontend-modern/src/features/operations/OperationsPageSurface.tsx",+ "frontend-modern/src/hooks/createNonSuspendingQuery.ts","frontend-modern/src/pages/Operations.tsx","frontend-modern/src/utils/aiSettingsPresentation.ts","frontend-modern/src/utils/dashboardEmptyStatePresentation.ts",@@ -2821,6 +2822,19 @@"frontend-modern/src/utils/__tests__/systemLogsPresentation.test.ts"]},+ {+ "id": "retained-value-query-helper",+ "label": "retained-value query helper proof",+ "match_prefixes": [],+ "match_files": [+ "frontend-modern/src/hooks/createNonSuspendingQuery.ts"+ ],+ "allow_same_subsystem_tests": false,+ "test_prefixes": [],+ "exact_files": [+ "frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx"+ ]+ },{"id": "dashboard-overview-feature-surface","label": "dashboard overview feature proof",@@ -4079,7 +4093,6 @@],"match_files": ["frontend-modern/src/components/Recovery/DashboardRecoveryStatusPanel.tsx",- "frontend-modern/src/features/recovery/createNonSuspendingQuery.ts","frontend-modern/src/features/recovery/useRecoverySurfaceState.ts","frontend-modern/src/hooks/useDashboardRecovery.ts","frontend-modern/src/hooks/useRecoveryPoints.ts",diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex a0a27a441f..40cfa94b12 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -44,17 +44,16 @@ querying, and the operator-facing storage health presentation layer.18. `frontend-modern/src/hooks/useRecoveryRollups.ts`19. `frontend-modern/src/hooks/useRecoveryPointsFacets.ts`20. `frontend-modern/src/hooks/useRecoveryPointsSeries.ts`-21. `frontend-modern/src/features/recovery/createNonSuspendingQuery.ts`-22. `frontend-modern/src/pages/RecoveryRoute.tsx`-23. `frontend-modern/src/routing/resourceLinks.ts`-24. `frontend-modern/src/pages/Dashboard.tsx`-25. `frontend-modern/src/features/dashboardOverview/dashboardWidgets.ts`-26. `frontend-modern/src/components/Recovery/DashboardRecoveryStatusPanel.tsx`-27. `frontend-modern/src/components/Storage/DashboardStoragePanel.tsx`-28. `frontend-modern/src/types/recovery.ts`-29. `frontend-modern/src/utils/recoverySummaryPresentation.ts`-30. `frontend-modern/src/utils/recoveryTablePresentation.ts`-31. `frontend-modern/src/utils/textPresentation.ts`+21. `frontend-modern/src/pages/RecoveryRoute.tsx`+22. `frontend-modern/src/routing/resourceLinks.ts`+23. `frontend-modern/src/pages/Dashboard.tsx`+24. `frontend-modern/src/features/dashboardOverview/dashboardWidgets.ts`+25. `frontend-modern/src/components/Recovery/DashboardRecoveryStatusPanel.tsx`+26. `frontend-modern/src/components/Storage/DashboardStoragePanel.tsx`+27. `frontend-modern/src/types/recovery.ts`+28. `frontend-modern/src/utils/recoverySummaryPresentation.ts`+29. `frontend-modern/src/utils/recoveryTablePresentation.ts`+30. `frontend-modern/src/utils/textPresentation.ts`## Shared Boundaries@@ -232,7 +231,7 @@ querying, and the operator-facing storage health presentation layer.`frontend-modern/src/features/recovery/useRecoverySurfaceState.ts` and therecovery data hooks may retain the last fulfilled rollups, points, facets,and series while the next request is in flight through- `frontend-modern/src/features/recovery/createNonSuspendingQuery.ts`, but+ the shared `frontend-modern/src/hooks/createNonSuspendingQuery.ts`, butthat retained-value behavior must stay route-owned and filter-owned throughthe canonical recovery state model instead of recreating page-localsuspense escape hatches in `Recovery.tsx` or the recovery sections.@@ -268,6 +267,11 @@ they do not own the timeline store itself. The canonical resource-changehistory now lives in `internal/unifiedresources/store.go` and is surfacedthrough the shared API/resource wiring, which keeps storage and recovery focusedon presentation and query shape rather than re-implementing change persistence.+The retained-value recovery transport helper is now shared too.+Recovery still owns when rollups, points, facets, and series refetch, but the+non-suspending query primitive itself now lives under the shared frontend+primitives contract so other governed surfaces can reuse the same app-shell+fallback boundary without forking it.That same shared-resource dependency now also assumes frontend compatibilitynormalization collapses any legacy top-level `truenas` payload into canonical`agent` plus `platformType: 'truenas'` before shared route or filter logicdiff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex c223559647..562d305c86 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -263,6 +263,12 @@ may keep an in-memory remount cache for canonical resource charts, but the keymust carry an explicit summary contract version so a long-lived browser tabcannot resurrect older unified-resource summary shapes after the chart model oridentity mapping changes.+That same consumer ownership now also includes infrastructure drawer history+fetches. `frontend-modern/src/components/Infrastructure/useResourceDetailDrawerHistoryState.ts`+may hydrate canonical facet and intelligence data for the selected resource,+but it must do so through the shared retained-value query helper so opening a+resource drawer never drops the whole infrastructure surface into the app-level+`Loading view...` fallback.VMware vSphere now follows the same admission rule. In the admitted phase-1direction, vCenter is the connection authority but not atop-level unified resource: ESXi hosts must project as canonical `agent`@@ -316,9 +322,11 @@ tag that detail with the canonical active resource ID. Direct row toggles thatalready have the row in view must capture the current `.app-scroll-shell`position through `frontend-modern/src/utils/appShellScrollRestoration.ts`, sothe remounted root shell in `frontend-modern/src/App.tsx` can stay anchored,-while non-local reveal paths may still let the shared-summary-table/contextual-focus helpers reveal only enough of the drawer to show-the row header plus the start of the detail.+and then still hand off to the shared summary-table/contextual-focus helpers+when the opened drawer would otherwise fall below the fold. That reveal must+scroll only enough of the infrastructure table to keep the row header plus the+start of the detail visible, not leave the drawer clipped and not hard-center+the selected row.`useUnifiedResourceTableViewportSync.ts` must stay viewport-only; it may notgrow a second selected-row reveal path or a resource-local centering rule.That same unified-resource boundary now also owns stored metrics-targetdiff --git a/frontend-modern/src/components/Dashboard/__tests__/useDashboardSelectionState.test.ts b/frontend-modern/src/components/Dashboard/__tests__/useDashboardSelectionState.test.tsindex 10e008ab37..0789a0b6d1 100644--- a/frontend-modern/src/components/Dashboard/__tests__/useDashboardSelectionState.test.ts+++ b/frontend-modern/src/components/Dashboard/__tests__/useDashboardSelectionState.test.ts@@ -242,7 +242,7 @@ describe('useDashboardSelectionState', () => {expect(row.scrollIntoView).toHaveBeenCalledWith({ behavior: 'smooth', block: 'center' });});- it('opens mounted workload detail in place when the row itself triggers focus', () => {+ it('smart-reveals mounted workload detail when the row itself triggers focus near the fold', () => {locationSearch = '?type=app-container&platform=truenas&agent=truenas-main';const workloadId = 'app-container:truenas-main:nextcloud';const [filteredGuests] = createSignal<WorkloadGuest[]>([@@ -314,7 +314,7 @@ describe('useDashboardSelectionState', () => {'behavior' in firstArg &&firstArg.behavior === 'smooth',),- ).toBe(false);+ ).toBe(true);});it('tracks hovered workload groups without letting them override entity selection outside scope', () => {diff --git a/frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts b/frontend-modern/src/components/Dashboard/useDashboardSelectionState.tsindex d24bf6fa6e..024ee036bf 100644--- a/frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts+++ b/frontend-modern/src/components/Dashboard/useDashboardSelectionState.ts@@ -38,7 +38,6 @@ export function useDashboardSelectionState(options: UseDashboardSelectionStateOpconst [handledResourceId, setHandledResourceId] = createSignal<string | null>(null);const [handledWorkloadGroupId, setHandledWorkloadGroupId] = createSignal<string | null>(null);const [revealedGuestId, setRevealedGuestId] = createSignal<string | null>(null);- const [skipNextFocusedReveal, setSkipNextFocusedReveal] = createSignal(false);const [tableWrapperRef, setTableWrapperRefSignal] = createSignal<HTMLDivElement | undefined>(undefined,@@ -58,13 +57,6 @@ export function useDashboardSelectionState(options: UseDashboardSelectionStateOpfocusedSeriesId: selectedGuestId,focusedGroupScope: focusedWorkloadGroupScope,revealActiveSeries: setRevealedGuestId,- consumeNextFocusedRevealSkip: () => {- const shouldSkip = skipNextFocusedReveal();- if (shouldSkip) {- setSkipNextFocusedReveal(false);- }- return shouldSkip;- },});const setTableWrapperRef = (element: HTMLDivElement | undefined) => {@@ -80,9 +72,6 @@ export function useDashboardSelectionState(options: UseDashboardSelectionStateOpconst setSelectedGuestId = (id: string | null) => {capturePendingAppShellRestoreTop();- if (id) {- setSkipNextFocusedReveal(true);- }const activeFocusedGroupScope = focusedWorkloadGroupScope();const nextGroupScope =activeFocusedGroupScope && !isSummarySeriesInGroupScope(activeFocusedGroupScope, id)diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsxindex 99f8a2a4ad..2f93ed8f62 100644--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx@@ -1,5 +1,6 @@import { describe, expect, it, vi } from 'vitest';import { fireEvent, render, screen, within } from '@solidjs/testing-library';+import { Suspense } from 'solid-js';import discoveryTabSource from '@/components/Discovery/DiscoveryTab.tsx?raw';import discoveryTabStateSource from '@/components/Discovery/useDiscoveryTabState.ts?raw';@@ -140,7 +141,11 @@ describe('ResourceDetailDrawer change history section', () => {expect(resourceDetailDrawerStateSource).toContain('const [showHistoryFilters, setShowHistoryFilters]');expect(resourceDetailDrawerStateSource).not.toContain('createResource(');expect(resourceDetailDrawerStateSource).not.toContain('MonitoringAPI.');- expect(resourceDetailDrawerHistoryStateSource).toContain('createResource(');+ expect(resourceDetailDrawerHistoryStateSource).toContain(+ "from '@/hooks/createNonSuspendingQuery'",+ );+ expect(resourceDetailDrawerHistoryStateSource).toContain('createNonSuspendingQuery');+ expect(resourceDetailDrawerHistoryStateSource).not.toContain('createResource(');expect(resourceDetailDrawerHistoryStateSource).toContain('ResourceAPI.getFacetBundle');expect(resourceDetailDrawerHistoryStateSource).toContain('AIAPI.getResourceIntelligence');expect(resourceDetailDrawerDerivedStateSource).toContain('toDiscoveryConfig');@@ -215,6 +220,26 @@ describe('ResourceDetailDrawer change history section', () => {);});+ it('keeps drawer history fetches out of the page-level suspense fallback', async () => {+ const pendingFacetBundle = new Promise(() => {});+ const pendingIntelligence = new Promise(() => {});+ facetBundleMock.getFacetBundle.mockImplementationOnce(() => pendingFacetBundle as never);+ aiIntelligenceMock.getResourceIntelligence.mockImplementationOnce(+ () => pendingIntelligence as never,+ );++ render(() => (+ <Suspense fallback={<div>Loading view...</div>}>+ <ResourceDetailDrawer resource={baseResource({ recentChanges: [] })} />+ </Suspense>+ ));++ await Promise.resolve();++ expect(screen.queryByText('Loading view...')).not.toBeInTheDocument();+ expect(screen.getByText('Current state')).toBeInTheDocument();+ });+it('keeps compact timeline summary chips in overview while showing one embedded change history section', async () => {facetBundleMock.getFacetBundle.mockResolvedValueOnce({capabilities: [diff --git a/frontend-modern/src/components/Infrastructure/useResourceDetailDrawerHistoryState.ts b/frontend-modern/src/components/Infrastructure/useResourceDetailDrawerHistoryState.tsindex a8c28ae354..80e92bce24 100644--- a/frontend-modern/src/components/Infrastructure/useResourceDetailDrawerHistoryState.ts+++ b/frontend-modern/src/components/Infrastructure/useResourceDetailDrawerHistoryState.ts@@ -1,4 +1,4 @@-import { createMemo, createResource, createSignal } from 'solid-js';+import { createMemo, createSignal } from 'solid-js';import type {Resource,ResourceChangeKind,@@ -8,11 +8,21 @@ import type {import type { ResourceIntelligence } from '@/types/aiIntelligence';import { AIAPI } from '@/api/ai';import { ResourceAPI } from '@/api/resources';+import { createNonSuspendingQuery } from '@/hooks/createNonSuspendingQuery';interface UseResourceDetailDrawerHistoryStateOptions {resource: Resource;}+type ResourceFacetBundle = Awaited<ReturnType<typeof ResourceAPI.getFacetBundle>> | null;++type TimelineFacetRequest = {+ id: string;+ kind: ResourceChangeKind | '';+ sourceType: ResourceChangeSourceType | '';+ sourceAdapter: ResourceChangeSourceAdapter | '';+};+export const useResourceDetailDrawerHistoryState = (options: UseResourceDetailDrawerHistoryStateOptions,) => {@@ -32,23 +42,26 @@ export const useResourceDetailDrawerHistoryState = (return id ? { id } : null;});- const [resourceFacets, { refetch: refetchResourceFacets }] = createResource(- resourceFacetRequest,- async (request) => {+ const resourceFacetsState = createNonSuspendingQuery<ResourceFacetBundle, { id: string }>({+ source: resourceFacetRequest,+ fetcher: async (request) => {if (!request?.id) return null;return ResourceAPI.getFacetBundle(request.id, { limit: 25 });},- { initialValue: null },- );+ initialValue: null,+ });+ const resourceFacets = resourceFacetsState.value;+ const refetchResourceFacets = resourceFacetsState.refetch;- const [resourceIntelligence] = createResource(- resourceFacetRequest,- async (request) => {+ const resourceIntelligenceState = createNonSuspendingQuery<ResourceIntelligence | null, { id: string }>({+ source: resourceFacetRequest,+ fetcher: async (request) => {if (!request?.id) return null;return AIAPI.getResourceIntelligence(request.id);},- { initialValue: null as ResourceIntelligence | null },- );+ initialValue: null,+ });+ const resourceIntelligence = resourceIntelligenceState.value;const timelineFacetRequest = createMemo(() => {const id = resourceFacetId();@@ -60,9 +73,9 @@ export const useResourceDetailDrawerHistoryState = (return { id, kind, sourceType, sourceAdapter };});- const [timelineFacets, { refetch: refetchTimelineFacets }] = createResource(- timelineFacetRequest,- async (request) => {+ const timelineFacetsState = createNonSuspendingQuery<ResourceFacetBundle, TimelineFacetRequest>({+ source: timelineFacetRequest,+ fetcher: async (request) => {if (!request) return null;return ResourceAPI.getFacetBundle(request.id, {limit: 25,@@ -71,29 +84,37 @@ export const useResourceDetailDrawerHistoryState = (sourceAdapter: request.sourceAdapter || undefined,});},- { initialValue: null },- );+ initialValue: null,+ });+ const timelineFacets = timelineFacetsState.value;+ const refetchTimelineFacets = timelineFacetsState.refetch;const resourceTimeline = createMemo(() => resourceFacets()?.recentChanges ?? resource.recentChanges ?? [],);- const resourceFacetCounts = createMemo(() => resourceFacets()?.counts ?? resource.facetCounts ?? null);+ const resourceFacetCounts = createMemo(+ () => resourceFacets()?.counts ?? resource.facetCounts ?? null,+ );const historyFacetBundle = createMemo(() =>timelineFacetRequest() ? (timelineFacets() ?? resourceFacets()) : resourceFacets(),);const historyFacetCounts = createMemo(() => historyFacetBundle()?.counts ?? resourceFacetCounts() ?? null,);- const historyRecentChanges = createMemo(() => historyFacetBundle()?.recentChanges ?? resourceTimeline());+ const historyRecentChanges = createMemo(+ () => historyFacetBundle()?.recentChanges ?? resourceTimeline(),+ );const historyTimeline = createMemo(() => historyRecentChanges());const hasTimelineFilters = createMemo(() =>Boolean(timelineKindFilter() || timelineSourceTypeFilter() || timelineSourceAdapterFilter()),);const historyLoadingLabel = createMemo(() => {if (timelineFacetRequest()) {- return timelineFacets.loading ? 'Refreshing filtered changes...' : 'Filtered changes loaded';+ return timelineFacetsState.loading()+ ? 'Refreshing filtered changes...'+ : 'Filtered changes loaded';}- return resourceFacets.loading ? 'Refreshing changes...' : 'Changes loaded';+ return resourceFacetsState.loading() ? 'Refreshing changes...' : 'Changes loaded';});const resourceTimelineCount = createMemo(() => historyFacetCounts()?.recentChanges ?? historyRecentChanges().length,@@ -108,7 +129,9 @@ export const useResourceDetailDrawerHistoryState = (}),);const facetBundleError = createMemo(() => {- const error = timelineFacetRequest() ? timelineFacets.error : resourceFacets.error;+ const error = timelineFacetRequest()+ ? timelineFacetsState.error()+ : resourceFacetsState.error();if (!error) return '';return (error as Error)?.message || 'Failed to load resource history';});diff --git a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsxindex ccfeab131a..9c26a8ad94 100644--- a/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx+++ b/frontend-modern/src/components/Recovery/__tests__/Recovery.test.tsx@@ -1,6 +1,11 @@import { cleanup, fireEvent, render, screen, waitFor, within } from '@solidjs/testing-library';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import Recovery from '@/components/Recovery/Recovery';+import createNonSuspendingQuerySource from '@/hooks/createNonSuspendingQuery.ts?raw';+import useRecoveryPointsFacetsSource from '@/hooks/useRecoveryPointsFacets.ts?raw';+import useRecoveryPointsSeriesSource from '@/hooks/useRecoveryPointsSeries.ts?raw';+import useRecoveryPointsSource from '@/hooks/useRecoveryPoints.ts?raw';+import useRecoveryRollupsSource from '@/hooks/useRecoveryRollups.ts?raw';import { parseRecoveryDateKey } from '@/utils/recoveryDatePresentation';import { STORAGE_KEYS } from '@/utils/localStorage';import { ROUTE_STATE_REPLACE_OPTIONS } from '@/utils/routeStateNavigation';@@ -219,6 +224,23 @@ describe('Recovery', () => {cleanup();});+ it('keeps recovery polling on the shared retained-value query primitive', () => {+ expect(createNonSuspendingQuerySource).toContain('export function createNonSuspendingQuery');+ expect(createNonSuspendingQuerySource).toContain('retaining the last fulfilled value');+ expect(useRecoveryRollupsSource).toContain("from '@/hooks/createNonSuspendingQuery'");+ expect(useRecoveryPointsSource).toContain("from '@/hooks/createNonSuspendingQuery'");+ expect(useRecoveryPointsFacetsSource).toContain("from '@/hooks/createNonSuspendingQuery'");+ expect(useRecoveryPointsSeriesSource).toContain("from '@/hooks/createNonSuspendingQuery'");+ expect(useRecoveryRollupsSource).not.toContain("from '@/features/recovery/createNonSuspendingQuery'");+ expect(useRecoveryPointsSource).not.toContain("from '@/features/recovery/createNonSuspendingQuery'");+ expect(useRecoveryPointsFacetsSource).not.toContain(+ "from '@/features/recovery/createNonSuspendingQuery'",+ );+ expect(useRecoveryPointsSeriesSource).not.toContain(+ "from '@/features/recovery/createNonSuspendingQuery'",+ );+ });+it('renders protected rollups and resolves unified resource names', async () => {render(() => <Recovery />);diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex 6902974da5..ec6a468f49 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -312,7 +312,6 @@ describe('shared primitive guardrails', () => {expect(summaryTableFocusSource).toContain('focusedSeriesId');expect(summaryTableFocusSource).toContain('findInlineDetailElement');expect(summaryTableFocusSource).toContain('revealInlineDetailInViewport');- expect(summaryTableFocusSource).toContain('consumeNextFocusedRevealSkip');expect(summaryTableFocusSource).toContain('MutationObserver');expect(summaryTableFocusSource).toContain('querySelector<HTMLElement>(');expect(summaryTableFocusSource).toContain(diff --git a/frontend-modern/src/components/shared/__tests__/summaryTableFocus.test.tsx b/frontend-modern/src/components/shared/__tests__/summaryTableFocus.test.tsxindex f6cdcc0c27..65e7497a39 100644--- a/frontend-modern/src/components/shared/__tests__/summaryTableFocus.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/summaryTableFocus.test.tsx@@ -152,46 +152,4 @@ describe('useSummaryPageInteractionState', () => {expect(revealActiveSeries).toHaveBeenCalledWith('workload-a');expect(scrollTo).toHaveBeenCalledWith({ top: 456, behavior: 'smooth' });});-- it('skips the next focused reveal when the interaction owner suppresses inline auto-scroll', () => {- const [focusedSeriesId] = createSignal<string | null>('resource-a');- const [skipNextFocusedReveal, setSkipNextFocusedReveal] = createSignal(true);- const revealActiveSeries = vi.fn();- const scrollTo = vi.fn();- const root = document.createElement('div');- const row = document.createElement('div');- const detail = document.createElement('div');-- Object.defineProperty(window, 'scrollTo', {- configurable: true,- value: scrollTo,- });-- row.setAttribute('data-summary-series-id', 'resource-a');- row.getBoundingClientRect = vi.fn(() => buildRect(680, 40));- detail.setAttribute('data-inline-detail-for', 'resource-a');- detail.getBoundingClientRect = vi.fn(() => buildRect(724, 220));- root.append(row, detail);- document.body.appendChild(root);-- const { result } = renderHook(() =>- useSummaryPageInteractionState({- focusedSeriesId,- revealActiveSeries,- consumeNextFocusedRevealSkip: () => {- const shouldSkip = skipNextFocusedReveal();- if (shouldSkip) {- setSkipNextFocusedReveal(false);- }- return shouldSkip;- },- }),- );-- result.setTableRootRef(root);-- expect(revealActiveSeries).not.toHaveBeenCalled();- expect(scrollTo).not.toHaveBeenCalled();- expect(skipNextFocusedReveal()).toBe(false);- });});diff --git a/frontend-modern/src/components/shared/summaryTableFocus.ts b/frontend-modern/src/components/shared/summaryTableFocus.tsindex a6caccc6af..ae439d63ed 100644--- a/frontend-modern/src/components/shared/summaryTableFocus.ts+++ b/frontend-modern/src/components/shared/summaryTableFocus.ts@@ -1,4 +1,4 @@-import { createEffect, createMemo, createSignal, onCleanup, untrack, type Accessor } from 'solid-js';+import { createEffect, createMemo, createSignal, onCleanup, type Accessor } from 'solid-js';import {findInlineDetailElement,revealInlineDetailInViewport,@@ -52,7 +52,6 @@ export interface UseSummaryTableFocusBridgeOptions {activeSeriesId: Accessor<string | null | undefined>;focusedSeriesId?: Accessor<string | null | undefined>;revealActiveSeries?: (seriesId: string) => void;- consumeNextFocusedRevealSkip?: () => boolean;}export function useSummaryTableFocusBridge(options: UseSummaryTableFocusBridgeOptions) {@@ -128,10 +127,6 @@ export function useSummaryTableFocusBridge(options: UseSummaryTableFocusBridgeOpreturn;}- if (untrack(() => options.consumeNextFocusedRevealSkip?.() ?? false)) {- return;- }-options.revealActiveSeries?.(focusedId);let settled = false;@@ -235,7 +230,6 @@ export interface UseSummaryPageInteractionStateOptions {hoveredGroupScope?: Accessor<SummarySeriesGroupScope | null | undefined>;focusedGroupScope?: Accessor<SummarySeriesGroupScope | null | undefined>;revealActiveSeries?: (seriesId: string) => void;- consumeNextFocusedRevealSkip?: () => boolean;}export function useSummaryPageInteractionState(options: UseSummaryPageInteractionStateOptions) {@@ -276,7 +270,6 @@ export function useSummaryPageInteractionState(options: UseSummaryPageInteractioactiveSeriesId,focusedSeriesId,revealActiveSeries: options.revealActiveSeries,- consumeNextFocusedRevealSkip: options.consumeNextFocusedRevealSkip,});return {diff --git a/frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.ts b/frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.tsindex a164751b20..1bdba87eac 100644--- a/frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.ts+++ b/frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.ts@@ -65,8 +65,8 @@ describe('InfrastructurePageSurface guardrails', () => {expect(infrastructurePageStateSource).toContain('setSummaryTableRootRef');expect(infrastructurePageStateSource).toContain('shouldShowJumpToActiveResourceRow');expect(infrastructurePageStateSource).toContain('preserveScrollableAncestorVerticalOffset');- expect(infrastructurePageStateSource).toContain('consumeNextFocusedRevealSkip');- expect(infrastructurePageStateSource).toContain('setSkipNextFocusedReveal(true)');+ expect(infrastructurePageStateSource).not.toContain('consumeNextFocusedRevealSkip');+ expect(infrastructurePageStateSource).not.toContain('setSkipNextFocusedReveal(true)');expect(infrastructurePageStateSource).not.toContain('querySelector<HTMLElement>(');expect(infrastructurePageStateSource).not.toContain('scrollIntoView({ behavior: \'smooth\', block: \'center\' })');diff --git a/frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts b/frontend-modern/src/features/infrastructure/useInfrastructurePageState.tsindex 1c76c9acba..d288f1644d 100644--- a/frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts+++ b/frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts@@ -59,7 +59,6 @@ export function useInfrastructurePageState() {const [deployCluster, setDeployCluster] = createSignal<DeployCluster | null>(null);const [filtersOpen, setFiltersOpen] = createSignal(false);const [tableRootRef, setTableRootRef] = createSignal<HTMLDivElement | undefined>(undefined);- const [skipNextFocusedReveal, setSkipNextFocusedReveal] = createSignal(false);const hasResources = createMemo(() => resources().length > 0);const showNoResources = createMemo(() => initialLoadComplete() && !hasResources() && !error());@@ -110,13 +109,6 @@ export function useInfrastructurePageState() {focusedSeriesId: routeState.expandedResourceId,focusedGroupScope: focusedResourceGroupScope,revealActiveSeries: routeState.setRevealedResourceId,- consumeNextFocusedRevealSkip: () => {- const shouldSkip = skipNextFocusedReveal();- if (shouldSkip) {- setSkipNextFocusedReveal(false);- }- return shouldSkip;- },});const setSummaryTableRootRef = (element: HTMLDivElement | undefined) => {setTableRootRef(element);@@ -129,9 +121,6 @@ export function useInfrastructurePageState() {const setExpandedResourceId = (resourceId: string | null) => {capturePendingAppShellRestoreTop();- if (resourceId) {- setSkipNextFocusedReveal(true);- }const groupScope = focusedResourceGroupScope();if (groupScope && resourceId && !isSummarySeriesInGroupScope(groupScope, resourceId)) {preserveTableScrollAnchor(() => {diff --git a/frontend-modern/src/features/recovery/createNonSuspendingQuery.ts b/frontend-modern/src/hooks/createNonSuspendingQuery.tssimilarity index 100%rename from frontend-modern/src/features/recovery/createNonSuspendingQuery.tsrename to frontend-modern/src/hooks/createNonSuspendingQuery.tsdiff --git a/frontend-modern/src/hooks/useRecoveryPoints.ts b/frontend-modern/src/hooks/useRecoveryPoints.tsindex e4d14598f8..5cbc950009 100644--- a/frontend-modern/src/hooks/useRecoveryPoints.ts+++ b/frontend-modern/src/hooks/useRecoveryPoints.ts@@ -6,7 +6,7 @@ import type {RecoveryPointsTransportResponse,} from '@/types/recovery';import { normalizeRecoveryPointsResponse } from '@/utils/recoveryPlatformModel';-import { createNonSuspendingQuery } from '@/features/recovery/createNonSuspendingQuery';+import { createNonSuspendingQuery } from '@/hooks/createNonSuspendingQuery';const RECOVERY_POINTS_URL = '/api/recovery/points';const DEFAULT_LIMIT = 200;diff --git a/frontend-modern/src/hooks/useRecoveryPointsFacets.ts b/frontend-modern/src/hooks/useRecoveryPointsFacets.tsindex fd73d1546a..cf9b24ef37 100644--- a/frontend-modern/src/hooks/useRecoveryPointsFacets.ts+++ b/frontend-modern/src/hooks/useRecoveryPointsFacets.ts@@ -1,7 +1,7 @@import { Accessor, createMemo } from 'solid-js';import { apiFetchJSON } from '@/utils/apiClient';import type { RecoveryPointsFacets, RecoveryPointsFacetsResponse } from '@/types/recovery';-import { createNonSuspendingQuery } from '@/features/recovery/createNonSuspendingQuery';+import { createNonSuspendingQuery } from '@/hooks/createNonSuspendingQuery';const RECOVERY_FACETS_URL = '/api/recovery/facets';const REFRESH_MS = 30_000;diff --git a/frontend-modern/src/hooks/useRecoveryPointsSeries.ts b/frontend-modern/src/hooks/useRecoveryPointsSeries.tsindex 552bf8b691..7481d722a9 100644--- a/frontend-modern/src/hooks/useRecoveryPointsSeries.ts+++ b/frontend-modern/src/hooks/useRecoveryPointsSeries.ts@@ -1,7 +1,7 @@import { Accessor, createMemo } from 'solid-js';import { apiFetchJSON } from '@/utils/apiClient';import type { RecoveryPointsSeriesBucket, RecoveryPointsSeriesResponse } from '@/types/recovery';-import { createNonSuspendingQuery } from '@/features/recovery/createNonSuspendingQuery';+import { createNonSuspendingQuery } from '@/hooks/createNonSuspendingQuery';const RECOVERY_SERIES_URL = '/api/recovery/series';const REFRESH_MS = 30_000;diff --git a/frontend-modern/src/hooks/useRecoveryRollups.ts b/frontend-modern/src/hooks/useRecoveryRollups.tsindex 2901774567..767ccb5257 100644--- a/frontend-modern/src/hooks/useRecoveryRollups.ts+++ b/frontend-modern/src/hooks/useRecoveryRollups.ts@@ -2,7 +2,7 @@ import { createMemo, type Accessor } from 'solid-js';import { apiFetchJSON } from '@/utils/apiClient';import type { ProtectionRollup, RecoveryRollupsTransportResponse } from '@/types/recovery';import { normalizeRecoveryRollupsResponse } from '@/utils/recoveryPlatformModel';-import { createNonSuspendingQuery } from '@/features/recovery/createNonSuspendingQuery';+import { createNonSuspendingQuery } from '@/hooks/createNonSuspendingQuery';const RECOVERY_ROLLUPS_URL = '/api/recovery/rollups';const PAGE_LIMIT = 500;diff --git a/tests/integration/tests/47-inline-selection-scroll-stability.spec.ts b/tests/integration/tests/47-inline-selection-scroll-stability.spec.tsindex 553cb4607f..f019514398 100644--- a/tests/integration/tests/47-inline-selection-scroll-stability.spec.ts+++ b/tests/integration/tests/47-inline-selection-scroll-stability.spec.ts@@ -191,6 +191,38 @@ async function readPrimaryViewportBounds(});}+async function startAppSuspenseFallbackProbe(page: Page): Promise<void> {+ await page.evaluate(() => {+ const marker = "__pulseSuspenseFallbackProbe";+ const existing = (window as Window & Record<string, unknown>)[marker] as+ | { flashed: boolean; observer?: MutationObserver }+ | undefined;+ existing?.observer?.disconnect();+ const state = { flashed: false, observer: undefined as MutationObserver | undefined };+ const sample = () => {+ if (document.body.textContent?.includes("Loading view...")) {+ state.flashed = true;+ }+ };+ sample();+ state.observer = new MutationObserver(sample);+ state.observer.observe(document.body, { subtree: true, childList: true, characterData: true });+ (window as Window & Record<string, unknown>)[marker] = state;+ });+}++async function stopAppSuspenseFallbackProbe(page: Page): Promise<boolean> {+ return page.evaluate(() => {+ const marker = "__pulseSuspenseFallbackProbe";+ const state = (window as Window & Record<string, unknown>)[marker] as+ | { flashed: boolean; observer?: MutationObserver }+ | undefined;+ state?.observer?.disconnect();+ delete (window as Window & Record<string, unknown>)[marker];+ return Boolean(state?.flashed);+ });+}+async function findLegacyScopedWorkloadRow(page: Page): Promise<Locator> {const rows = page.locator("tr[data-guest-id]");const rowCount = await rows.count();@@ -229,7 +261,7 @@ test.describe.serial("Inline selection scroll stability", () => {}});- test("keeps the infrastructure viewport stable when opening an inline resource drawer", async ({+ test("reveals infrastructure inline detail without hard-centering the selected row", async ({page,}, testInfo) => {test.skip(@@ -257,8 +289,8 @@ test.describe.serial("Inline selection scroll stability", () => {.first();await expect(row).toBeVisible();const beforeRowTop = await positionElementNearViewportBottom(page, row);- const beforeClickScroll = await readPrimaryViewportScrollTop(page);expect(beforeRowTop).toBeGreaterThan(500);+ await startAppSuspenseFallbackProbe(page);await row.click();await expect(page).toHaveURL(@@ -275,14 +307,10 @@ test.describe.serial("Inline selection scroll stability", () => {const afterRowTop = await row.evaluate((element) => element.getBoundingClientRect().top);const detailTop = await detailRow.evaluate((element) => element.getBoundingClientRect().top);- expect(Math.abs(afterRowTop - beforeRowTop)).toBeLessThanOrEqual(12);+ expect(afterRowTop).toBeLessThan(beforeRowTop - 150);+ expect(afterRowTop).toBeLessThan(viewportBounds.top + viewportBounds.height * 0.42);expect(detailTop).toBeLessThan(viewportBounds.bottom - 48);-- const afterScroll = await page.evaluate(() => {- const shell = document.querySelector<HTMLElement>(".app-scroll-shell");- return shell ? shell.scrollTop : window.scrollY;- });- expect(Math.abs(afterScroll - beforeClickScroll)).toBeLessThanOrEqual(12);+ expect(await stopAppSuspenseFallbackProbe(page)).toBe(false);});test("keeps the recovery viewport stable when selecting a protected item", async ({@@ -320,7 +348,7 @@ test.describe.serial("Inline selection scroll stability", () => {expect(afterScroll).toBeGreaterThanOrEqual(Math.max(10, beforeScroll - 60));});- test("keeps the workloads viewport stable when opening an inline workload drawer", async ({+ test("keeps workload inline detail visible without hard-centering the selected row", async ({page,}, testInfo) => {test.skip(@@ -337,7 +365,6 @@ test.describe.serial("Inline selection scroll stability", () => {const beforeScroll = await scrollSectionIntoView(page, row);expect(beforeScroll).toBeGreaterThan(10);const beforeRowTop = await positionElementNearViewportBottom(page, row);- const beforeClickScroll = await readPrimaryViewportScrollTop(page);expect(beforeRowTop).toBeGreaterThan(500);const workloadId = (await row.getAttribute("data-guest-id")) ?? "";@@ -361,15 +388,9 @@ test.describe.serial("Inline selection scroll stability", () => {const afterRowTop = await row.evaluate((element) => element.getBoundingClientRect().top);const detailTop = await detailRow.evaluate((element) => element.getBoundingClientRect().top);- expect(Math.abs(afterRowTop - beforeRowTop)).toBeLessThanOrEqual(12);+ expect(afterRowTop).toBeGreaterThan(viewportBounds.top + 96);expect(detailTop).toBeLessThan(viewportBounds.bottom - 48);- const afterScroll = await page.evaluate(() => {- const shell = document.querySelector<HTMLElement>(".app-scroll-shell");- return shell ? shell.scrollTop : window.scrollY;- });- expect(Math.abs(afterScroll - beforeClickScroll)).toBeLessThanOrEqual(12);-await row.click();await expect.poll(() => page.url()).not.toContain("resource=");{@@ -438,7 +459,6 @@ test.describe.serial("Inline selection scroll stability", () => {const beforeScroll = await scrollSectionIntoView(page, row);expect(beforeScroll).toBeGreaterThan(10);const beforeRowTop = await positionElementNearViewportBottom(page, row);- const beforeClickScroll = await readPrimaryViewportScrollTop(page);expect(beforeRowTop).toBeGreaterThan(500);await row.click();