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 whats-new modal on public demo
rcourtman8e6fe4142fca
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex d2747dc958..1b5390a407 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -1130,6 +1130,10 @@ product copy, or external links back into the shared shell. Internal productnavigation from that shell should still route through canonical shared helperssuch as `frontend-modern/src/routing/resourceLinks.ts` rather than freezing raw`/recovery?...` route strings into the modal itself.+That state owner now also owns public-demo suppression: the modal must stay+closed until `sessionPresentationPolicyResolved()` is true and must fail closed+when `presentationPolicyIsDemoMode()` resolves true, so the public demo does+not front-load product migration onboarding ahead of the actual surface.Canonical customer disclosures inside those shared shells now route through`frontend-modern/src/utils/docsLinks.ts`, so settings and what's-new privacylinks resolve to shipped `/docs/...` assets instead of hard-coded GitHubdiff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex 6a8da3ef16..b35587aa47 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -1134,6 +1134,8 @@ describe('shared primitive guardrails', () => {expect(whatsNewModalStateSource).toContain('createLocalStorageBooleanSignal');expect(whatsNewModalStateSource).toContain('createSignal');expect(whatsNewModalStateSource).toContain('STORAGE_KEYS.WHATS_NEW_NAV_V2_SHOWN');+ expect(whatsNewModalStateSource).toContain('sessionPresentationPolicyResolved');+ expect(whatsNewModalStateSource).toContain('presentationPolicyIsDemoMode');expect(whatsNewModalStateSource).toContain('handleClose');expect(whatsNewModalModelSource).toContain('WHATS_NEW_FEATURE_CARDS');diff --git a/frontend-modern/src/components/shared/__tests__/WhatsNewModal.test.tsx b/frontend-modern/src/components/shared/__tests__/WhatsNewModal.test.tsxindex 8adcd84497..3dfdeefa64 100644--- a/frontend-modern/src/components/shared/__tests__/WhatsNewModal.test.tsx+++ b/frontend-modern/src/components/shared/__tests__/WhatsNewModal.test.tsx@@ -1,4 +1,4 @@-import { afterEach, beforeEach, describe, expect, it } from 'vitest';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { WhatsNewModal } from '@/components/shared/WhatsNewModal';import whatsNewModalSource from '@/components/shared/WhatsNewModal.tsx?raw';@@ -6,9 +6,19 @@ import whatsNewModalModelSource from '@/components/shared/whatsNewModalModel.ts?import whatsNewModalStateSource from '@/components/shared/useWhatsNewModalState.ts?raw';import { STORAGE_KEYS } from '@/utils/localStorage';+const presentationPolicyIsDemoModeMock = vi.hoisted(() => vi.fn(() => false));+const sessionPresentationPolicyResolvedMock = vi.hoisted(() => vi.fn(() => true));++vi.mock('@/stores/sessionPresentationPolicy', () => ({+ presentationPolicyIsDemoMode: presentationPolicyIsDemoModeMock,+ sessionPresentationPolicyResolved: sessionPresentationPolicyResolvedMock,+}));+describe('WhatsNewModal', () => {beforeEach(() => {localStorage.clear();+ presentationPolicyIsDemoModeMock.mockReturnValue(false);+ sessionPresentationPolicyResolvedMock.mockReturnValue(true);});afterEach(() => {@@ -31,6 +41,8 @@ describe('WhatsNewModal', () => {expect(whatsNewModalStateSource).toContain('createLocalStorageBooleanSignal');expect(whatsNewModalStateSource).toContain('createSignal');expect(whatsNewModalStateSource).toContain('STORAGE_KEYS.WHATS_NEW_NAV_V2_SHOWN');+ expect(whatsNewModalStateSource).toContain('sessionPresentationPolicyResolved');+ expect(whatsNewModalStateSource).toContain('presentationPolicyIsDemoMode');expect(whatsNewModalStateSource).toContain('handleClose');expect(whatsNewModalModelSource).toContain('WHATS_NEW_FEATURE_CARDS');@@ -56,6 +68,16 @@ describe('WhatsNewModal', () => {expect(screen.getByText('Welcome to the New Navigation!')).toBeInTheDocument();});+ it('stays hidden for public demo sessions', async () => {+ presentationPolicyIsDemoModeMock.mockReturnValue(true);++ render(() => <WhatsNewModal />);++ await waitFor(() => {+ expect(screen.queryByRole('dialog')).not.toBeInTheDocument();+ });+ });+it('closes on backdrop click and records the modal as seen by default', async () => {render(() => <WhatsNewModal />);diff --git a/frontend-modern/src/components/shared/useWhatsNewModalState.ts b/frontend-modern/src/components/shared/useWhatsNewModalState.tsindex 59ffab50fc..3d438f0ada 100644--- a/frontend-modern/src/components/shared/useWhatsNewModalState.ts+++ b/frontend-modern/src/components/shared/useWhatsNewModalState.ts@@ -1,5 +1,9 @@import { createSignal } from 'solid-js';import { createLocalStorageBooleanSignal, STORAGE_KEYS } from '@/utils/localStorage';+import {+ presentationPolicyIsDemoMode,+ sessionPresentationPolicyResolved,+} from '@/stores/sessionPresentationPolicy';export function useWhatsNewModalState() {const [hasSeen, setHasSeen] = createLocalStorageBooleanSignal(@@ -9,7 +13,11 @@ export function useWhatsNewModalState() {const [dontShowAgain, setDontShowAgain] = createSignal(true);const [dismissedForSession, setDismissedForSession] = createSignal(false);- const isOpen = () => !hasSeen() && !dismissedForSession();+ const isOpen = () =>+ sessionPresentationPolicyResolved() &&+ !presentationPolicyIsDemoMode() &&+ !hasSeen() &&+ !dismissedForSession();const handleClose = () => {if (dontShowAgain()) {