Fix header audit after Dashboard retirement

This commit is contained in:
rcourtman 2026-05-01 20:40:36 +01:00
parent 2c3ece3e51
commit 7d7b83bf45
3 changed files with 6 additions and 2 deletions

View file

@ -865,7 +865,10 @@ work extends shared components instead of creating new local variants.
shell therefore owns the shared `PageHeader` for support tools, and
`frontend-modern/src/pages/Operations.tsx` must stay a redirect-only
compatibility handoff instead of regrowing a second route-local heading,
tab strip, or page shell for diagnostics, reporting, or logs.
tab strip, or page shell for diagnostics, reporting, or logs. Because the
dashboard route is retired, that audit must also discover live top-level
pages from `src/pages/` and may not keep a hard required-header entry for
`frontend-modern/src/pages/Dashboard.tsx`.
23. Keep the authenticated app root aligned with that same first-session path.
That same shared-primitive ownership now includes contextual row focus.
`frontend-modern/src/components/shared/contextualFocus.ts` is the canonical

View file

@ -7,7 +7,6 @@ const ROOT = process.cwd();
const REQUIRED_PAGE_HEADERS = new Map([
['src/pages/AIIntelligence.tsx', 'PageHeader'],
['src/pages/Ceph.tsx', 'PageHeader'],
['src/pages/Dashboard.tsx', 'PageHeader'],
['src/pages/Infrastructure.tsx', 'PageHeader'],
['src/pages/NotFound.tsx', 'PageHeader'],
['src/pages/PricingHandoff.tsx', 'PageHeader'],

View file

@ -8,6 +8,7 @@ import routePreloadSource from '@/routing/routePreload.ts?raw';
import appRuntimeStateSource from '@/useAppRuntimeState.ts?raw';
const appStylesSource = readFileSync(join(process.cwd(), 'src/index.css'), 'utf8');
const headerAuditSource = readFileSync(join(process.cwd(), 'scripts/header-audit.mjs'), 'utf8');
describe('App architecture', () => {
it('keeps App as the entry shell that delegates runtime and chrome ownership', () => {
@ -46,6 +47,7 @@ describe('App architecture', () => {
'<Route path={INFRASTRUCTURE_ROUTE_PATH} component={InfrastructurePage} />',
);
expect(appSource).not.toContain('DashboardPage');
expect(headerAuditSource).not.toContain("['src/pages/Dashboard.tsx', 'PageHeader']");
expect(appSource).toContain("import RuntimeHomePage from '@/pages/RuntimeHome';");
expect(appSource).toContain('<Route path="/login" component={RuntimeHomePage} />');
expect(appSource).toContain('<Route path="/" component={RuntimeHomePage} />');