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
Hide setup-only demo affordances in read-only mode
rcourtmanbcb5a853c727
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex b273f5001c..09cd958493 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -199,6 +199,11 @@ an add-only capacity posture.5. Add or change installer flags, persisted service arguments, or upgrade-safe re-entry behavior through `scripts/install.sh` and `scripts/install.ps1`.6. Add or change profile management, the extracted agent profiles runtime owner, the pure unified-agent inventory/install model, the API-backed platform connections workspace shell, route model, reporting summary owner, shared install/inventory/dialog section owners, the split infrastructure install/reporting state owners, the split direct-node/discovery infrastructure settings owners plus their shared model, shared frontend install-command assembly, Proxmox setup/install API transport, TrueNAS platform-connection management, VMware platform-connection management, the shared monitored-system admission preview shell for those platform connections, setup-completion install handoff transport, deploy-fallback manual install transport, and fleet-control presentation through `frontend-modern/src/api/agentProfiles.ts`, `frontend-modern/src/api/nodes.ts`, `frontend-modern/src/components/Settings/AgentProfilesPanel.tsx`, `frontend-modern/src/components/Settings/useAgentProfilesPanelState.ts`, `frontend-modern/src/components/Settings/InfrastructureOperationsController.tsx`, `frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx`, `frontend-modern/src/components/Settings/InfrastructureInstallPanel.tsx`, `frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx`, `frontend-modern/src/components/Settings/InfrastructureReportingPanel.tsx`, `frontend-modern/src/components/Settings/InfrastructureInventorySection.tsx`, `frontend-modern/src/components/Settings/InfrastructureActiveRowDetails.tsx`, `frontend-modern/src/components/Settings/InfrastructureIgnoredRowDetails.tsx`, `frontend-modern/src/components/Settings/InfrastructureStopMonitoringDialog.tsx`, `frontend-modern/src/components/Settings/InfrastructurePlatformConnectionsSummaryCard.tsx`, `frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx`, `frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts`, `frontend-modern/src/components/Settings/MonitoredSystemAdmissionPreview.tsx`, `frontend-modern/src/components/Settings/PlatformConnectionsWorkspace.tsx`, `frontend-modern/src/components/Settings/platformConnectionsModel.ts`, `frontend-modern/src/components/Settings/TrueNASSettingsPanel.tsx`, `frontend-modern/src/components/Settings/useTrueNASSettingsPanelState.ts`, `frontend-modern/src/components/Settings/VMwareSettingsPanel.tsx`, `frontend-modern/src/components/Settings/useVMwareSettingsPanelState.ts`, `frontend-modern/src/components/Settings/ProxmoxSettingsPanel.tsx`, `frontend-modern/src/components/Settings/proxmoxSettingsModel.ts`, `frontend-modern/src/components/Settings/ProxmoxDirectWorkspace.tsx`, `frontend-modern/src/components/Settings/ProxmoxConfiguredNodesTable.tsx`, `frontend-modern/src/components/Settings/ProxmoxDirectConnectionsCard.tsx`, `frontend-modern/src/components/Settings/ProxmoxDiscoveryResultsCard.tsx`, `frontend-modern/src/components/Settings/ProxmoxDeleteNodeDialog.tsx`, `frontend-modern/src/components/Settings/ProxmoxNodeModalStack.tsx`, `frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx`, `frontend-modern/src/components/Settings/SettingsSectionNav.tsx`, `frontend-modern/src/components/Settings/infrastructureSettingsModel.ts`, `frontend-modern/src/components/Settings/useInfrastructureConfiguredNodesState.ts`, `frontend-modern/src/components/Settings/useInfrastructureDiscoveryRuntimeState.ts`, `frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx`, `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`, `frontend-modern/src/components/Settings/useInfrastructureReportingState.tsx`, `frontend-modern/src/components/Settings/useInfrastructureSettingsState.ts`, `frontend-modern/src/components/Settings/useProxmoxDirectWorkspaceState.ts`, `frontend-modern/src/components/Settings/NodeModal.tsx`, `frontend-modern/src/components/Settings/nodeModalModel.ts`, `frontend-modern/src/components/Settings/useNodeModalState.ts`, `frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx`, and `frontend-modern/src/utils/agentInstallCommand.ts`.Those lifecycle-owned settings hooks may consume websocket state only through `frontend-modern/src/contexts/appRuntime.ts`; they must not import `frontend-modern/src/App.tsx` or recreate root-shell providers.+ Public demo and other read-only settings posture must stay reporting-first+ on that same lifecycle-owned workspace boundary: infrastructure workspace+ routes may retain install and platform setup surfaces for manageable+ sessions, but read-only presentation must collapse back to reporting/control+ instead of advertising first-system setup on a pre-populated demo estate.Agent-profile suggestion affordances remain adjacent assistant UX, not asecond AI settings reader. `frontend-modern/src/components/Settings/useAgentProfilesPanelState.ts`may gate the Ideas action only from the shared assistant-availability factdiff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex 8c0e27f36e..5276240b95 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -121,6 +121,9 @@ still grows monitored-system usage.16. Add or change self-hosted Pro plan, trial, recovery, and entitlement actions through `frontend-modern/src/components/Settings/ProLicensePanel.tsx`, `frontend-modern/src/components/Settings/ProLicensePlanSection.tsx`, `frontend-modern/src/components/Settings/SelfHostedCommercialRecoverySection.tsx`, and `frontend-modern/src/components/Settings/useProLicensePanelState.ts`17. Add or change monitored-system ledger, disclosure, or admission-preview presentation through `frontend-modern/src/components/Settings/MonitoredSystemLedgerPanel.tsx`, `frontend-modern/src/components/Settings/MonitoredSystemAdmissionPreview.tsx`, `frontend-modern/src/components/Commercial/MonitoredSystemDefinitionDisclosure.tsx`, and `frontend-modern/src/utils/monitoredSystemPresentation.ts`18. Add or change paid relay settings and onboarding presentation through `frontend-modern/src/components/Settings/RelaySettingsPanel.tsx`, `frontend-modern/src/components/Settings/RelayPairingSection.tsx`, `frontend-modern/src/components/Settings/useRelaySettingsPanelState.ts`, `frontend-modern/src/components/Dashboard/RelayOnboardingCard.tsx`, and `frontend-modern/src/components/Dashboard/useRelayOnboardingCardState.ts`+ Public demo and other read-only presentation policy states must suppress+ relay setup and upsell onboarding instead of inviting pairing or commercial+ action from a governed non-manageable surface.19. Add or change cloud plan presentation through `frontend-modern/src/pages/CloudPricing.tsx`20. Add contract tests where runtime and pricing need to stay aligned21. Add or change hosted browser org-context bootstrap through `frontend-modern/src/App.tsx`, `frontend-modern/src/AppLayout.tsx`, `frontend-modern/src/useAppRuntimeState.ts`, and `frontend-modern/src/utils/apiClient.ts`diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 43e58afce4..5f05dca3e4 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -171,6 +171,10 @@ work extends shared components instead of creating new local variants.minimal handoff shells that defer destination truth to the owning subsysteminstead of embedding a second copy of public marketing or checkout UI insidethe product runtime.+ The same settings-shell boundary owns read-only landing posture: when the+ session presentation policy says the operator cannot manage setup, `/settings`+ and sidebar navigation must land on the canonical reporting/control surface+ instead of setup-oriented install routes.3. Add feature-specific presentation only when no shared primitive should own it4. Add guardrail tests when a new shared pattern is introduced5. Keep shared platform-connections shell state on the reusable settings boundary: `frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts`, `frontend-modern/src/components/Settings/InfrastructurePlatformConnectionsSummaryCard.tsx`, and `frontend-modern/src/components/Settings/PlatformConnectionsWorkspace.tsx` must continue to derive provider counts, availability, and shared subtab copy from one infrastructure-settings source instead of creating provider-local summary fetches or VMware-only shell vocabulary.diff --git a/frontend-modern/src/components/Dashboard/RelayOnboardingCard.tsx b/frontend-modern/src/components/Dashboard/RelayOnboardingCard.tsxindex fe23339890..b37abe1a59 100644--- a/frontend-modern/src/components/Dashboard/RelayOnboardingCard.tsx+++ b/frontend-modern/src/components/Dashboard/RelayOnboardingCard.tsx@@ -4,7 +4,10 @@ import X from 'lucide-solid/icons/x';import { Card } from '@/components/shared/Card';import { UpgradeLink } from '@/components/shared/UpgradeLink';import { getUpgradeActionDestination } from '@/stores/licenseCommercial';-import { presentationPolicyHidesCommercialSurfaces } from '@/stores/sessionPresentationPolicy';+import {+ presentationPolicyHidesCommercialSurfaces,+ presentationPolicyIsReadOnly,+} from '@/stores/sessionPresentationPolicy';import {RELAY_ONBOARDING_DESCRIPTION,RELAY_ONBOARDING_DISCONNECTED_LABEL,@@ -21,7 +24,11 @@ export const RelayOnboardingCard: Component = () => {return (<Show- when={state.shouldShow() && (!presentationPolicyHidesCommercialSurfaces() || state.hasRelay())}+ when={+ !presentationPolicyIsReadOnly() &&+ state.shouldShow() &&+ (!presentationPolicyHidesCommercialSurfaces() || state.hasRelay())+ }><Card padding="lg" class="relative overflow-hidden"><div class="absolute -right-10 -top-10 h-32 w-32 rounded-full bg-blue-100 dark:bg-blue-900" />diff --git a/frontend-modern/src/components/Dashboard/__tests__/RelayOnboardingCard.test.tsx b/frontend-modern/src/components/Dashboard/__tests__/RelayOnboardingCard.test.tsxindex b134ac5145..f573f6c1d0 100644--- a/frontend-modern/src/components/Dashboard/__tests__/RelayOnboardingCard.test.tsx+++ b/frontend-modern/src/components/Dashboard/__tests__/RelayOnboardingCard.test.tsx@@ -21,6 +21,7 @@ const {licenseLoadedMock,getUpgradeActionUrlOrFallbackMock,presentationPolicyHidesCommercialSurfacesMock,+ presentationPolicyIsReadOnlyMock,} = vi.hoisted(() => ({getUpgradeActionDestinationMock: vi.fn(),mockNavigate: vi.fn(),@@ -37,6 +38,7 @@ const {licenseLoadedMock: vi.fn(),getUpgradeActionUrlOrFallbackMock: vi.fn(),presentationPolicyHidesCommercialSurfacesMock: vi.fn(),+ presentationPolicyIsReadOnlyMock: vi.fn(),}));vi.mock('@solidjs/router', () => ({@@ -58,6 +60,7 @@ vi.mock('@/stores/licenseCommercial', () => ({vi.mock('@/stores/sessionPresentationPolicy', () => ({presentationPolicyHidesCommercialSurfaces: () =>presentationPolicyHidesCommercialSurfacesMock(),+ presentationPolicyIsReadOnly: () => presentationPolicyIsReadOnlyMock(),}));vi.mock('@/api/relay', () => ({@@ -113,6 +116,8 @@ function resetAllMocks() {getUpgradeActionUrlOrFallbackMock.mockReset();presentationPolicyHidesCommercialSurfacesMock.mockReset();presentationPolicyHidesCommercialSurfacesMock.mockReturnValue(false);+ presentationPolicyIsReadOnlyMock.mockReset();+ presentationPolicyIsReadOnlyMock.mockReturnValue(false);}/**@@ -277,6 +282,20 @@ describe('RelayOnboardingCard', () => {expect(screen.queryByText(/Get Relay/)).not.toBeInTheDocument();expect(screen.queryByText(/or start a Pro trial/)).not.toBeInTheDocument();});++ it('hides relay onboarding entirely in read-only demo mode', async () => {+ setupWithRelayFeature({ connected: false, active_channels: 0 });+ presentationPolicyIsReadOnlyMock.mockReturnValue(true);+ render(() => <RelayOnboardingCard />);++ await waitFor(() => {+ expect(loadLicenseStatusMock).toHaveBeenCalled();+ });++ expect(screen.queryByTestId('card')).not.toBeInTheDocument();+ expect(screen.queryByText('Set Up Relay')).not.toBeInTheDocument();+ expect(screen.queryByText('Pair Your Mobile Device')).not.toBeInTheDocument();+ });});// ── Hidden when relay is active ────────────────────────────────────diff --git a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsxindex c98f1afbf0..7d074ab7e5 100644--- a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx+++ b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx@@ -1,7 +1,8 @@-import { Component, Match, Switch, createMemo } from 'solid-js';+import { Component, Match, Show, Switch, createEffect, createMemo } from 'solid-js';import { useLocation, useNavigate } from '@solidjs/router';import { Card } from '@/components/shared/Card';import { Subtabs } from '@/components/shared/Subtabs';+import { presentationPolicyIsReadOnly } from '@/stores/sessionPresentationPolicy';import { SELF_HOSTED_PRO_BILLING_PRESENTATION } from './selfHostedBillingPresentation';import { InfrastructureInstallPanel } from './InfrastructureInstallPanel';import { InfrastructureReportingPanel } from './InfrastructureReportingPanel';@@ -20,89 +21,109 @@ export const InfrastructureWorkspace: Component<InfrastructureWorkspaceProps> =const navigate = useNavigate();const location = useLocation();const activeView = createMemo(() => getInfrastructureWorkspaceViewFromPath(location.pathname));+ const readOnlyWorkspace = createMemo(() => presentationPolicyIsReadOnly());const installPath = createMemo(() => buildInfrastructureWorkspacePath('install'));const platformsPath = createMemo(() => buildInfrastructureWorkspacePath('platforms'));+ const inventoryPath = createMemo(() => buildInfrastructureWorkspacePath('inventory'));+ const visibleTabs = createMemo(() =>+ readOnlyWorkspace()+ ? INFRASTRUCTURE_WORKSPACE_TABS.filter((tab) => tab.id === 'inventory')+ : INFRASTRUCTURE_WORKSPACE_TABS,+ );const openView = (view: InfrastructureWorkspaceView) =>navigate(buildInfrastructureWorkspacePath(view));+ createEffect(() => {+ if (readOnlyWorkspace() && activeView() !== 'inventory') {+ navigate(inventoryPath(), { replace: true });+ }+ });+return (<div class="space-y-6">- <Card padding="lg" class="rounded-xl border border-border shadow-sm">- <div class="space-y-4">- <div class="space-y-2">- <h3 class="text-base font-semibold text-base-content">Connect your first system</h3>- <p class="text-sm text-muted">- Use Install on a host for the first machine that should run the unified agent. If the- first system is API-backed, such as Proxmox or TrueNAS, go straight to Platform- connections.- </p>- </div>- <div class="grid gap-3 lg:grid-cols-3">- <div class="rounded-md border border-border bg-surface px-4 py-3">- <p class="text-xs font-semibold uppercase tracking-wide text-muted">1. Choose path</p>- <p class="mt-1 text-sm text-base-content">- Choose Install on a host for agent-managed systems, or open Platform connections- for Proxmox, TrueNAS, and other systems Pulse should poll through their own APIs.+ <Show when={!readOnlyWorkspace()}>+ <Card padding="lg" class="rounded-xl border border-border shadow-sm">+ <div class="space-y-4">+ <div class="space-y-2">+ <h3 class="text-base font-semibold text-base-content">Connect your first system</h3>+ <p class="text-sm text-muted">+ Use Install on a host for the first machine that should run the unified agent. If+ the first system is API-backed, such as Proxmox or TrueNAS, go straight to Platform+ connections.</p></div>- <div class="rounded-md border border-border bg-surface px-4 py-3">- <p class="text-xs font-semibold uppercase tracking-wide text-muted">- 2. Generate access- </p>- <p class="mt-1 text-sm text-base-content">- Create the install token Pulse expects for the first monitored host, or add the API- credentials Pulse should store for API-backed platforms like Proxmox and TrueNAS.- </p>+ <div class="grid gap-3 lg:grid-cols-3">+ <div class="rounded-md border border-border bg-surface px-4 py-3">+ <p class="text-xs font-semibold uppercase tracking-wide text-muted">+ 1. Choose path+ </p>+ <p class="mt-1 text-sm text-base-content">+ Choose Install on a host for agent-managed systems, or open Platform connections+ for Proxmox, TrueNAS, and other systems Pulse should poll through their own APIs.+ </p>+ </div>+ <div class="rounded-md border border-border bg-surface px-4 py-3">+ <p class="text-xs font-semibold uppercase tracking-wide text-muted">+ 2. Generate access+ </p>+ <p class="mt-1 text-sm text-base-content">+ Create the install token Pulse expects for the first monitored host, or add the+ API credentials Pulse should store for API-backed platforms like Proxmox and+ TrueNAS.+ </p>+ </div>+ <div class="rounded-md border border-border bg-surface px-4 py-3">+ <p class="text-xs font-semibold uppercase tracking-wide text-muted">+ 3. Confirm reporting+ </p>+ <p class="mt-1 text-sm text-base-content">+ Run the command on that machine, then use Reporting & control once the first+ system starts reporting.+ </p>+ </div></div>- <div class="rounded-md border border-border bg-surface px-4 py-3">- <p class="text-xs font-semibold uppercase tracking-wide text-muted">- 3. Confirm reporting- </p>- <p class="mt-1 text-sm text-base-content">- Run the command on that machine, then use Reporting & control once the first- system starts reporting.- </p>+ <div class="flex flex-wrap gap-3">+ <button+ type="button"+ onClick={() => navigate(installPath())}+ class={`inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors ${+ activeView() === 'install'+ ? 'bg-blue-600 text-white'+ : 'border border-border bg-surface text-base-content hover:bg-surface-hover'+ }`}+ >+ {activeView() === 'install'+ ? 'Install on a host selected'+ : 'Open Install on a host'}+ </button>+ <button+ type="button"+ onClick={() => navigate(platformsPath())}+ class={`inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors ${+ activeView() === 'platforms'+ ? 'bg-emerald-600 text-white'+ : 'border border-border bg-surface text-base-content hover:bg-surface-hover'+ }`}+ >+ {activeView() === 'platforms'+ ? 'Platform connections selected'+ : 'Open Platform connections'}+ </button></div>+ <p class="text-sm text-muted">+ {SELF_HOSTED_PRO_BILLING_PRESENTATION.infrastructureWorkspaceReferral}+ </p></div>- <div class="flex flex-wrap gap-3">- <button- type="button"- onClick={() => navigate(installPath())}- class={`inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors ${- activeView() === 'install'- ? 'bg-blue-600 text-white'- : 'border border-border bg-surface text-base-content hover:bg-surface-hover'- }`}- >- {activeView() === 'install' ? 'Install on a host selected' : 'Open Install on a host'}- </button>- <button- type="button"- onClick={() => navigate(platformsPath())}- class={`inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors ${- activeView() === 'platforms'- ? 'bg-emerald-600 text-white'- : 'border border-border bg-surface text-base-content hover:bg-surface-hover'- }`}- >- {activeView() === 'platforms'- ? 'Platform connections selected'- : 'Open Platform connections'}- </button>- </div>- <p class="text-sm text-muted">- {SELF_HOSTED_PRO_BILLING_PRESENTATION.infrastructureWorkspaceReferral}- </p>- </div>- </Card>+ </Card>+ </Show><div class="space-y-3"><Subtabsvalue={activeView()}onChange={(value) => openView(value as InfrastructureWorkspaceView)}ariaLabel="Infrastructure workspace"- tabs={INFRASTRUCTURE_WORKSPACE_TABS.map((tab) => ({+ tabs={visibleTabs().map((tab) => ({value: tab.id,label: tab.label,}))}diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsxindex eac23b6cb0..7921334490 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx@@ -5,6 +5,7 @@ import { InfrastructureWorkspace } from '../InfrastructureWorkspace';let mockPathname = '/settings';const navigateSpy = vi.hoisted(() => vi.fn());+const presentationPolicyIsReadOnlyMock = vi.hoisted(() => vi.fn(() => false));vi.mock('@solidjs/router', async () => {const actual = await vi.importActual<typeof import('@solidjs/router')>('@solidjs/router');@@ -15,6 +16,10 @@ vi.mock('@solidjs/router', async () => {};});+vi.mock('@/stores/sessionPresentationPolicy', () => ({+ presentationPolicyIsReadOnly: () => presentationPolicyIsReadOnlyMock(),+}));+vi.mock('../InfrastructureInstallPanel', () => ({InfrastructureInstallPanel: () => <div data-testid="unified-agents">install</div>,}));@@ -30,6 +35,8 @@ vi.mock('../PlatformConnectionsWorkspace', () => ({describe('InfrastructureWorkspace', () => {beforeEach(() => {navigateSpy.mockReset();+ presentationPolicyIsReadOnlyMock.mockReset();+ presentationPolicyIsReadOnlyMock.mockReturnValue(false);mockPathname = '/settings/infrastructure';});@@ -131,4 +138,21 @@ describe('InfrastructureWorkspace', () => {expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure/install');});++ it('collapses the workspace to reporting and redirects install routes in read-only mode', () => {+ presentationPolicyIsReadOnlyMock.mockReturnValue(true);+ mockPathname = '/settings/infrastructure/install';+ renderWorkspace();++ expect(screen.queryByText('Connect your first system')).not.toBeInTheDocument();+ expect(screen.queryByRole('tab', { name: 'Install on a host' })).not.toBeInTheDocument();+ expect(screen.queryByRole('tab', { name: 'Platform connections' })).not.toBeInTheDocument();+ expect(screen.getByRole('tab', { name: 'Reporting & control' })).toHaveAttribute(+ 'aria-selected',+ 'false',+ );+ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure/operations', {+ replace: true,+ });+ });});diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex dd6e324ef8..7be1445d32 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -523,6 +523,8 @@ describe('Settings architecture guardrails', () => {expect(settingsNavigationHookSource).toContain('resolveCanonicalSettingsPath');expect(settingsNavigationHookSource).toContain('resolveCanonicalSelfHostedBillingHref');expect(settingsNavigationHookSource).toContain('settingsTabPath');+ expect(settingsNavigationHookSource).toContain('presentationPolicyIsReadOnly');+ expect(settingsNavigationHookSource).toContain("buildInfrastructureWorkspacePath('inventory')");expect(settingsRoutingSource).toContain("from './settingsNavigationModel'");expect(settingsTypesSource).toContain("from './settingsNavigationModel'");expect(settingsDialogsSource).toContain('UpdateConfirmationModal');@@ -887,7 +889,10 @@ describe('Settings architecture guardrails', () => {expect(infrastructureWorkspaceSource).not.toContain('createSignal<InfrastructureWorkspaceView>',);- expect(infrastructureWorkspaceSource).not.toContain('createEffect(() =>');+ expect(infrastructureWorkspaceSource).toContain('createEffect(() =>');+ expect(infrastructureWorkspaceSource).toContain(+ "if (readOnlyWorkspace() && activeView() !== 'inventory')",+ );expect(infrastructureWorkspaceSource).toContain('InfrastructureInstallPanel');expect(infrastructureWorkspaceSource).toContain('PlatformConnectionsWorkspace');expect(infrastructureWorkspaceSource).toContain('InfrastructureReportingPanel');@@ -1477,6 +1482,17 @@ describe('Settings architecture guardrails', () => {);});+ it('keeps read-only infrastructure landing and shell copy on the shared settings owner', () => {+ expect(settingsNavigationHookSource).toContain('presentationPolicyIsReadOnly');+ expect(settingsNavigationHookSource).toContain("buildInfrastructureWorkspacePath('inventory')");+ expect(settingsShellStateSource).toContain('presentationPolicyIsReadOnly');+ expect(settingsShellStateSource).toContain(+ 'Setup changes stay unavailable in this read-only session.',+ );+ expect(infrastructureWorkspaceSource).toContain('presentationPolicyIsReadOnly');+ expect(infrastructureWorkspaceSource).toContain("tab.id === 'inventory'");+ });+it('keeps relay shell copy on the shared relay presentation owner', () => {expect(settingsHeaderMetaSource).toContain('RELAY_SETTINGS_DESCRIPTION');expect(relaySettingsPanelSource).toContain('description={RELAY_SETTINGS_DESCRIPTION}');diff --git a/frontend-modern/src/components/Settings/__tests__/useSettingsNavigation.test.tsx b/frontend-modern/src/components/Settings/__tests__/useSettingsNavigation.test.tsxnew file mode 100644index 0000000000..03bba4203f--- /dev/null+++ b/frontend-modern/src/components/Settings/__tests__/useSettingsNavigation.test.tsx@@ -0,0 +1,61 @@+import { afterEach, describe, expect, it, vi } from 'vitest';+import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';+import { useSettingsNavigation } from '../useSettingsNavigation';++const presentationPolicyIsReadOnlyMock = vi.hoisted(() => vi.fn(() => false));+const navigateSpy = vi.hoisted(() => vi.fn());++vi.mock('@/stores/sessionPresentationPolicy', () => ({+ presentationPolicyIsReadOnly: () => presentationPolicyIsReadOnlyMock(),+}));++function renderHarness(pathname = '/settings', search = '', hash = '') {+ return render(() => {+ const navigation = useSettingsNavigation({+ navigate: navigateSpy,+ location: {+ pathname,+ search,+ hash,+ },+ });++ return (+ <button type="button" onClick={() => navigation.setActiveTab('infrastructure-operations')}>+ open infrastructure settings+ </button>+ );+ });+}++describe('useSettingsNavigation', () => {+ afterEach(() => {+ cleanup();+ navigateSpy.mockReset();+ presentationPolicyIsReadOnlyMock.mockReset();+ presentationPolicyIsReadOnlyMock.mockReturnValue(false);+ });++ it('lands /settings on reporting inventory when the session is read-only', async () => {+ presentationPolicyIsReadOnlyMock.mockReturnValue(true);+ renderHarness('/settings');++ await waitFor(() => {+ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure/operations', {+ replace: true,+ scroll: false,+ });+ });+ });++ it('routes infrastructure tab clicks to reporting inventory when the session is read-only', () => {+ presentationPolicyIsReadOnlyMock.mockReturnValue(true);+ renderHarness('/settings/system-general');++ fireEvent.click(screen.getByRole('button', { name: 'open infrastructure settings' }));++ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure/operations', {+ scroll: false,+ });+ });+});diff --git a/frontend-modern/src/components/Settings/__tests__/useSettingsShellState.test.ts b/frontend-modern/src/components/Settings/__tests__/useSettingsShellState.test.tsnew file mode 100644index 0000000000..30206cc728--- /dev/null+++ b/frontend-modern/src/components/Settings/__tests__/useSettingsShellState.test.ts@@ -0,0 +1,33 @@+import { afterEach, describe, expect, it, vi } from 'vitest';+import { createRoot } from 'solid-js';+import { useSettingsShellState } from '../useSettingsShellState';++const presentationPolicyIsReadOnlyMock = vi.hoisted(() => vi.fn(() => false));++vi.mock('@/stores/sessionPresentationPolicy', () => ({+ presentationPolicyIsReadOnly: () => presentationPolicyIsReadOnlyMock(),+}));++describe('useSettingsShellState', () => {+ afterEach(() => {+ presentationPolicyIsReadOnlyMock.mockReset();+ presentationPolicyIsReadOnlyMock.mockReturnValue(false);+ });++ it('uses reporting-focused infrastructure copy in read-only sessions', () => {+ presentationPolicyIsReadOnlyMock.mockReturnValue(true);++ createRoot((dispose) => {+ const state = useSettingsShellState({+ activeTab: () => 'infrastructure-operations',+ });++ expect(state.headerMeta().title).toBe('Infrastructure Operations');+ expect(state.headerMeta().description).toBe(+ 'Review the current monitored-system inventory, reporting posture, and connected platform coverage. Setup changes stay unavailable in this read-only session.',+ );++ dispose();+ });+ });+});diff --git a/frontend-modern/src/components/Settings/useSettingsNavigation.ts b/frontend-modern/src/components/Settings/useSettingsNavigation.tsindex fea81734e2..aac12cf5ab 100644--- a/frontend-modern/src/components/Settings/useSettingsNavigation.ts+++ b/frontend-modern/src/components/Settings/useSettingsNavigation.ts@@ -1,5 +1,7 @@import { createEffect, createSignal, on } from 'solid-js';+import { presentationPolicyIsReadOnly } from '@/stores/sessionPresentationPolicy';import { resolveCanonicalSelfHostedBillingHref } from '@/utils/pricingHandoff';+import { buildInfrastructureWorkspacePath } from './infrastructureWorkspaceModel';import {DEFAULT_SETTINGS_TAB,deriveAgentFromPath,@@ -37,6 +39,10 @@ export function useSettingsNavigation({ navigate, location }: UseSettingsNavigatconst [currentTab, setCurrentTab] = createSignal<SettingsTab>(deriveTabFromPath(location.pathname),);+ const resolveTabPath = (tab: SettingsTab): string =>+ tab === 'infrastructure-operations' && presentationPolicyIsReadOnly()+ ? buildInfrastructureWorkspacePath('inventory')+ : settingsTabPath(tab);const activeTab = (): SettingsDispatchableTab => {const tab = currentTab();return tab === 'proxmox' ? 'infrastructure-operations' : tab;@@ -64,7 +70,7 @@ export function useSettingsNavigation({ navigate, location }: UseSettingsNavigatif (currentTab() !== tab) {setCurrentTab(tab);}- const targetPath = settingsTabPath(tab);+ const targetPath = resolveTabPath(tab);if (location.pathname !== targetPath) {navigate(targetPath, { scroll: false });}@@ -78,7 +84,7 @@ export function useSettingsNavigation({ navigate, location }: UseSettingsNavigatif (path === '/settings' || path === '/settings/') {const queryTab = deriveTabFromQuery(search);const resolvedTab = queryTab ?? DEFAULT_SETTINGS_TAB;- const target = settingsTabPath(resolvedTab);+ const target = resolveTabPath(resolvedTab);if (target !== path) {navigate(target, { replace: true, scroll: false });@@ -105,6 +111,19 @@ export function useSettingsNavigation({ navigate, location }: UseSettingsNavigatreturn;}+ if (+ presentationPolicyIsReadOnly() &&+ (path === '/settings/infrastructure' ||+ path === '/settings/workloads' ||+ path === '/settings/workloads/docker')+ ) {+ navigate(buildInfrastructureWorkspacePath('inventory'), {+ replace: true,+ scroll: false,+ });+ return;+ }+const canonicalPath = resolveCanonicalSettingsPath(path);if (canonicalPath && canonicalPath !== path) {navigate(canonicalPath, {diff --git a/frontend-modern/src/components/Settings/useSettingsShellState.ts b/frontend-modern/src/components/Settings/useSettingsShellState.tsindex e6b67ba65e..fc434f87c2 100644--- a/frontend-modern/src/components/Settings/useSettingsShellState.ts+++ b/frontend-modern/src/components/Settings/useSettingsShellState.ts@@ -1,4 +1,5 @@import { Accessor, createMemo, createSignal } from 'solid-js';+import { presentationPolicyIsReadOnly } from '@/stores/sessionPresentationPolicy';import { SETTINGS_HEADER_META } from './settingsHeaderMeta';import type { SettingsTab } from './settingsNavigationModel';@@ -8,11 +9,23 @@ interface UseSettingsShellStateParams {export function useSettingsShellState({ activeTab }: UseSettingsShellStateParams) {const headerMeta = createMemo(- () =>- SETTINGS_HEADER_META[activeTab()] ?? {- title: 'Settings',- description: 'Manage Pulse configuration.',- },+ () => {+ const tab = activeTab();+ if (tab === 'infrastructure-operations' && presentationPolicyIsReadOnly()) {+ return {+ title: 'Infrastructure Operations',+ description:+ 'Review the current monitored-system inventory, reporting posture, and connected platform coverage. Setup changes stay unavailable in this read-only session.',+ };+ }++ return (+ SETTINGS_HEADER_META[tab] ?? {+ title: 'Settings',+ description: 'Manage Pulse configuration.',+ }+ );+ },);// Sidebar always starts expanded for discoverability (issue #764)