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.

Keep Settings capability withdrawal on its safe fallback

pulse-triage[bot]85669cb35f77
diff --git a/docs/release-control/v6/internal/subsystems/organization-settings.md b/docs/release-control/v6/internal/subsystems/organization-settings.md
index 59ee91c176..fa3f2f06ea 100644
--- a/docs/release-control/v6/internal/subsystems/organization-settings.md
+++ b/docs/release-control/v6/internal/subsystems/organization-settings.md
@@ -35,8 +35,11 @@ requires the current in-page confirmation, which is withdrawn on context loss.
A failed save preserves the live draft with fixed inline feedback. Closing an
editor erases its draft. Saved permission strings outside the editor's shortcut
list remain visible and unchanged unless explicitly edited. Success feedback belongs to this panel rather than a
-global identity-bearing notification. Backend authorisation, endpoints and
-permission semantics remain unchanged.
+global identity-bearing notification. The containing Settings renderer reads optional current entry props rather than
+retaining a conditional accessor after a panel is withdrawn. Revocation keeps
+the existing safe navigation fallback usable instead of raising the route error
+boundary; a same-reader status refresh does not remount the panel or lose its
+draft. Backend authorisation, endpoints and permission semantics remain unchanged.
Normal `RolesReaderLifetime`, RBAC API, paywall and registry tests cover
read/write races, revoked authority, licence loss, disposal, stale row IDs,
diff --git a/frontend-modern/src/components/Settings/Settings.tsx b/frontend-modern/src/components/Settings/Settings.tsx
index 9b4f4ff688..910f6d78cb 100644
--- a/frontend-modern/src/components/Settings/Settings.tsx
+++ b/frontend-modern/src/components/Settings/Settings.tsx
@@ -199,11 +199,12 @@ const SettingsWorkspace: Component<SettingsProps> = (props) => {
when={activeSettingsPanelEntry()}
fallback={securityStatusLoading() ? <SettingsPanelLoadingFallback /> : null}
>
- {(entry) => (
- <Suspense fallback={<SettingsPanelLoadingFallback />}>
- <Dynamic component={entry().component} {...(entry().getProps?.() ?? {})} />
- </Suspense>
- )}
+ <Suspense fallback={<SettingsPanelLoadingFallback />}>
+ <Dynamic
+ component={activeSettingsPanelEntry()?.component}
+ {...(activeSettingsPanelEntry()?.getProps?.() ?? {})}
+ />
+ </Suspense>
</Show>
</SettingsPageShell>
diff --git a/frontend-modern/src/components/Settings/__tests__/RolesReaderLifetime.test.tsx b/frontend-modern/src/components/Settings/__tests__/RolesReaderLifetime.test.tsx
index 7d39164544..31c5e729c2 100644
--- a/frontend-modern/src/components/Settings/__tests__/RolesReaderLifetime.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/RolesReaderLifetime.test.tsx
@@ -21,7 +21,7 @@ vi.mock('@/api/rbac', () => ({ RBACAPI: mocks }));
vi.mock('@/stores/notifications', () => ({
notificationStore: { success: mocks.success, error: mocks.error },
}));
-vi.mock('@/utils/logger', () => ({ logger: { error: mocks.log } }));
+vi.mock('@/utils/logger', () => ({ logger: { error: mocks.log, debug: vi.fn(), warn: vi.fn() } }));
let enabled: () => boolean;
vi.mock('../useRBACFeatureGateState', () => ({
useRBACFeatureGateState: () => ({
diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
index 6d908ba556..13e1121837 100644
--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
@@ -357,6 +357,9 @@ describe('settings architecture guardrails', () => {
it('keeps allowed organization deep links on the canonical settings shell', () => {
expect(settingsSource).toContain("import { useSettingsAccess } from './useSettingsAccess';");
expect(settingsSource).toContain('const activeSettingsPanelEntry = createMemo(() => {');
+ expect(settingsSource).toContain('component={activeSettingsPanelEntry()?.component}');
+ expect(settingsSource).toContain('...(activeSettingsPanelEntry()?.getProps?.() ?? {})');
+ expect(settingsSource).not.toContain('entry().getProps');
expect(settingsSource).toContain('if (!flatTabs().some((tab) => tab.id === currentTab)) {');
expect(settingsSource).toContain('return settingsPanelRegistry()[currentTab];');
expect(settingsPanelRegistryContextSource).toContain(