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.

frontend(platforms): make primary nav platform-first; demote infra/workloads/storage/recovery

rcourtman2fbeb1454107
diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.md
index 9f8520ccd3..17c8e9cd14 100644
--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md
+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md
@@ -120,6 +120,12 @@ runtime cost control, and shared AI transport surfaces.
must not introduce a parallel chat surface, launcher button, or model
picker on the platform page itself; cross-platform AI guidance stays
routed through Assistant and Patrol.
+ The primary-nav demotion of Infrastructure / Workloads / Storage /
+ Recovery does not change Patrol or Assistant addressability: both
+ surfaces remain reachable through the utility tab strip in
+ `AppLayout.tsx` and via the canonical Patrol path, and platform pages
+ must not replicate Patrol findings, Assistant prompts, or AI launcher
+ affordances inside their own chrome.
## Forbidden Paths
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.md
index a8730317c9..1f5eebb829 100644
--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md
+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md
@@ -485,19 +485,29 @@ or other self-hosted uncapped continuity plans.
`PULSE_EMAIL_REPLY_TO`, defaulting to `[email protected]`, so magic
links, checkout handoffs, and other hosted-account messages remain
directly replyable by customers.
- `App.tsx` and `AppLayout.tsx` may extend the platform-first top-level
- surface set by registering new family-scoped routes (for example
- `DOCKER_PATH`, `KUBERNETES_PATH`, `TRUENAS_PATH`, `VMWARE_PATH`) and the
- matching `PlatformTab` entries, but those entries must be gated on
- canonical resource presence in `state.resources` so unconnected platforms
- stay hidden and do not displace the always-shown Infrastructure,
- Workloads, Storage, and Recovery tabs. Each new platform page must remain
- chrome-only: routing plus sub-tab navigation that embeds the canonical
+ `App.tsx` and `AppLayout.tsx` own the platform-first primary navigation.
+ `App.tsx` registers one top-level route per supported platform family
+ (Proxmox, Docker, Kubernetes, TrueNAS, vSphere) using the canonical path
+ constants from `frontend-modern/src/routing/resourceLinks.ts`. The
+ `PlatformTab` list in `AppLayout.tsx` must enumerate exactly those
+ supported families and must keep `alwaysShow: true` for every supported
+ family so first-run operators can discover what Pulse monitors; the
+ `enabled` and `live` flags are derived from canonical resource presence
+ in `state.resources` so unconnected platforms render in a disabled tone
+ and surface their own empty-state setup affordances inside the platform
+ page itself rather than being hidden from nav. Infrastructure, Workloads,
+ Storage, and Recovery are not duplicated as equal primary tabs in that
+ list; their tables are reused inside the platform pages via embedded
+ `tableOnly` surfaces, and their routes remain wired in `App.tsx` purely
+ for deep-link compatibility. Each platform page must remain chrome-only:
+ routing plus sub-tab navigation that embeds the canonical
`WorkloadsSurface`, `StorageSurface`, `RecoverySurface`, or
`UnifiedResourceTable` in `embedded tableOnly` mode with a forced
platform/source filter. The shell must not introduce dashboard cards,
- bespoke per-family tables, or synthetic placeholder data for that
- expansion path.
+ bespoke per-family tables, or synthetic placeholder data, and must not
+ reintroduce Infrastructure / Workloads / Storage / Recovery as equal
+ primary navigation entries without a governed contract decision recorded
+ here.
## Forbidden Paths
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 00f9c6f88b..3b97ac78b2 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -925,11 +925,16 @@ AI runtime.
primitives live under `frontend-modern/src/features/platformPage/` so the
chrome stays reusable across families.
`frontend-modern/src/AppLayout.tsx` may extend the `PlatformTab` list with
- new family entries; those entries must declare `alwaysShow` and `enabled`
- derived from the family's canonical resource presence in
- `state.resources` rather than hard-coded `true`, so unconnected platforms
- stay hidden by default and do not displace the always-shown
- Infrastructure, Workloads, Storage, and Recovery tabs.
+ new family entries; those entries must keep `alwaysShow: true` for
+ supported families so first-run operators discover the full platform set,
+ while `enabled` and `live` derive from the family's canonical resource
+ presence in `state.resources` so unconnected platforms render in a
+ disabled tone with the platform page's own empty-state setup affordance.
+ The `MOBILE_NAV_PLATFORM_PRIORITY` ordering in
+ `frontend-modern/src/components/shared/mobileNavBarModel.ts` mirrors
+ that platform-first set so mobile and desktop primary navigation stay
+ aligned; legacy Infrastructure / Workloads / Storage / Recovery entries
+ are intentionally absent from that priority list.
## Forbidden Paths
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 ddea801c64..2be740142d 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -533,6 +533,14 @@ shell clickable behind another overlay.
2s dial / 1s read with at most 5 concurrent fingerprints so the probe
endpoint cannot be repurposed into a slow-leak scanner that starves the
dashboard hot path.
+ Platform-first top-level pages must remain in the app-shell route
+ preload registry. `frontend-modern/src/routing/routePreload.ts` carries
+ a `ROUTE_PRELOADERS` entry per supported platform (Proxmox plus the
+ Docker, Kubernetes, TrueNAS, and vSphere families) so first-paint
+ navigation between platform tabs stays warm and does not depend on a
+ cold dynamic import after the user clicks. New supported platform
+ families must extend that registry rather than skipping the preload
+ hot path; presentation-only platforms must not be registered.
## Forbidden Paths
diff --git a/frontend-modern/src/AppLayout.tsx b/frontend-modern/src/AppLayout.tsx
index 892d6133ec..7db1fe1940 100644
--- a/frontend-modern/src/AppLayout.tsx
+++ b/frontend-modern/src/AppLayout.tsx
@@ -1,10 +1,6 @@
import { For, Show, Suspense, createEffect, createMemo, createSignal, onCleanup } from 'solid-js';
import type { JSX } from 'solid-js';
import { useLocation, useNavigate } from '@solidjs/router';
-import BoxesIcon from 'lucide-solid/icons/boxes';
-import ServerIcon from 'lucide-solid/icons/server';
-import HardDriveIcon from 'lucide-solid/icons/hard-drive';
-import ArchiveIcon from 'lucide-solid/icons/archive';
import BellIcon from 'lucide-solid/icons/bell';
import SettingsIcon from 'lucide-solid/icons/settings';
import Maximize2Icon from 'lucide-solid/icons/maximize-2';
@@ -40,9 +36,7 @@ import {
buildProxmoxPath,
buildTrueNASPath,
buildVmwarePath,
- buildWorkloadsPath,
} from '@/routing/resourceLinks';
-import { buildStorageRecoveryTabSpecs } from '@/routing/platformTabs';
import { getKioskModePreference, setKioskMode } from '@/utils/url';
import { updateStore } from '@/stores/updates';
import { aiChatStore } from '@/stores/aiChat';
@@ -57,7 +51,6 @@ const ROOT_DOCKER_PATH = buildDockerPath();
const ROOT_KUBERNETES_PATH = buildKubernetesPath();
const ROOT_TRUENAS_PATH = buildTrueNASPath();
const ROOT_VMWARE_PATH = buildVmwarePath();
-const ROOT_WORKLOADS_PATH = buildWorkloadsPath();
const NAV_TAB_ICON_CLASS = 'w-4 h-4 shrink-0';
const AI_CHAT_LAUNCHER_BUTTON_CLASS =
'fixed right-4 bottom-[calc(5rem+env(safe-area-inset-bottom,0px))] z-40 flex h-11 w-11 items-center justify-center rounded-full border border-border bg-surface text-blue-600 shadow-lg transition-colors duration-200 hover:bg-surface-hover hover:text-blue-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500 dark:text-blue-400 dark:hover:text-blue-300 lg:right-0 lg:top-1/2 lg:bottom-auto lg:h-auto lg:w-auto lg:min-h-9 lg:min-w-10 lg:-translate-y-1/2 lg:rounded-l-lg lg:rounded-r-none lg:border-r-0 lg:px-2.5 lg:py-2.5 lg:shadow-none';
@@ -313,6 +306,14 @@ export function AppLayout(props: AppLayoutProps) {
return presence;
});
+ // Primary nav is platform-first. Every supported platform family is
+ // always visible so first-run users can discover what Pulse monitors;
+ // platforms with no connected resources still render their canonical
+ // empty state inside the platform page itself. Infrastructure / Workloads
+ // / Storage / Recovery are NOT duplicated as equal primary tabs — their
+ // tables are reused inside each platform page via embedded tableOnly
+ // surfaces, and their routes remain wired in App.tsx purely for
+ // route-compatibility with existing deep links.
const platformTabs = createMemo<PlatformTab[]>(() => {
const presence = platformPresence();
const allPlatforms: PlatformTab[] = [
@@ -322,8 +323,8 @@ export function AppLayout(props: AppLayoutProps) {
route: ROOT_PROXMOX_PATH,
settingsRoute: '/settings/infrastructure/platforms/proxmox/pve',
tooltip: 'Proxmox VE, Backup Server, Mail Gateway, storage, backups, and guests',
- enabled: true,
- live: true,
+ enabled: presence.has('proxmox-pve'),
+ live: presence.has('proxmox-pve'),
icon: ProxmoxIcon,
alwaysShow: true,
},
@@ -336,7 +337,7 @@ export function AppLayout(props: AppLayoutProps) {
enabled: presence.has('docker'),
live: presence.has('docker'),
icon: ContainerIcon,
- alwaysShow: presence.has('docker'),
+ alwaysShow: true,
},
{
id: 'kubernetes',
@@ -347,7 +348,7 @@ export function AppLayout(props: AppLayoutProps) {
enabled: presence.has('kubernetes'),
live: presence.has('kubernetes'),
icon: ShipWheelIcon,
- alwaysShow: presence.has('kubernetes'),
+ alwaysShow: true,
},
{
id: 'truenas',
@@ -358,7 +359,7 @@ export function AppLayout(props: AppLayoutProps) {
enabled: presence.has('truenas'),
live: presence.has('truenas'),
icon: DatabaseIcon,
- alwaysShow: presence.has('truenas'),
+ alwaysShow: true,
},
{
id: 'vmware',
@@ -369,37 +370,8 @@ export function AppLayout(props: AppLayoutProps) {
enabled: presence.has('vmware-vsphere'),
live: presence.has('vmware-vsphere'),
icon: CpuIcon,
- alwaysShow: presence.has('vmware-vsphere'),
- },
- {
- id: 'infrastructure',
- label: 'Infrastructure',
- route: ROOT_INFRASTRUCTURE_PATH,
- settingsRoute: '/settings',
- tooltip: 'All agents and nodes across platforms',
- enabled: true,
- live: true,
- icon: ServerIcon,
alwaysShow: true,
},
- {
- id: 'workloads',
- label: 'Workloads',
- route: ROOT_WORKLOADS_PATH,
- settingsRoute: '/settings/workloads/docker',
- tooltip: 'VMs, containers, and Kubernetes workloads',
- enabled: true,
- live: true,
- icon: BoxesIcon,
- alwaysShow: true,
- },
- ...buildStorageRecoveryTabSpecs().map((tab) => ({
- ...tab,
- enabled: true,
- live: true,
- icon: tab.id.startsWith('storage') ? HardDriveIcon : ArchiveIcon,
- alwaysShow: true,
- })),
];
return allPlatforms.filter((platform) => platform.alwaysShow || platform.enabled);
diff --git a/frontend-modern/src/__tests__/App.architecture.test.ts b/frontend-modern/src/__tests__/App.architecture.test.ts
index 720eb9e846..c94d35a1f3 100644
--- a/frontend-modern/src/__tests__/App.architecture.test.ts
+++ b/frontend-modern/src/__tests__/App.architecture.test.ts
@@ -58,6 +58,19 @@ describe('App architecture', () => {
expect(appSource).toContain('<Route path={KUBERNETES_PATH} component={KubernetesPage} />');
expect(appSource).toContain('<Route path={TRUENAS_PATH} component={TrueNASPage} />');
expect(appSource).toContain('<Route path={VMWARE_PATH} component={VmwarePage} />');
+ expect(routePreloadSource).toContain("id: 'docker',");
+ expect(routePreloadSource).toContain("id: 'kubernetes',");
+ expect(routePreloadSource).toContain("id: 'truenas',");
+ expect(routePreloadSource).toContain("id: 'vmware',");
+ expect(appLayoutSource).toContain("id: 'docker',");
+ expect(appLayoutSource).toContain("id: 'kubernetes',");
+ expect(appLayoutSource).toContain("id: 'truenas',");
+ expect(appLayoutSource).toContain("id: 'vmware',");
+ // Platform-first primary nav: Infrastructure / Workloads / Storage /
+ // Recovery are not duplicated as equal primary PlatformTab entries.
+ expect(appLayoutSource).not.toContain("id: 'infrastructure',");
+ expect(appLayoutSource).not.toContain("id: 'workloads',");
+ expect(appLayoutSource).not.toContain('buildStorageRecoveryTabSpecs(');
expect(appSource).not.toContain('DashboardPage');
expect(headerAuditSource).not.toContain("['src/pages/Dashboard.tsx', 'PageHeader']");
expect(appSource).toContain("import RuntimeHomePage from '@/pages/RuntimeHome';");
diff --git a/frontend-modern/src/components/shared/__tests__/MobileNavBar.test.tsx b/frontend-modern/src/components/shared/__tests__/MobileNavBar.test.tsx
index b26b281e2e..58c6c34fa1 100644
--- a/frontend-modern/src/components/shared/__tests__/MobileNavBar.test.tsx
+++ b/frontend-modern/src/components/shared/__tests__/MobileNavBar.test.tsx
@@ -44,6 +44,15 @@ describe('MobileNavBar', () => {
expect(mobileNavBarModelSource).toContain('buildOrderedMobileNavUtilityTabs');
expect(mobileNavBarModelSource).toContain('getMobileNavAlertBadgeCounts');
expect(mobileNavBarModelSource).toContain('getMobileNavFadeState');
+ expect(mobileNavBarModelSource).toContain("'proxmox'");
+ expect(mobileNavBarModelSource).toContain("'docker'");
+ expect(mobileNavBarModelSource).toContain("'kubernetes'");
+ expect(mobileNavBarModelSource).toContain("'truenas'");
+ expect(mobileNavBarModelSource).toContain("'vmware'");
+ expect(mobileNavBarModelSource).not.toContain("'infrastructure'");
+ expect(mobileNavBarModelSource).not.toContain("'workloads'");
+ expect(mobileNavBarModelSource).not.toContain("'storage'");
+ expect(mobileNavBarModelSource).not.toContain("'recovery'");
});
it('keeps decorative icon labels out of mobile tab accessible names', () => {
diff --git a/frontend-modern/src/components/shared/mobileNavBarModel.ts b/frontend-modern/src/components/shared/mobileNavBarModel.ts
index 15b10aa28e..79a25b570b 100644
--- a/frontend-modern/src/components/shared/mobileNavBarModel.ts
+++ b/frontend-modern/src/components/shared/mobileNavBarModel.ts
@@ -36,10 +36,10 @@ export type MobileNavBarProps = {
const MOBILE_NAV_PLATFORM_PRIORITY = [
'proxmox',
- 'infrastructure',
- 'workloads',
- 'storage',
- 'recovery',
+ 'docker',
+ 'kubernetes',
+ 'truenas',
+ 'vmware',
] as const;
const MOBILE_NAV_UTILITY_PRIORITY = ['alerts', 'ai', 'settings'] as const;
diff --git a/frontend-modern/src/routing/routePreload.ts b/frontend-modern/src/routing/routePreload.ts
index 828d93ad70..3f53432d03 100644
--- a/frontend-modern/src/routing/routePreload.ts
+++ b/frontend-modern/src/routing/routePreload.ts
@@ -4,8 +4,12 @@ import {
buildRecoveryPath,
buildStoragePath,
buildWorkloadsPath,
+ DOCKER_PATH,
+ KUBERNETES_PATH,
PATROL_PATH,
PROXMOX_PATH,
+ TRUENAS_PATH,
+ VMWARE_PATH,
} from '@/routing/resourceLinks';
type RoutePreloader = {
@@ -49,6 +53,30 @@ const ROUTE_PRELOADERS: readonly RoutePreloader[] = [
preload: () =>
import('@/pages/Proxmox').then(() => undefined),
},
+ {
+ id: 'docker',
+ matches: (route) => route === DOCKER_PATH || route.startsWith(`${DOCKER_PATH}/`),
+ preload: () =>
+ import('@/pages/Docker').then(() => undefined),
+ },
+ {
+ id: 'kubernetes',
+ matches: (route) => route === KUBERNETES_PATH || route.startsWith(`${KUBERNETES_PATH}/`),
+ preload: () =>
+ import('@/pages/Kubernetes').then(() => undefined),
+ },
+ {
+ id: 'truenas',
+ matches: (route) => route === TRUENAS_PATH || route.startsWith(`${TRUENAS_PATH}/`),
+ preload: () =>
+ import('@/pages/TrueNAS').then(() => undefined),
+ },
+ {
+ id: 'vmware',
+ matches: (route) => route === VMWARE_PATH || route.startsWith(`${VMWARE_PATH}/`),
+ preload: () =>
+ import('@/pages/Vmware').then(() => undefined),
+ },
{
id: 'infrastructure',
matches: (route) => route === ROOT_INFRASTRUCTURE_PATH,