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
Govern settings shell presentation helper
rcourtman87a3ec873620
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 985bd50b71..ef849363bc 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -58,6 +58,7 @@ work extends shared components instead of creating new local variants.36. `frontend-modern/src/utils/ssoProviderPresentation.ts`37. `frontend-modern/src/utils/systemSettingsPresentation.ts`38. `frontend-modern/src/utils/aiSettingsPresentation.ts`+39. `frontend-modern/src/utils/settingsShellPresentation.ts`37. `frontend-modern/src/components/Settings/UpdateInstallGuide.tsx`38. `frontend-modern/src/components/Settings/updatesSettingsModel.ts`39. `frontend-modern/src/components/Settings/UpdatesSettingsPanel.tsx`@@ -704,6 +705,10 @@ the brief three-step explanation: install the Unified Agent, get the firstPulse resource, then layer on additional context.The settings shell is now also a governed frontend primitive boundary.+`frontend-modern/src/utils/settingsShellPresentation.ts` now owns the+customer-facing settings-shell framing copy for navigation, search, loading,+and unsaved-change banners so `SettingsPageShell.tsx` stays a render shell+instead of re-accumulating product wording inline.The alerts page shell now follows that same page-shell rule for feature tabs:`frontend-modern/src/pages/Alerts.tsx` owns navigation and cross-surfacediff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex 2bcc414106..259825026b 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -2099,6 +2099,7 @@"frontend-modern/src/utils/aiSettingsPresentation.ts","frontend-modern/src/utils/diagnosticsPresentation.ts","frontend-modern/src/utils/reportingPresentation.ts",+ "frontend-modern/src/utils/settingsShellPresentation.ts","frontend-modern/src/utils/ssoProviderPresentation.ts","frontend-modern/src/utils/systemLogsPresentation.ts","frontend-modern/src/utils/systemSettingsPresentation.ts"@@ -2251,6 +2252,19 @@"frontend-modern/src/utils/__tests__/diagnosticsPresentation.test.ts"]},+ {+ "id": "settings-shell-presentation-helper",+ "label": "settings shell presentation helper proof",+ "match_prefixes": [],+ "match_files": [+ "frontend-modern/src/utils/settingsShellPresentation.ts"+ ],+ "allow_same_subsystem_tests": false,+ "test_prefixes": [],+ "exact_files": [+ "frontend-modern/src/utils/__tests__/settingsShellPresentation.test.ts"+ ]+ },{"id": "system-logs-presentation-helper","label": "system logs presentation helper proof",diff --git a/frontend-modern/src/components/Settings/SettingsPageShell.tsx b/frontend-modern/src/components/Settings/SettingsPageShell.tsxindex 19ba5747f3..ca314cca6a 100644--- a/frontend-modern/src/components/Settings/SettingsPageShell.tsx+++ b/frontend-modern/src/components/Settings/SettingsPageShell.tsx@@ -3,7 +3,11 @@ import ChevronRight from 'lucide-solid/icons/chevron-right';import { Card } from '@/components/shared/Card';import { PageHeader } from '@/components/shared/PageHeader';import { SearchInput } from '@/components/shared/SearchInput';-import { getSettingsSearchEmptyState } from '@/utils/settingsShellPresentation';+import {+ getSettingsSearchEmptyState,+ getSettingsUnsavedChangesBanner,+ SETTINGS_SHELL_COPY,+} from '@/utils/settingsShellPresentation';import type {SettingsHeaderMeta,SettingsNavGroup,@@ -31,6 +35,8 @@ interface SettingsPageShellProps {}export const SettingsPageShell: Component<SettingsPageShellProps> = (props) => {+ const unsavedChangesBanner = () => getSettingsUnsavedChangesBanner();+return (<div class="space-y-6"><div class="px-1">@@ -55,9 +61,11 @@ export const SettingsPageShell: Component<SettingsPageShellProps> = (props) => {/></svg><div>- <p class="font-semibold text-amber-900 dark:text-amber-100">Unsaved changes</p>+ <p class="font-semibold text-amber-900 dark:text-amber-100">+ {unsavedChangesBanner().title}+ </p><p class="text-sm text-amber-700 dark:text-amber-200 mt-0.5">- Your changes will be lost if you navigate away+ {unsavedChangesBanner().description}</p></div></div>@@ -67,14 +75,14 @@ export const SettingsPageShell: Component<SettingsPageShellProps> = (props) => {class="flex-1 sm:flex-initial px-5 py-2.5 text-sm font-medium bg-amber-600 text-white rounded-md hover:bg-amber-700 shadow-sm transition-colors"onClick={props.saveSettings}>- Save Changes+ {unsavedChangesBanner().saveLabel}</button><buttontype="button"class="px-4 py-2.5 text-sm font-medium text-amber-700 dark:text-amber-200 hover:underline transition-colors"onClick={props.discardChanges}>- Discard+ {unsavedChangesBanner().discardLabel}</button></div></div>@@ -84,7 +92,7 @@ export const SettingsPageShell: Component<SettingsPageShellProps> = (props) => {<Card padding="none" class="relative flex lg:flex-row overflow-hidden min-h-[600px]"><divclass={`${props.isMobileMenuOpen() ? 'flex flex-col w-full' : 'hidden lg:flex lg:flex-col'} ${props.sidebarCollapsed() ? 'lg:w-16 lg:min-w-[4rem] lg:max-w-[4rem] lg:basis-[4rem]' : 'lg:w-72 lg:min-w-[18rem] lg:max-w-[18rem] lg:basis-[18rem]'} relative border-b border-border lg:border-b-0 lg:border-r lg:align-top flex-shrink-0 transition-all duration-200 bg-surface lg:bg-transparent z-10`}- aria-label="Settings navigation"+ aria-label={SETTINGS_SHELL_COPY.navigationAriaLabel}aria-expanded={!props.sidebarCollapsed()}><div@@ -92,12 +100,14 @@ export const SettingsPageShell: Component<SettingsPageShellProps> = (props) => {><Show when={!props.sidebarCollapsed()}><div class="flex items-center justify-between pb-2 border-b border-border">- <h2 class="text-sm font-semibold text-base-content">Settings</h2>+ <h2 class="text-sm font-semibold text-base-content">+ {SETTINGS_SHELL_COPY.navigationTitle}+ </h2><buttontype="button"onClick={() => props.setSidebarCollapsed(true)}class="p-1 rounded-md hover:bg-surface-hover transition-colors"- aria-label="Collapse sidebar"+ aria-label={SETTINGS_SHELL_COPY.collapseSidebarLabel}><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path@@ -115,7 +125,7 @@ export const SettingsPageShell: Component<SettingsPageShellProps> = (props) => {type="button"onClick={() => props.setSidebarCollapsed(false)}class="w-full p-2 rounded-md hover:bg-surface-hover transition-colors"- aria-label="Expand sidebar"+ aria-label={SETTINGS_SHELL_COPY.expandSidebarLabel}><svg class="w-5 h-5 mx-auto" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path@@ -133,11 +143,11 @@ export const SettingsPageShell: Component<SettingsPageShellProps> = (props) => {<SearchInputvalue={props.searchQuery}onChange={props.setSearchQuery}- placeholder="Search settings..."+ placeholder={SETTINGS_SHELL_COPY.searchPlaceholder}class="w-full"captureBackspaceclearOnEscape- shortcutHint="Any key"+ shortcutHint={SETTINGS_SHELL_COPY.searchShortcutHint}/></div></Show>@@ -231,7 +241,7 @@ export const SettingsPageShell: Component<SettingsPageShellProps> = (props) => {><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" /></svg>- Settings+ {SETTINGS_SHELL_COPY.mobileBackLabel}</button><div class="ml-auto font-semibold text-base-content pr-3"><Show when={props.flatTabs().find((tab) => tab.id === props.activeTab())}>diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex 5a876c7bc8..5983412215 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -741,7 +741,13 @@ describe('Settings architecture guardrails', () => {it('keeps page-level settings header chrome inside SettingsPageShell', () => {expect(settingsShellSource).toContain('<PageHeader');expect(settingsShellSource).toContain('getSettingsSearchEmptyState');+ expect(settingsShellSource).toContain('getSettingsUnsavedChangesBanner');+ expect(settingsShellSource).toContain('SETTINGS_SHELL_COPY');expect(settingsShellSource).not.toContain('No settings found for "');+ expect(settingsShellSource).not.toContain('Unsaved changes');+ expect(settingsShellSource).not.toContain('Search settings...');+ expect(settingsShellSource).not.toContain('Collapse sidebar');+ expect(settingsShellSource).not.toContain('Expand sidebar');expect(infrastructureWorkspaceSource).not.toContain('<PageHeader');expect(infrastructureWorkspaceSource).not.toMatch(/<h[12][^>]*>/);expect(infrastructureWorkspaceSource).not.toContain('Add and manage infrastructure');diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.tsindex e4518b98f1..8f9d82f8c7 100644--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts@@ -118,6 +118,7 @@ import diagnosticsModelSource from '@/components/Settings/diagnosticsModel.ts?raimport diagnosticsResultsPanelSource from '@/components/Settings/DiagnosticsResultsPanel.tsx?raw';import diagnosticsStateSource from '@/components/Settings/useDiagnosticsPanelState.ts?raw';import settingsShellSource from '@/components/Settings/Settings.tsx?raw';+import settingsPageShellSource from '@/components/Settings/SettingsPageShell.tsx?raw';import settingsDialogsSource from '@/components/Settings/SettingsDialogs.tsx?raw';import settingsPanelRegistrySource from '@/components/Settings/useSettingsPanelRegistry.tsx?raw';import settingsPanelRegistryContextSource from '@/components/Settings/settingsPanelRegistryContext.tsx?raw';@@ -1433,6 +1434,12 @@ describe('frontend resource type boundaries', () => {);expect(settingsPanelRegistrySource).toContain('buildSettingsPanelRegistryContext');expect(settingsShellSource).not.toContain('getInfrastructurePanelProps: () => ({');+ expect(settingsPageShellSource).toContain('SETTINGS_SHELL_COPY');+ expect(settingsPageShellSource).toContain('getSettingsUnsavedChangesBanner');+ expect(settingsPageShellSource).not.toContain('Unsaved changes');+ expect(settingsPageShellSource).not.toContain('Search settings...');+ expect(settingsPageShellSource).not.toContain('Collapse sidebar');+ expect(settingsPageShellSource).not.toContain('Expand sidebar');expect(settingsPanelRegistryContextSource).toContain('systemPanels: SettingsSystemPanels');expect(settingsPanelRegistryLoadersSource).toContain('export const SETTINGS_PANEL_REGISTRY_LOADERS',diff --git a/frontend-modern/src/utils/__tests__/settingsShellPresentation.test.ts b/frontend-modern/src/utils/__tests__/settingsShellPresentation.test.tsindex 3fdcd0e3a0..9ecd35ee9d 100644--- a/frontend-modern/src/utils/__tests__/settingsShellPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/settingsShellPresentation.test.ts@@ -3,9 +3,29 @@ import {getSettingsConfigurationLoadingState,getSettingsLoadingState,getSettingsSearchEmptyState,+ getSettingsUnsavedChangesBanner,+ SETTINGS_SHELL_COPY,} from '@/utils/settingsShellPresentation';describe('settingsShellPresentation', () => {+ it('returns canonical settings shell framing copy', () => {+ expect(SETTINGS_SHELL_COPY).toEqual({+ navigationAriaLabel: 'Settings navigation',+ navigationTitle: 'Settings',+ searchPlaceholder: 'Search settings...',+ searchShortcutHint: 'Any key',+ mobileBackLabel: 'Settings',+ collapseSidebarLabel: 'Collapse settings navigation',+ expandSidebarLabel: 'Expand settings navigation',+ });+ expect(getSettingsUnsavedChangesBanner()).toEqual({+ title: 'Unsaved changes',+ description: 'Your changes will be lost if you navigate away.',+ saveLabel: 'Save Changes',+ discardLabel: 'Discard',+ });+ });+it('returns canonical settings search empty-state copy', () => {expect(getSettingsSearchEmptyState('alerts')).toEqual({text: 'No settings found for "alerts"',diff --git a/frontend-modern/src/utils/settingsShellPresentation.ts b/frontend-modern/src/utils/settingsShellPresentation.tsindex 53ffca156c..de801cd806 100644--- a/frontend-modern/src/utils/settingsShellPresentation.ts+++ b/frontend-modern/src/utils/settingsShellPresentation.ts@@ -1,3 +1,22 @@+export const SETTINGS_SHELL_COPY = {+ navigationAriaLabel: 'Settings navigation',+ navigationTitle: 'Settings',+ searchPlaceholder: 'Search settings...',+ searchShortcutHint: 'Any key',+ mobileBackLabel: 'Settings',+ collapseSidebarLabel: 'Collapse settings navigation',+ expandSidebarLabel: 'Expand settings navigation',+} as const;++export function getSettingsUnsavedChangesBanner() {+ return {+ title: 'Unsaved changes',+ description: 'Your changes will be lost if you navigate away.',+ saveLabel: 'Save Changes',+ discardLabel: 'Discard',+ } as const;+}+export function getSettingsSearchEmptyState(searchQuery: string) {return {text: `No settings found for "${searchQuery}"`,