From 96b67fbcdddfa2157fe7ce01e7f808e77030c2cd Mon Sep 17 00:00:00 2001 From: rcourtman Date: Mon, 23 Mar 2026 00:28:01 +0000 Subject: [PATCH] Split infrastructure page route sync owner --- .../subsystems/frontend-primitives.md | 6 +- .../v6/internal/subsystems/registry.json | 3 + .../internal/subsystems/unified-resources.md | 10 +- .../InfrastructurePageSurface.tsx | 5 +- ...frastructurePageSurface.guardrails.test.ts | 26 +++ .../useInfrastructurePageRouteState.ts | 192 ++++++++++++++++++ .../useInfrastructurePageState.ts | 178 ++-------------- .../frontendResourceTypeBoundaries.test.ts | 17 ++ .../canonical_completion_guard_test.py | 1 + .../release_control/subsystem_lookup_test.py | 31 +++ 10 files changed, 298 insertions(+), 171 deletions(-) create mode 100644 frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.ts create mode 100644 frontend-modern/src/features/infrastructure/useInfrastructurePageRouteState.ts diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md index 5d38ff21a..287f3e451 100644 --- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md +++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md @@ -153,8 +153,10 @@ Top-level route files are now also expected to stay thin when a feature owns the real product surface. `frontend-modern/src/pages/Infrastructure.tsx` now acts only as the route boundary, while `frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx` -and `frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts` -own the actual infrastructure page shell and state contract. Future feature +owns the shell, `frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts` +owns page-control composition, and +`frontend-modern/src/features/infrastructure/useInfrastructurePageRouteState.ts` +owns infrastructure route/deep-link synchronization. Future feature surfaces under `frontend-modern/src/features/` should follow that same pattern instead of letting page files accumulate route sync, filter, and modal orchestration inline. diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.json index 7407c3694..a5776555d 100644 --- a/docs/release-control/v6/internal/subsystems/registry.json +++ b/docs/release-control/v6/internal/subsystems/registry.json @@ -3171,6 +3171,7 @@ "frontend-modern/src/components/Infrastructure/useResourceDetailDrawerState.ts", "frontend-modern/src/components/Infrastructure/useUnifiedResourceTableState.ts", "frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx", + "frontend-modern/src/features/infrastructure/useInfrastructurePageRouteState.ts", "frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts", "frontend-modern/src/hooks/useDashboardTrends.ts", "frontend-modern/src/hooks/useUnifiedResources.ts", @@ -3255,6 +3256,7 @@ "frontend-modern/src/components/Infrastructure/useResourceDetailDrawerState.ts", "frontend-modern/src/components/Infrastructure/useUnifiedResourceTableState.ts", "frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx", + "frontend-modern/src/features/infrastructure/useInfrastructurePageRouteState.ts", "frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts", "frontend-modern/src/hooks/useDashboardTrends.ts", "frontend-modern/src/hooks/useUnifiedResources.ts", @@ -3271,6 +3273,7 @@ "frontend-modern/src/components/Infrastructure/__tests__/resourceDetailMappers.test.ts", "frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.performance.contract.test.tsx", "frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.workloads-link.test.tsx", + "frontend-modern/src/features/infrastructure/__tests__/InfrastructurePageSurface.guardrails.test.ts", "frontend-modern/src/hooks/__tests__/useDashboardTrends.test.ts", "frontend-modern/src/hooks/__tests__/useUnifiedResources.test.ts", "frontend-modern/src/pages/__tests__/Infrastructure.empty-state.test.tsx", diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md index 540c2c3de..5891e5dbb 100644 --- a/docs/release-control/v6/internal/subsystems/unified-resources.md +++ b/docs/release-control/v6/internal/subsystems/unified-resources.md @@ -60,7 +60,8 @@ cross-source deduplication. 38. `frontend-modern/src/components/Discovery/DiscoveryTab.tsx` 39. `frontend-modern/src/components/Discovery/useDiscoveryTabState.ts` 40. `frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx` -41. `frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts` +41. `frontend-modern/src/features/infrastructure/useInfrastructurePageRouteState.ts` +42. `frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts` ## Shared Boundaries @@ -772,6 +773,13 @@ The route file `frontend-modern/src/pages/Infrastructure.tsx` is now only the navigation boundary for that surface; canonical infrastructure filter, search, deep-link, and expansion state now live behind the dedicated infrastructure feature owner instead of accumulating in the page shell itself. +That infrastructure feature now also follows an explicit shell/composition/route +split: `frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx` +owns the render shell, `frontend-modern/src/features/infrastructure/useInfrastructurePageState.ts` +owns page controls and filtered-resource composition, and +`frontend-modern/src/features/infrastructure/useInfrastructurePageRouteState.ts` +owns URL-sync, deep-link expansion, highlight continuity, and managed +infrastructure-route navigation. Shared unified-resource consumers now also normalize org scope through `frontend-modern/src/utils/orgScope.ts` before building cache keys or multi-tenant resource fetch state, so the canonical resource hooks do not diff --git a/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx b/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx index 78e486625..d94091c9b 100644 --- a/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx +++ b/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx @@ -1,4 +1,5 @@ import { For, Show } from 'solid-js'; +import { useNavigate } from '@solidjs/router'; import { EmptyState } from '@/components/shared/EmptyState'; import { Card } from '@/components/shared/Card'; import { FilterSegmentedControl, LabeledFilterSelect } from '@/components/shared/FilterToolbar'; @@ -22,6 +23,7 @@ import { import { useInfrastructurePageState, type GroupingMode } from './useInfrastructurePageState'; export function InfrastructurePageSurface() { + const navigate = useNavigate(); const sourceOptions = DEFAULT_INFRASTRUCTURE_SOURCE_OPTIONS; const { loading, @@ -59,7 +61,6 @@ export function InfrastructurePageSurface() { clearFilters, filteredResources, hasFilteredResources, - handleNavigateToSettings, } = useInfrastructurePageState(); const infrastructureEmptyState = () => getInfrastructureEmptyState(); @@ -118,7 +119,7 @@ export function InfrastructurePageSurface() { actions={