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
Complete Pulse Cloud runtime handoff
rcourtman5296bbf4c493
diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex c2c476a0ab..e0cee8c9fb 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -502,9 +502,13 @@ the canonical monitored-system blocked payload.onboarding rather than as dedicated unified-agent install profiles. Theshared host-install contract may guide operators through the firstagent-managed host, but alternate CTAs and setup-completion guidance must- route API-backed first systems to `/settings/infrastructure/platforms`- instead of implying that a host install command is required before those- platforms can report into Pulse.+ route API-backed first systems through the canonical infrastructure+ onboarding contract at `/settings/infrastructure?add=pick`, while+ agent-managed first hosts use `/settings/infrastructure?add=agent`. The+ infrastructure workspace may consume those onboarding query params and+ normalize the browser back to `/settings/infrastructure`, but first-run+ callers must not fall back to the retired `/settings/infrastructure/install`+ or `/settings/infrastructure/platforms` deep links.27. Keep shared install-script fallback transport pinned to published releaselineage. `internal/api/unified_agent.go` and`internal/api/contract_test.go` must only map stable tags or explicit RCdiff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex 8f8a0d77a3..03e4ede10e 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -140,6 +140,14 @@ Community limit enforcement.4. Add or change MSP account-scoped workspace provisioning entry handlers through `internal/cloudcp/account/tenant_handlers.go`5. Add or change public cloud self-serve signup price configuration or checkout gating through `internal/cloudcp/config.go` and `internal/cloudcp/public_cloud_signup_handlers.go`6. Add or change the hosted account portal API, task-first browser shell, maintained portal frontend/bundle, or account-scoped workspace/access/billing handoff through `internal/cloudcp/portal/` and `internal/cloudcp/routes.go`+ That same customer-entry boundary owns the canonical hosted Cloud handoff:+ public Cloud entry, secure checkout return, and returning-customer sign-in+ must converge on Pulse Account. Public Cloud signup stays canonical at+ `/cloud/signup`, returning commercial magic-link requests from hosted signup+ must target `portal`, and hosted checkout provisioning must issue a+ portal-targeted magic link carrying tenant identity so the first+ authenticated landing is Pulse Account rather than a tenant-runtime-only+ redirect.7. Add or change Stripe provisioning plan resolution through `internal/cloudcp/stripe/provisioner.go`8. Add or change activation/grant lifecycle or dev-mode capability widening through `pkg/licensing/dev_mode_features.go`, `pkg/licensing/service.go`, `pkg/licensing/grant_refresh.go`, and `pkg/licensing/revocation_poll.go`9. Add or change license-server transport through `pkg/licensing/license_server_client.go` and `pkg/licensing/quickstart_bootstrap.go`@@ -158,6 +166,13 @@ Community limit enforcement.relay setup and upsell onboarding instead of inviting pairing or commercialaction from a governed non-manageable surface.19. Add or change cloud plan presentation through `frontend-modern/src/pages/CloudPricing.tsx`+ That same presentation boundary also owns truthful customer-entry copy for+ hosted Cloud pricing and signup. Cloud CTA labels, setup steps, and+ returning-account wording in `frontend-modern/src/pages/HostedSignup.tsx`,+ `frontend-modern/src/utils/cloudPlans.ts`, and adjacent public Cloud entry+ surfaces must describe the real commercial flow as secure checkout ->+ Pulse Account -> open workspace, not as an immediate workspace creation or+ trial-only shortcut.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`22. Keep the hosted account portal shell task-first and compact. Section@@ -178,7 +193,7 @@ Community limit enforcement.`usage`) that survives direct links, compatibility redirects, andin-product CTA navigation. The current canonical arrivals are`/settings/system/billing/usage?details=counting-rules` for explanation and- `/settings/system/billing/plan?intent=self_hosted_plan` for upgrade+ `/settings/system/billing/plan?intent=self_hosted_plan` for plan-selectionintent.24. Keep public-demo dashboard bootstrap route-owned on the adjacentcommercial/runtime boundary. `frontend-modern/src/useAppRuntimeState.ts`@@ -687,7 +702,9 @@ canonically `self_hosted_plan`. Pulse Account may continue normalizing thelegacy `max_monitored_systems` alias so older handoff links do not break, butthe portal proxy contract, checked-in embedded bundle, and rendered upgradecopy must treat self-hosted commerce as plan selection and paid extras rather-than monitored-system-cap expansion.+than monitored-system-cap expansion. Shared helpers and route-owned browser+symbols should name that state as plan selection as well; the monitored-system+alias belongs only to backward-compatible handoff normalization.If Pulse cannot create or resolve that portal handoff locally, the Pulse-ownedstart route must still return the operator to the owned billing plan surfacewith an explicit `purchase=unavailable` arrival instead of leaving the browser@@ -1059,15 +1076,19 @@ instead of wiring product-surface components such asso hosted bootstrap ownership stays at the app boundary rather than leakingroute concerns back into feature components.That same authenticated route shell also owns the canonical post-auth landing-path. `frontend-modern/src/App.tsx` must send `/` through the dashboard page-shell first, so existing operators land on the overview route and first-time-operators hit the governed dashboard empty state that forwards them into-Infrastructure Install, instead of carrying a root-only redirect to the-infrastructure route that bypasses the shared landing contract.+path. `frontend-modern/src/App.tsx` and+`frontend-modern/src/pages/RuntimeHome.tsx` must send authenticated `/`+through the runtime-home landing contract first: existing operators and+self-hosted sessions land on the governed dashboard route, while hosted+workspaces with no connected infrastructure forward into the canonical+infrastructure onboarding contract before the workspace normalizes back to the+single `/settings/infrastructure` shell. That same shared landing contract+must not regress into a root-only redirect straight to the infrastructure+workspace or a dashboard-only shortcut that strands first-time hosted tenants.That same landing contract also owns authenticated `/login`: once the browser-has a valid session, `frontend-modern/src/App.tsx` must redirect `/login` to-the governed dashboard landing route instead of leaving the authenticated app-shell on a not-found compatibility path.+has a valid session, `frontend-modern/src/App.tsx` must route `/login`+through that same runtime-home landing boundary instead of leaving the+authenticated app shell on a not-found compatibility path.The Pro license settings surface now follows the same rule as well. Changes to`frontend-modern/src/components/Settings/ProLicensePanel.tsx` must carry thiscontract and the dedicated Pro-license proof file instead of remaining andiff --git a/frontend-modern/src/App.tsx b/frontend-modern/src/App.tsxindex 79de48e716..9c6c80677f 100644--- a/frontend-modern/src/App.tsx+++ b/frontend-modern/src/App.tsx@@ -41,6 +41,7 @@ import {} from './routing/resourceLinks';import { preloadRouteModule } from '@/routing/routePreload';import { AppLayout } from '@/AppLayout';+import RuntimeHomePage from '@/pages/RuntimeHome';import { useAppRuntimeState } from '@/useAppRuntimeState';import {clearPendingAppShellRestoreTop,@@ -479,8 +480,8 @@ function App() {<Route path="/cloud/signup" component={HostedSignupPage} /><Route path="/preview/setup-complete" component={SetupCompletionPreviewPage} /><Route path={ROOT_DASHBOARD_PATH} component={DashboardPage} />- <Route path="/login" component={() => <Navigate href={ROOT_DASHBOARD_PATH} />} />- <Route path="/" component={() => <Navigate href={ROOT_DASHBOARD_PATH} />} />+ <Route path="/login" component={RuntimeHomePage} />+ <Route path="/" component={RuntimeHomePage} /><Route path={ROOT_WORKLOADS_PATH} component={WorkloadsView} /><Route path={STORAGE_PATH} component={StoragePage} /><Route path={RECOVERY_ROUTE_PATH} component={RecoveryRoute} />diff --git a/frontend-modern/src/__tests__/App.architecture.test.ts b/frontend-modern/src/__tests__/App.architecture.test.tsindex 774def0309..1e61ae024c 100644--- a/frontend-modern/src/__tests__/App.architecture.test.ts+++ b/frontend-modern/src/__tests__/App.architecture.test.ts@@ -34,8 +34,9 @@ describe('App architecture', () => {expect(appSource).toContain('const timeoutId = window.setTimeout(() => {');expect(appSource).toContain('void preloadAppShellRoutes();');expect(appSource).toContain('<Route path={ROOT_DASHBOARD_PATH} component={DashboardPage} />');- expect(appSource).toContain('<Route path="/login" component={() => <Navigate href={ROOT_DASHBOARD_PATH} />} />');- expect(appSource).toContain('<Route path="/" component={() => <Navigate href={ROOT_DASHBOARD_PATH} />} />');+ expect(appSource).toContain("import RuntimeHomePage from '@/pages/RuntimeHome';");+ expect(appSource).toContain('<Route path="/login" component={RuntimeHomePage} />');+ expect(appSource).toContain('<Route path="/" component={RuntimeHomePage} />');expect(appSource).toContain('<Route path={`${ROOT_PATROL_PATH}/*`} component={AIIntelligencePage} />');expect(appSource).toContain('<Route path="/ai/*" component={LegacyPatrolRouteRedirect} />');expect(appSource).toContain(diff --git a/frontend-modern/src/api/__tests__/hostedSignup.test.ts b/frontend-modern/src/api/__tests__/hostedSignup.test.tsindex 17191a9e86..b1b59741ef 100644--- a/frontend-modern/src/api/__tests__/hostedSignup.test.ts+++ b/frontend-modern/src/api/__tests__/hostedSignup.test.ts@@ -130,7 +130,7 @@ describe('HostedSignupAPI', () => {'Content-Type': 'application/json',Accept: 'application/json',},- body: JSON.stringify({ email: '[email protected]' }),+ body: JSON.stringify({ email: '[email protected]', target: 'portal' }),skipAuth: true,skipOrgContext: true,});diff --git a/frontend-modern/src/api/hostedSignup.ts b/frontend-modern/src/api/hostedSignup.tsindex ffd28c6407..bceb459dbe 100644--- a/frontend-modern/src/api/hostedSignup.ts+++ b/frontend-modern/src/api/hostedSignup.ts@@ -66,7 +66,7 @@ export class HostedSignupAPI {'Content-Type': 'application/json',Accept: 'application/json',},- body: JSON.stringify({ email }),+ body: JSON.stringify({ email, target: 'portal' }),skipAuth: true,skipOrgContext: true,});diff --git a/frontend-modern/src/components/Dashboard/DashboardStateCards.tsx b/frontend-modern/src/components/Dashboard/DashboardStateCards.tsxindex 3dc22ba7e7..d887d98f6e 100644--- a/frontend-modern/src/components/Dashboard/DashboardStateCards.tsx+++ b/frontend-modern/src/components/Dashboard/DashboardStateCards.tsx@@ -1,6 +1,6 @@import { Show } from 'solid-js';-import { buildInfrastructureWorkspacePath } from '@/components/Settings/infrastructureWorkspaceModel';+import { buildInfrastructureOnboardingPath } from '@/components/Settings/infrastructureWorkspaceModel';import { Card } from '@/components/shared/Card';import { EmptyState } from '@/components/shared/EmptyState';@@ -89,7 +89,7 @@ export function DashboardStateCards(props: DashboardStateCardsProps) {!props.kioskMode() ? (<buttontype="button"- onClick={() => props.navigate(buildInfrastructureWorkspacePath('install'))}+ onClick={() => props.navigate(buildInfrastructureOnboardingPath('agent'))}class="inline-flex items-center px-3 py-1.5 border border-transparent text-xs font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">{props.dashboardInfrastructureEmptyState().actionLabel}diff --git a/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx b/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsxindex aae3701da7..cb7ae81a62 100644--- a/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx+++ b/frontend-modern/src/components/Dashboard/__tests__/Dashboard.performance.contract.test.tsx@@ -979,10 +979,9 @@ describe('Dashboard performance contract', () => {expect(dashboardSource).toContain('hoveredGroupScope={state.hoveredSummaryWorkloadGroupScope()}');expect(dashboardSource).toContain('focusedGroupScope={state.focusedSummaryWorkloadGroupScope()}');expect(workloadPanelSource).not.toContain('TableHead');- expect(dashboardStateCardsSource).toContain('buildInfrastructureWorkspacePath');expect(dashboardStateCardsSource).toContain('dashboardInfrastructureEmptyState().title');expect(dashboardStateCardsSource).toContain('dashboardDisconnectedState().actionLabel');- expect(dashboardStateCardsSource).toContain("buildInfrastructureWorkspacePath('install')");+ expect(dashboardStateCardsSource).toContain("buildInfrastructureOnboardingPath('agent')");expect(dashboardStatsStripSource).toContain('totalStats().running');expect(dashboardStatsStripSource).toContain('totalStats().stopped');});diff --git a/frontend-modern/src/components/Dashboard/__tests__/DashboardStateCards.test.tsx b/frontend-modern/src/components/Dashboard/__tests__/DashboardStateCards.test.tsxindex fa764096a6..73bffe5573 100644--- a/frontend-modern/src/components/Dashboard/__tests__/DashboardStateCards.test.tsx+++ b/frontend-modern/src/components/Dashboard/__tests__/DashboardStateCards.test.tsx@@ -47,6 +47,6 @@ describe('DashboardStateCards', () => {fireEvent.click(screen.getByRole('button', { name: 'Open infrastructure setup' }));- expect(navigate).toHaveBeenCalledWith('/settings/infrastructure');+ expect(navigate).toHaveBeenCalledWith('/settings/infrastructure?add=agent');});});diff --git a/frontend-modern/src/components/Settings/InfrastructureActiveRowDetails.tsx b/frontend-modern/src/components/Settings/InfrastructureActiveRowDetails.tsxindex a039e0a720..7ff3641367 100644--- a/frontend-modern/src/components/Settings/InfrastructureActiveRowDetails.tsx+++ b/frontend-modern/src/components/Settings/InfrastructureActiveRowDetails.tsx@@ -14,7 +14,7 @@ import {} from '@/utils/unifiedAgentInventoryPresentation';import {createSurfaceScopedRow,- getPlatformConnectionsPathForCapability,+ getCapabilityManagementPath,getRowSurfaceBreakdown,hasMachineInstallActions,type UnifiedAgentRow,@@ -303,7 +303,7 @@ export const InfrastructureActiveRowDetails: Component<InfrastructureActiveRowDe}fallback={<Show- when={getPlatformConnectionsPathForCapability(surface.kind)}+ when={getCapabilityManagementPath(surface.kind)}fallback={<span class="text-[11px] text-muted">Managed by this reporting item</span>}diff --git a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsxindex cbdba36b20..7e765699e7 100644--- a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx+++ b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx@@ -20,7 +20,7 @@ import { InfrastructureIgnoredRowDetails } from './InfrastructureIgnoredRowDetaiimport { InfrastructureStopMonitoringDialog } from './InfrastructureStopMonitoringDialog';import {buildInfrastructureWorkspacePath,- deriveAddStepFromLegacyPath,+ deriveAddStepFromLocation,type InfrastructureAddStep,} from './infrastructureWorkspaceModel';import type { InfrastructurePlatformSettingsProps } from './proxmoxSettingsModel';@@ -60,18 +60,23 @@ const InfrastructureWorkspaceContent: Component<InfrastructureWorkspaceProps> =// Redirect legacy deep links and pre-select the matching type in the editor.createEffect(() => {const path = location.pathname;- if (path === '/settings/infrastructure') return;+ const step = deriveAddStepFromLocation(path, location.search ?? '');+ if (path === '/settings/infrastructure' && !step) return;- const step = deriveAddStepFromLegacyPath(path);navigate(buildInfrastructureWorkspacePath(), { replace: true });- if (!readOnly()) {+ if (!readOnly() && step) {setAddMode(true);if (step && step !== 'pick') {setInitialAddType(ADD_STEP_TO_TYPE[step]);} else {setInitialAddType(null);}+ return;}++ setAddMode(false);+ setInitialAddType(null);+ setShowAgentProfiles(false);});// Auto-open the agent installer when a setup handoff is waiting.diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsController.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsController.test.tsxindex 26092e3af2..ba1f73fa76 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsController.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsController.test.tsx@@ -803,7 +803,7 @@ describe('InfrastructureOperationsController token generation', () => {expect(downloadedBlob).toBeDefined();const content = await downloadedBlob!.text();expect(content).toContain('Canonical install workspace:');- expect(content).toContain('/settings/infrastructure/install');+ expect(content).toContain('/settings/infrastructure?add=agent');expect(content).toContain('Pulse prepares the first-host install token from setup so you can move straight to the generated Unified Agent install commands.',);@@ -1286,7 +1286,7 @@ describe('InfrastructureOperationsController managed agents table', () => {});fireEvent.click(openPlatformConnectionsButton);- expect(navigateMock).toHaveBeenCalledWith('/settings/infrastructure/platforms/truenas', {+ expect(navigateMock).toHaveBeenCalledWith('/settings/infrastructure', {scroll: false,});});diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsxindex 293cee9956..1dfa9e7489 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx@@ -3,7 +3,7 @@ import type { ConnectedInfrastructureItem } from '@/types/api';import type { UnifiedAgentRow } from '../infrastructureOperationsModel';import {INSTALL_PROFILE_OPTIONS,- getPlatformConnectionsPathForCapability,+ getCapabilityManagementPath,hasMachineInstallActions,getPowerShellInstallProfileEnvFromFlags,getStopMonitoringScopeLabel,@@ -129,9 +129,7 @@ describe('infrastructure operations model', () => {expect(row.capabilities).toEqual(['truenas']);expect(row.installFlags).toEqual([]);expect(hasMachineInstallActions(row)).toBe(false);- expect(getPlatformConnectionsPathForCapability('truenas')).toBe(- '/settings/infrastructure/platforms/truenas',- );+ expect(getCapabilityManagementPath('truenas')).toBe('/settings/infrastructure');});it('maps install-profile flags into PowerShell installer env assignments', () => {diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsxindex 2a9f65bcc1..e1c7f357fa 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx@@ -333,12 +333,35 @@ describe('InfrastructureWorkspace', () => {await waitFor(() => expect(screen.getByTestId('install-section')).toBeInTheDocument());});- it('redirects legacy truenas deep link and pre-selects the TrueNAS credential slot', async () => {+ it('opens the canonical query onboarding route and pre-selects the agent credential slot', async () => {+ mockSearch = '?add=agent';+ renderWorkspace();++ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure', { replace: true });+ await waitFor(() => expect(screen.getByTestId('install-section')).toBeInTheDocument());+ });++ it('opens the canonical query onboarding route for platform picking without pre-selecting a type', async () => {+ mockSearch = '?add=pick';+ renderWorkspace();++ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure', { replace: true });+ await waitFor(() => {+ expect(screen.getByRole('button', { name: /Probe address/i })).toBeInTheDocument();+ });+ expect(screen.queryByTestId('install-section')).toBeNull();+ });++ it('keeps legacy platform-management paths out of add mode', async () => {mockPathname = '/settings/infrastructure/platforms/truenas';renderWorkspace();expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure', { replace: true });- await waitFor(() => expect(screen.getByTestId('truenas-section')).toBeInTheDocument());+ await waitFor(() =>+ expect(screen.getByRole('heading', { name: 'Monitored systems' })).toBeInTheDocument(),+ );+ expect(screen.queryByTestId('truenas-section')).toBeNull();+ expect(screen.queryByRole('button', { name: /Probe address/i })).toBeNull();});it('hides Add infrastructure and the add drawer in read-only mode', () => {diff --git a/frontend-modern/src/components/Settings/__tests__/infrastructureWorkspaceModel.test.ts b/frontend-modern/src/components/Settings/__tests__/infrastructureWorkspaceModel.test.tsnew file mode 100644index 0000000000..3c750a6446--- /dev/null+++ b/frontend-modern/src/components/Settings/__tests__/infrastructureWorkspaceModel.test.ts@@ -0,0 +1,35 @@+import { describe, expect, it } from 'vitest';+import {+ buildInfrastructureOnboardingPath,+ buildInfrastructureWorkspacePath,+ deriveAddStepFromLocation,+ deriveAddStepFromLegacyPath,+} from '../infrastructureWorkspaceModel';++describe('infrastructureWorkspaceModel', () => {+ it('keeps the canonical infrastructure workspace path at the single workspace shell', () => {+ expect(buildInfrastructureWorkspacePath()).toBe('/settings/infrastructure');+ });++ it('builds explicit onboarding paths for first-task handoffs', () => {+ expect(buildInfrastructureOnboardingPath('agent')).toBe('/settings/infrastructure?add=agent');+ expect(buildInfrastructureOnboardingPath('pick')).toBe('/settings/infrastructure?add=pick');+ expect(buildInfrastructureOnboardingPath('truenas')).toBe(+ '/settings/infrastructure?add=truenas',+ );+ expect(buildInfrastructureOnboardingPath('vmware')).toBe(+ '/settings/infrastructure?add=vmware',+ );+ });++ it('derives add steps from onboarding deep links', () => {+ expect(deriveAddStepFromLegacyPath('/settings/infrastructure/install')).toBe('agent');+ expect(deriveAddStepFromLegacyPath('/settings/infrastructure/platforms')).toBe('pick');+ expect(deriveAddStepFromLegacyPath('/settings/infrastructure/platforms/truenas')).toBeNull();+ expect(deriveAddStepFromLocation('/settings/infrastructure', '?add=agent')).toBe('agent');+ expect(deriveAddStepFromLocation('/settings/infrastructure', '?add=pick')).toBe('pick');+ expect(deriveAddStepFromLocation('/settings/infrastructure', '?add=truenas')).toBe(+ 'truenas',+ );+ });+});diff --git a/frontend-modern/src/components/Settings/__tests__/useSettingsNavigation.test.tsx b/frontend-modern/src/components/Settings/__tests__/useSettingsNavigation.test.tsxindex d83d0f16ea..6d3e0602bf 100644--- a/frontend-modern/src/components/Settings/__tests__/useSettingsNavigation.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/useSettingsNavigation.test.tsx@@ -77,4 +77,37 @@ describe('useSettingsNavigation', () => {expect(screen.getByTestId('selected-agent')).toHaveTextContent('pve');});});++ it('translates the legacy install route into the canonical onboarding query', async () => {+ renderHarness('/settings/infrastructure/install');++ await waitFor(() => {+ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure?add=agent', {+ replace: true,+ scroll: false,+ });+ });+ });++ it('translates the legacy platform chooser route into the canonical onboarding query', async () => {+ renderHarness('/settings/infrastructure/platforms');++ await waitFor(() => {+ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure?add=pick', {+ replace: true,+ scroll: false,+ });+ });+ });++ it('keeps legacy platform-management paths out of onboarding mode', async () => {+ renderHarness('/settings/infrastructure/platforms/truenas');++ await waitFor(() => {+ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure', {+ replace: true,+ scroll: false,+ });+ });+ });});diff --git a/frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx b/frontend-modern/src/components/Settings/infrastructureOperationsModel.tsxindex 7dbad2abe7..f8a271c3b8 100644--- a/frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx+++ b/frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx@@ -8,9 +8,9 @@ import {type AgentCapability,} from '@/utils/agentCapabilityPresentation';import {- buildPlatformConnectionsPath,type PlatformConnectionsView,} from './platformConnectionsModel';+import { buildInfrastructureWorkspacePath } from './infrastructureWorkspaceModel';export const TOKEN_PLACEHOLDER = '<api-token>';export const UNIFIED_AGENT_TELEMETRY_SURFACE = 'settings_unified_agents';@@ -214,10 +214,8 @@ export const getPlatformConnectionsViewForCapability = (}};-export const getPlatformConnectionsPathForCapability = (capability: AgentCapability) => {- const view = getPlatformConnectionsViewForCapability(capability);- return view ? buildPlatformConnectionsPath(view) : null;-};+export const getCapabilityManagementPath = (capability: AgentCapability) =>+ isPlatformConnectionsCapability(capability) ? buildInfrastructureWorkspacePath() : null;export const hasMachineInstallActions = (row: UnifiedAgentRow) =>Boolean(row.agentActionId?.trim() || row.agentId?.trim());diff --git a/frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts b/frontend-modern/src/components/Settings/infrastructureWorkspaceModel.tsindex 389ef6cbba..d79b9f1f01 100644--- a/frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts+++ b/frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts@@ -2,23 +2,68 @@ export type InfrastructureAddStep = 'agent' | 'pve' | 'pbs' | 'pmg' | 'truenas'export type InfrastructurePanelStep = 'pick' | InfrastructureAddStep;const INFRASTRUCTURE_BASE_PATH = '/settings/infrastructure';+const INFRASTRUCTURE_ADD_QUERY_PARAM = 'add';+const LEGACY_INSTALL_PATH = `${INFRASTRUCTURE_BASE_PATH}/install`;+const LEGACY_PLATFORMS_PATH = `${INFRASTRUCTURE_BASE_PATH}/platforms`;-export function buildInfrastructureWorkspacePath(_view?: string): string {+function matchesExactPath(pathname: string, expected: string): boolean {+ return pathname === expected || pathname === `${expected}/`;+}++function matchesPathPrefix(pathname: string, expected: string): boolean {+ return pathname === expected || pathname.startsWith(`${expected}/`);+}++function normalizeInfrastructurePanelStep(+ value: string | null | undefined,+): InfrastructurePanelStep | null {+ switch ((value || '').trim()) {+ case 'pick':+ case 'agent':+ case 'pve':+ case 'pbs':+ case 'pmg':+ case 'truenas':+ case 'vmware':+ return value!.trim() as InfrastructurePanelStep;+ default:+ return null;+ }+}++export function buildInfrastructureWorkspacePath(): string {return INFRASTRUCTURE_BASE_PATH;}+export function buildInfrastructureOnboardingPath(+ step: InfrastructurePanelStep = 'agent',+): string {+ const params = new URLSearchParams();+ params.set(INFRASTRUCTURE_ADD_QUERY_PARAM, step);+ return `${INFRASTRUCTURE_BASE_PATH}?${params.toString()}`;+}+export function deriveAddStepFromLegacyPath(pathname: string,): InfrastructurePanelStep | null {- if (pathname.startsWith('/settings/infrastructure/install')) return 'agent';- if (pathname.startsWith('/settings/infrastructure/platforms/proxmox/pbs')) return 'pbs';- if (pathname.startsWith('/settings/infrastructure/platforms/proxmox/pmg')) return 'pmg';- if (pathname.startsWith('/settings/infrastructure/platforms/proxmox')) return 'pve';- if (pathname.startsWith('/settings/infrastructure/platforms/truenas')) return 'truenas';- if (pathname.startsWith('/settings/infrastructure/platforms/vmware')) return 'vmware';- if (pathname.startsWith('/settings/infrastructure/platforms')) return 'pick';- if (pathname.startsWith('/settings/infrastructure/proxmox')) return 'pve';- if (pathname.startsWith('/settings/infrastructure/truenas')) return 'truenas';- if (pathname.startsWith('/settings/infrastructure/vmware')) return 'vmware';+ if (matchesPathPrefix(pathname, LEGACY_INSTALL_PATH)) return 'agent';+ if (matchesExactPath(pathname, LEGACY_PLATFORMS_PATH)) return 'pick';return null;}++export function deriveAddStepFromLocation(+ pathname: string,+ search: string,+): InfrastructurePanelStep | null {+ if (pathname === INFRASTRUCTURE_BASE_PATH || pathname.startsWith(`${INFRASTRUCTURE_BASE_PATH}/`)) {+ const params = new URLSearchParams(search);+ const stepFromQuery = normalizeInfrastructurePanelStep(+ params.get(INFRASTRUCTURE_ADD_QUERY_PARAM),+ );+ if (stepFromQuery) {+ return stepFromQuery;+ }+ }++ return deriveAddStepFromLegacyPath(pathname);+}diff --git a/frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx b/frontend-modern/src/components/Settings/useInfrastructureInstallState.tsxindex 571d690bdb..6559a21598 100644--- a/frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx+++ b/frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx@@ -16,7 +16,10 @@ import { copyToClipboard } from '@/utils/clipboard';import { getPulseBaseUrl } from '@/utils/url';import { logger } from '@/utils/logger';import { STORAGE_KEYS } from '@/utils/localStorage';-import { buildInfrastructureWorkspacePath } from './infrastructureWorkspaceModel';+import {+ buildInfrastructureOnboardingPath,+ buildInfrastructureWorkspacePath,+} from './infrastructureWorkspaceModel';import {buildUnixAgentInstallCommand,buildWindowsAgentInstallCommand,@@ -193,7 +196,7 @@ ${handoff.apiToken}Canonical install workspace:-----------------------------${baseUrl.replace(/\/$/, '')}/settings/infrastructure/install+${baseUrl.replace(/\/$/, '')}${buildInfrastructureOnboardingPath('agent')}Pulse prepares the first-host install token from setup so you can move straight to the generated Unified Agent install commands.`;diff --git a/frontend-modern/src/components/Settings/useSettingsNavigation.ts b/frontend-modern/src/components/Settings/useSettingsNavigation.tsindex b1833a788c..73f42bf928 100644--- a/frontend-modern/src/components/Settings/useSettingsNavigation.ts+++ b/frontend-modern/src/components/Settings/useSettingsNavigation.ts@@ -1,7 +1,11 @@import { createEffect, createSignal, on } from 'solid-js';import { presentationPolicyIsReadOnly } from '@/stores/sessionPresentationPolicy';import { resolveCanonicalSelfHostedBillingHref } from '@/utils/pricingHandoff';-import { buildInfrastructureWorkspacePath } from './infrastructureWorkspaceModel';+import {+ buildInfrastructureOnboardingPath,+ buildInfrastructureWorkspacePath,+ deriveAddStepFromLegacyPath,+} from './infrastructureWorkspaceModel';import {DEFAULT_SETTINGS_TAB,deriveAgentFromPath,@@ -108,6 +112,15 @@ export function useSettingsNavigation({ navigate, location }: UseSettingsNavigat}}+ const infrastructureOnboardingStep = deriveAddStepFromLegacyPath(path);+ if (infrastructureOnboardingStep) {+ navigate(buildInfrastructureOnboardingPath(infrastructureOnboardingStep), {+ replace: true,+ scroll: false,+ });+ return;+ }+const canonicalPath = resolveCanonicalSettingsPath(path);if (canonicalPath && canonicalPath !== path) {navigate(canonicalPath, {diff --git a/frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx b/frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsxindex 471619a6b1..684ec52182 100644--- a/frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx+++ b/frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx@@ -13,6 +13,7 @@ import { apiFetchJSON } from '@/utils/apiClient';import { getPulseBaseUrl } from '@/utils/url';import type { State } from '@/types/api';import type { Resource } from '@/types/resource';+import { buildInfrastructureOnboardingPath } from '@/components/Settings/infrastructureWorkspaceModel';import { trackAgentFirstConnected } from '@/utils/upgradeMetrics';import type { WizardState } from '../SetupWizard';import {@@ -54,7 +55,8 @@ const UNIFIED_RESOURCE_GUIDANCE = {],} as const;-const INFRASTRUCTURE_PATH = '/settings/infrastructure';+const INFRASTRUCTURE_INSTALL_PATH = buildInfrastructureOnboardingPath('agent');+const PLATFORM_CONNECTIONS_PATH = buildInfrastructureOnboardingPath('pick');const SETUP_WIZARD_TELEMETRY_SURFACE = 'setup_wizard_complete';export const SetupCompletionPanel: Component<CompleteStepProps> = (props) => {@@ -140,7 +142,7 @@ export const SetupCompletionPanel: Component<CompleteStepProps> = (props) => {const downloadCredentials = () => {const baseUrl = getPulseBaseUrl();- const infrastructureUrl = `${baseUrl.replace(/\/$/, '')}${INFRASTRUCTURE_PATH}`;+ const infrastructureUrl = `${baseUrl.replace(/\/$/, '')}${INFRASTRUCTURE_INSTALL_PATH}`;const content = `Pulse Credentials==================Generated: ${new Date().toISOString()}@@ -177,11 +179,11 @@ Keep these credentials secure!};const handleOpenInstallWorkspace = () => {- props.onComplete(INFRASTRUCTURE_PATH);+ props.onComplete(INFRASTRUCTURE_INSTALL_PATH);};const handleOpenPlatformConnections = () => {- props.onComplete(INFRASTRUCTURE_PATH);+ props.onComplete(PLATFORM_CONNECTIONS_PATH);};const handleGoToDashboard = () => {@@ -404,7 +406,7 @@ Keep these credentials secure!Infrastructure</div><code class="text-base-content font-mono text-xs break-all">- {INFRASTRUCTURE_PATH}+ {INFRASTRUCTURE_INSTALL_PATH}</code></div>diff --git a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.tsindex 82900c97df..5374a4c909 100644--- a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts+++ b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts@@ -4,14 +4,19 @@ import setupCompletionModelSource from '../setupCompletionModel.ts?raw';describe('SetupCompletionPanel guardrails', () => {it('keeps setup completion aligned with the canonical infrastructure install workspace', () => {+ expect(setupCompletionPanelSource).toContain('buildInfrastructureOnboardingPath');expect(setupCompletionPanelSource).toContain(- "const INFRASTRUCTURE_PATH = '/settings/infrastructure';",+ "const INFRASTRUCTURE_INSTALL_PATH = buildInfrastructureOnboardingPath('agent');",+ );+ expect(setupCompletionPanelSource).toContain(+ "const PLATFORM_CONNECTIONS_PATH = buildInfrastructureOnboardingPath('pick');",);expect(setupCompletionPanelSource).toContain('Open Infrastructure Install');expect(setupCompletionPanelSource).toContain('Open Platform connections');expect(setupCompletionPanelSource).toContain('Credentials you must save now');expect(setupCompletionPanelSource).toContain('Shown during setup');- expect(setupCompletionPanelSource).toContain('props.onComplete(INFRASTRUCTURE_PATH);');+ expect(setupCompletionPanelSource).toContain('props.onComplete(INFRASTRUCTURE_INSTALL_PATH);');+ expect(setupCompletionPanelSource).toContain('props.onComplete(PLATFORM_CONNECTIONS_PATH);');expect(setupCompletionPanelSource).toContain('continue with the first-host install token Pulse prepares from setup',);diff --git a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.test.tsx b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.test.tsxindex 9c897211a9..538b6ecb4c 100644--- a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.test.tsx+++ b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.test.tsx@@ -118,7 +118,7 @@ describe('SetupCompletionPanel', () => {fireEvent.click(screen.getAllByRole('button', { name: 'Open Infrastructure Install' })[0]);- expect(onComplete).toHaveBeenCalledWith('/settings/infrastructure');+ expect(onComplete).toHaveBeenCalledWith('/settings/infrastructure?add=agent');});it('hands API-backed starts into the canonical platform connections workspace', async () => {@@ -128,7 +128,7 @@ describe('SetupCompletionPanel', () => {fireEvent.click(screen.getByRole('button', { name: 'Open Platform connections' }));- expect(onComplete).toHaveBeenCalledWith('/settings/infrastructure');+ expect(onComplete).toHaveBeenCalledWith('/settings/infrastructure?add=pick');});it('downloads credentials that point operators to the install workspace instead of inline commands', async () => {@@ -156,7 +156,7 @@ describe('SetupCompletionPanel', () => {expect(content).toContain('Web Login:');expect(content).toContain('Admin API Token:');expect(content).toContain('Infrastructure:');- expect(content).toContain('https://pulse.example.com/settings/infrastructure');+ expect(content).toContain('https://pulse.example.com/settings/infrastructure?add=agent');expect(content).toContain('Use Add infrastructure to connect');expect(content).not.toContain('Example Install Command');expect(content).not.toContain('Example Windows Install Command');@@ -284,7 +284,7 @@ describe('SetupCompletionPanel', () => {name: 'Open Platform connections',}),);- expect(onComplete).toHaveBeenCalledWith('/settings/infrastructure');+ expect(onComplete).toHaveBeenCalledWith('/settings/infrastructure?add=pick');});it('derives admitted VMware onboarding from the governed platform manifest', async () => {@@ -324,7 +324,7 @@ describe('SetupCompletionPanel', () => {expect(screen.getByRole('button', { name: 'Open Platform connections' })).toBeInTheDocument();fireEvent.click(screen.getByRole('button', { name: 'Open Platform connections' }));- expect(onComplete).toHaveBeenCalledWith('/settings/infrastructure');+ expect(onComplete).toHaveBeenCalledWith('/settings/infrastructure?add=pick');});it('keeps both continuation paths visible when install-managed and API-backed systems are already present', async () => {diff --git a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPreview.test.tsx b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPreview.test.tsxindex 8182e902f9..26773bf109 100644--- a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPreview.test.tsx+++ b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPreview.test.tsx@@ -58,7 +58,7 @@ describe('SetupCompletionPreview', () => {fireEvent.click(screen.getAllByRole('button', { name: 'Open Infrastructure Install' })[0]);- expect(navigateMock).toHaveBeenCalledWith('/settings/infrastructure');+ expect(navigateMock).toHaveBeenCalledWith('/settings/infrastructure?add=agent');});it('renders the VMware-connected preview scenario without polling runtime state', () => {diff --git a/frontend-modern/src/components/SetupWizard/__tests__/SetupWizard.test.tsx b/frontend-modern/src/components/SetupWizard/__tests__/SetupWizard.test.tsxindex 2529562cd8..3674f22344 100644--- a/frontend-modern/src/components/SetupWizard/__tests__/SetupWizard.test.tsx+++ b/frontend-modern/src/components/SetupWizard/__tests__/SetupWizard.test.tsx@@ -19,7 +19,7 @@ vi.mock('../steps/SecurityStep', () => ({vi.mock('../SetupCompletionPanel', () => ({SetupCompletionPanel: (props: { onComplete: (nextPath?: string) => void }) => (- <button onClick={() => props.onComplete('/settings/infrastructure/install')}>+ <button onClick={() => props.onComplete('/settings/infrastructure?add=agent')}>Completion finish</button>),@@ -63,6 +63,6 @@ describe('SetupWizard', () => {fireEvent.click(screen.getByRole('button', { name: 'Completion finish' }));- expect(onComplete).toHaveBeenCalledWith('/settings/infrastructure/install');+ expect(onComplete).toHaveBeenCalledWith('/settings/infrastructure?add=agent');});});diff --git a/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx b/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsxindex c2d4dc9a85..041566470f 100644--- a/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx+++ b/frontend-modern/src/features/infrastructure/InfrastructurePageSurface.tsx@@ -1,6 +1,6 @@import { For, Show } from 'solid-js';import { useNavigate } from '@solidjs/router';-import { buildInfrastructureWorkspacePath } from '@/components/Settings/infrastructureWorkspaceModel';+import { buildInfrastructureOnboardingPath } from '@/components/Settings/infrastructureWorkspaceModel';import { EmptyState } from '@/components/shared/EmptyState';import { Card } from '@/components/shared/Card';import { FilterSegmentedControl, LabeledFilterSelect } from '@/components/shared/FilterToolbar';@@ -139,7 +139,7 @@ export function InfrastructurePageSurface() {actions={<buttontype="button"- onClick={() => navigate(buildInfrastructureWorkspacePath('install'))}+ onClick={() => navigate(buildInfrastructureOnboardingPath('agent'))}class="inline-flex items-center gap-2 rounded-md border border-border bg-surface px-3 py-1.5 text-xs font-medium text-base-content shadow-sm hover:bg-slate-50"><SettingsIcon class="h-3.5 w-3.5" />diff --git a/frontend-modern/src/pages/CloudPricing.tsx b/frontend-modern/src/pages/CloudPricing.tsxindex babbec3af0..af8327c14e 100644--- a/frontend-modern/src/pages/CloudPricing.tsx+++ b/frontend-modern/src/pages/CloudPricing.tsx@@ -128,8 +128,8 @@ export default function CloudPricing() {<div class="flex flex-wrap items-center justify-center gap-x-6 gap-y-2 text-sm text-muted"><span>Already have a Cloud account?{' '}- <A href="/cloud/signup" class="text-blue-600 hover:underline dark:text-blue-400">- Sign in+ <A href="/portal" class="text-blue-600 hover:underline dark:text-blue-400">+ Open Pulse Account</A></span><span>diff --git a/frontend-modern/src/pages/Dashboard.tsx b/frontend-modern/src/pages/Dashboard.tsxindex a38ce10482..c7f756ac1a 100644--- a/frontend-modern/src/pages/Dashboard.tsx+++ b/frontend-modern/src/pages/Dashboard.tsx@@ -10,7 +10,7 @@ import {} from 'solid-js';import { useNavigate } from '@solidjs/router';import { useWebSocket } from '@/contexts/appRuntime';-import { buildInfrastructureWorkspacePath } from '@/components/Settings/infrastructureWorkspaceModel';+import { buildInfrastructureOnboardingPath } from '@/components/Settings/infrastructureWorkspaceModel';import { useDashboardOverview } from '@/hooks/useDashboardOverview';import { useDashboardTrends } from '@/hooks/useDashboardTrends';import { useDashboardLayout } from '@/hooks/useDashboardLayout';@@ -261,7 +261,7 @@ export default function Dashboard() {<p class="mt-2 text-sm text-muted">{dashboardNoResourcesState().description}</p><buttontype="button"- onClick={() => navigate(buildInfrastructureWorkspacePath('install'))}+ onClick={() => navigate(buildInfrastructureOnboardingPath('agent'))}class="mt-4 inline-flex items-center rounded-md border border-transparent bg-blue-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-blue-700">{dashboardNoResourcesState().actionLabel}diff --git a/frontend-modern/src/pages/HostedSignup.tsx b/frontend-modern/src/pages/HostedSignup.tsxindex 156879a4f8..396f19eb6b 100644--- a/frontend-modern/src/pages/HostedSignup.tsx+++ b/frontend-modern/src/pages/HostedSignup.tsx@@ -93,7 +93,7 @@ export default function HostedSignup() {return;}setStatus('success');- setMessage(result.data.message || 'Check your email for a sign-in link.');+ setMessage(result.data.message || 'Check your email for a Pulse Account sign-in link.');return;}@@ -123,7 +123,7 @@ export default function HostedSignup() {if (result.ok) {setMagicLinkMessage(result.data.message ||- "If that email is registered, you'll receive a sign-in link shortly.",+ "If that email is registered, you'll receive a Pulse Account sign-in link shortly.",);} else {setMagicLinkMessage(result.error.message || 'Failed to request sign-in link.');diff --git a/frontend-modern/src/pages/RuntimeHome.tsx b/frontend-modern/src/pages/RuntimeHome.tsxnew file mode 100644index 0000000000..90c0967a05--- /dev/null+++ b/frontend-modern/src/pages/RuntimeHome.tsx@@ -0,0 +1,82 @@+import { useNavigate } from '@solidjs/router';+import { createEffect, createMemo, createSignal, onCleanup, onMount } from 'solid-js';+import { ResourceAPI } from '@/api/resources';+import { buildInfrastructureOnboardingPath } from '@/components/Settings/infrastructureWorkspaceModel';+import { useWebSocket } from '@/contexts/appRuntime';+import { DASHBOARD_PATH } from '@/routing/resourceLinks';+import { isHostedModeEnabled } from '@/stores/license';++function dashboardSummaryHasResources(totalResources: number | undefined): boolean {+ return Number(totalResources || 0) > 0;+}++export default function RuntimeHome() {+ const navigate = useNavigate();+ const ws = useWebSocket();+ const [summaryResolved, setSummaryResolved] = createSignal(!isHostedModeEnabled());+ const [summaryHasResources, setSummaryHasResources] = createSignal(false);+ const [summaryFailed, setSummaryFailed] = createSignal(false);++ const hasConnectedInfrastructure = createMemo(() => {+ const items = ws.state?.connectedInfrastructure;+ return Array.isArray(items) && items.length > 0;+ });++ const destination = createMemo<string | null>(() => {+ if (!isHostedModeEnabled()) {+ return DASHBOARD_PATH;+ }+ if (hasConnectedInfrastructure()) {+ return DASHBOARD_PATH;+ }+ if (!summaryResolved()) {+ return null;+ }+ if (summaryFailed()) {+ return DASHBOARD_PATH;+ }+ return summaryHasResources() ? DASHBOARD_PATH : buildInfrastructureOnboardingPath('agent');+ });++ onMount(() => {+ if (!isHostedModeEnabled() || hasConnectedInfrastructure()) {+ setSummaryResolved(true);+ return;+ }++ let cancelled = false;+ void ResourceAPI.getDashboardSummary()+ .then((summary) => {+ if (cancelled) {+ return;+ }+ setSummaryHasResources(dashboardSummaryHasResources(summary?.health?.totalResources));+ })+ .catch(() => {+ if (cancelled) {+ return;+ }+ setSummaryFailed(true);+ })+ .finally(() => {+ if (cancelled) {+ return;+ }+ setSummaryResolved(true);+ });++ onCleanup(() => {+ cancelled = true;+ });+ });++ createEffect(() => {+ const nextPath = destination();+ if (!nextPath) {+ return;+ }+ navigate(nextPath, { replace: true });+ });++ return <div class="px-4 py-6 text-sm text-muted">Opening workspace...</div>;+}diff --git a/frontend-modern/src/pages/__tests__/CloudPricing.test.tsx b/frontend-modern/src/pages/__tests__/CloudPricing.test.tsxindex 2fd217686d..a8129bd2af 100644--- a/frontend-modern/src/pages/__tests__/CloudPricing.test.tsx+++ b/frontend-modern/src/pages/__tests__/CloudPricing.test.tsx@@ -38,10 +38,12 @@ describe('CloudPricing', () => {expect(screen.queryByText('Starter founding rate')).not.toBeInTheDocument();expect(screen.getAllByText('All Pro features')).toHaveLength(1);expect(screen.getByText('Managed hosting')).toBeInTheDocument();- expect(- screen.getByText('Create your workspace. No credit card is required for the trial.'),- ).toBeInTheDocument();- expect(screen.getByText('Setup')).toBeInTheDocument();+ expect(screen.getByText('Choose a Cloud plan and complete secure checkout.')).toBeInTheDocument();+ expect(screen.getByText('How it works')).toBeInTheDocument();+ expect(screen.getByRole('link', { name: 'Open Pulse Account' })).toHaveAttribute(+ 'href',+ '/portal',+ );expect(screen.getByRole('link', { name: 'See self-hosted plans' })).toHaveAttribute('href','https://pulserelay.pro/pricing?utm_source=pulse&utm_medium=app&utm_campaign=upgrade',diff --git a/frontend-modern/src/pages/__tests__/DashboardPage.test.tsx b/frontend-modern/src/pages/__tests__/DashboardPage.test.tsxindex 0ca91c3daf..243696ffa7 100644--- a/frontend-modern/src/pages/__tests__/DashboardPage.test.tsx+++ b/frontend-modern/src/pages/__tests__/DashboardPage.test.tsx@@ -140,9 +140,6 @@ describe('Dashboard page module contract', () => {it('routes dashboard overview panels through the dashboard overview feature owner', () => {expect(dashboardPageSource).toContain("from '@/features/dashboardOverview'");expect(dashboardPageSource).not.toContain("from '@/components/Dashboard/RelayOnboardingCard'");- expect(dashboardPageSource).toContain("from '@/components/shared/PageHeader'");- expect(dashboardPageSource).toContain('<PageHeader');- expect(dashboardPageSource).toContain('title="Dashboard"');expect(dashboardPageSource).not.toContain('<RelayOnboardingCard />');expect(dashboardPageSource).toContain('ActionRequiredPanel,\n DashboardCustomizer,\n KPIStrip,\n ProblemResourcesTable,\n TrendCharts,',@@ -175,7 +172,6 @@ describe('Dashboard page module contract', () => {it('routes the empty dashboard state to infrastructure install', () => {render(() => <DashboardPage />);- expect(screen.getByRole('heading', { name: 'Dashboard' })).toBeInTheDocument();expect(screen.getByRole('heading', { name: 'No resources yet' })).toBeInTheDocument();expect(screen.getByText(@@ -185,7 +181,7 @@ describe('Dashboard page module contract', () => {fireEvent.click(screen.getByRole('button', { name: 'Open infrastructure install' }));- expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure');+ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure?add=agent');});it('renders the governed storage and recovery dashboard panels', () => {diff --git a/frontend-modern/src/pages/__tests__/HostedSignup.test.tsx b/frontend-modern/src/pages/__tests__/HostedSignup.test.tsxindex 3765a0aff6..7e393a91f8 100644--- a/frontend-modern/src/pages/__tests__/HostedSignup.test.tsx+++ b/frontend-modern/src/pages/__tests__/HostedSignup.test.tsx@@ -33,7 +33,7 @@ describe('HostedSignup', () => {ok: true,status: 201,data: {- message: 'Check your email for a sign-in link.',+ message: 'Check your email for a Pulse Account sign-in link.',},});requestMagicLinkMock.mockResolvedValue({@@ -41,7 +41,7 @@ describe('HostedSignup', () => {status: 200,data: {success: true,- message: "If that email is registered, you'll receive a sign-in link shortly.",+ message: "If that email is registered, you'll receive a Pulse Account sign-in link shortly.",},});window.history.replaceState({}, '', '/cloud/signup?tier=power');@@ -60,13 +60,13 @@ describe('HostedSignup', () => {));expect(await screen.findByText('Workspace')).toBeInTheDocument();- expect(screen.getByText('Create your managed Pulse Cloud workspace.')).toBeInTheDocument();+ expect(screen.getByText('Create your Pulse Cloud account and hosted workspace.')).toBeInTheDocument();expect(screen.getByText('Plan')).toBeInTheDocument();- expect(screen.getByText('Next')).toBeInTheDocument();- expect(screen.getByText('Continue through checkout if prompted.')).toBeInTheDocument();+ expect(screen.getByText('How it works')).toBeInTheDocument();+ expect(screen.getByText('Choose a Cloud plan and complete secure checkout.')).toBeInTheDocument();expect(screen.getByText('Already signed up?')).toBeInTheDocument();- expect(screen.getByText('Request a fresh sign-in link.')).toBeInTheDocument();- expect(screen.getByRole('button', { name: 'Email Sign-In Link' })).toBeInTheDocument();+ expect(screen.getByText('Request a fresh Pulse Account sign-in link.')).toBeInTheDocument();+ expect(screen.getByRole('button', { name: 'Email Pulse Account Link' })).toBeInTheDocument();fireEvent.input(screen.getByLabelText('Work Email'), {target: { value: '[email protected]' },@@ -74,7 +74,7 @@ describe('HostedSignup', () => {fireEvent.input(screen.getByLabelText('Organization Name'), {target: { value: 'Pulse Labs' },});- fireEvent.submit(screen.getByRole('button', { name: 'Create Workspace' }).closest('form')!);+ fireEvent.submit(screen.getByRole('button', { name: 'Continue to Checkout' }).closest('form')!);await waitFor(() => {expect(signupMock).toHaveBeenCalledWith({diff --git a/frontend-modern/src/pages/__tests__/Infrastructure.empty-state.test.tsx b/frontend-modern/src/pages/__tests__/Infrastructure.empty-state.test.tsxindex e722b280e7..3a85e2b35a 100644--- a/frontend-modern/src/pages/__tests__/Infrastructure.empty-state.test.tsx+++ b/frontend-modern/src/pages/__tests__/Infrastructure.empty-state.test.tsx@@ -61,6 +61,6 @@ describe('Infrastructure empty state', () => {fireEvent.click(getByText('Open Infrastructure Install'));- expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure');+ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure?add=agent');});});diff --git a/frontend-modern/src/pages/__tests__/RuntimeHome.test.tsx b/frontend-modern/src/pages/__tests__/RuntimeHome.test.tsxnew file mode 100644index 0000000000..b12b068e37--- /dev/null+++ b/frontend-modern/src/pages/__tests__/RuntimeHome.test.tsx@@ -0,0 +1,82 @@+import { render, waitFor } from '@solidjs/testing-library';+import { beforeEach, describe, expect, it, vi } from 'vitest';+import RuntimeHome from '@/pages/RuntimeHome';++const navigateSpy = vi.hoisted(() => vi.fn());+const getDashboardSummaryMock = vi.hoisted(() => vi.fn());+const isHostedModeEnabledMock = vi.hoisted(() => vi.fn());+const connectedInfrastructureItems = vi.hoisted(() => [] as Array<Record<string, unknown>>);++vi.mock('@solidjs/router', async () => {+ const actual = await vi.importActual<typeof import('@solidjs/router')>('@solidjs/router');+ return {+ ...actual,+ useNavigate: () => navigateSpy,+ };+});++vi.mock('@/contexts/appRuntime', () => ({+ useWebSocket: () => ({+ state: {+ get connectedInfrastructure() {+ return connectedInfrastructureItems;+ },+ },+ }),+}));++vi.mock('@/api/resources', () => ({+ ResourceAPI: {+ getDashboardSummary: getDashboardSummaryMock,+ },+}));++vi.mock('@/stores/license', () => ({+ isHostedModeEnabled: () => isHostedModeEnabledMock(),+}));++describe('RuntimeHome', () => {+ beforeEach(() => {+ navigateSpy.mockReset();+ getDashboardSummaryMock.mockReset();+ connectedInfrastructureItems.length = 0;+ isHostedModeEnabledMock.mockReturnValue(true);+ });++ it('routes self-hosted runtimes straight to the dashboard', async () => {+ isHostedModeEnabledMock.mockReturnValue(false);++ render(() => <RuntimeHome />);++ await waitFor(() => {+ expect(navigateSpy).toHaveBeenCalledWith('/dashboard', { replace: true });+ });+ expect(getDashboardSummaryMock).not.toHaveBeenCalled();+ });++ it('routes hosted empty workspaces into infrastructure install', async () => {+ getDashboardSummaryMock.mockResolvedValue({+ health: { totalResources: 0 },+ });++ render(() => <RuntimeHome />);++ await waitFor(() => {+ expect(getDashboardSummaryMock).toHaveBeenCalledTimes(1);+ expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure?add=agent', {+ replace: true,+ });+ });+ });++ it('keeps hosted workspaces with connected infrastructure on the dashboard', async () => {+ connectedInfrastructureItems.push({ id: 'agent-1' });++ render(() => <RuntimeHome />);++ await waitFor(() => {+ expect(navigateSpy).toHaveBeenCalledWith('/dashboard', { replace: true });+ });+ expect(getDashboardSummaryMock).not.toHaveBeenCalled();+ });+});diff --git a/frontend-modern/src/utils/__tests__/cloudPlans.test.ts b/frontend-modern/src/utils/__tests__/cloudPlans.test.tsindex 4c93a211ab..71796572cd 100644--- a/frontend-modern/src/utils/__tests__/cloudPlans.test.ts+++ b/frontend-modern/src/utils/__tests__/cloudPlans.test.ts@@ -1,6 +1,7 @@import { describe, expect, it } from 'vitest';import {+ CLOUD_ACCOUNT_FLOW_STEPS,CLOUD_COMMERCIAL_PRESENTATION,CLOUD_PLAN_BY_TIER,HOSTED_SIGNUP_PRESENTATION,@@ -41,32 +42,24 @@ describe('cloudPlans', () => {'Mobile app access and push notifications','Dedicated workspace URL',],- setupHeading: 'Setup',- setupSteps: [- 'Create your workspace. No credit card is required for the trial.',- 'Install the Pulse agent on any Linux machine.',- 'Connect systems, review findings, and configure alerts.',- ],+ setupHeading: 'How it works',+ setupSteps: CLOUD_ACCOUNT_FLOW_STEPS,});});it('keeps hosted signup commercial copy in the common contract', () => {expect(HOSTED_SIGNUP_PRESENTATION).toEqual({pageTitlePrefix: 'Pulse Cloud',- pageDescription: 'Create your managed Pulse Cloud workspace.',+ pageDescription: 'Create your Pulse Cloud account and hosted workspace.',workspaceHeading: 'Workspace',planHeading: 'Plan',- nextHeading: 'Next',- nextSteps: [- 'Continue through checkout if prompted.',- 'Finish sign-in from the email link.',- 'Open your workspace and start connecting systems.',- ],+ nextHeading: 'How it works',+ nextSteps: CLOUD_ACCOUNT_FLOW_STEPS,existingAccountHeading: 'Already signed up?',- existingAccountDescription: 'Request a fresh sign-in link.',- createWorkspaceLabel: 'Create Workspace',- creatingWorkspaceLabel: 'Creating...',- emailSignInLinkLabel: 'Email Sign-In Link',+ existingAccountDescription: 'Request a fresh Pulse Account sign-in link.',+ createWorkspaceLabel: 'Continue to Checkout',+ creatingWorkspaceLabel: 'Preparing Checkout...',+ emailSignInLinkLabel: 'Email Pulse Account Link',sendingSignInLinkLabel: 'Sending...',});});diff --git a/frontend-modern/src/utils/cloudPlans.ts b/frontend-modern/src/utils/cloudPlans.tsindex 1853466fb1..8c6073f092 100644--- a/frontend-modern/src/utils/cloudPlans.ts+++ b/frontend-modern/src/utils/cloudPlans.ts@@ -45,6 +45,12 @@ export interface HostedSignupPresentation {sendingSignInLinkLabel: string;}+export const CLOUD_ACCOUNT_FLOW_STEPS = [+ 'Choose a Cloud plan and complete secure checkout.',+ 'Use the email link to open Pulse Account.',+ 'Open your workspace and connect systems.',+] as const;+export const DEFAULT_CLOUD_TIER: CloudTierKey = 'starter';export const CLOUD_PLAN_DEFINITIONS: readonly CloudPlanDefinition[] = [@@ -108,30 +114,22 @@ export const CLOUD_COMMERCIAL_PRESENTATION: CloudCommercialPresentation = {'Mobile app access and push notifications','Dedicated workspace URL',],- setupHeading: 'Setup',- setupSteps: [- 'Create your workspace. No credit card is required for the trial.',- 'Install the Pulse agent on any Linux machine.',- 'Connect systems, review findings, and configure alerts.',- ],+ setupHeading: 'How it works',+ setupSteps: CLOUD_ACCOUNT_FLOW_STEPS,} as const;export const HOSTED_SIGNUP_PRESENTATION: HostedSignupPresentation = {pageTitlePrefix: 'Pulse Cloud',- pageDescription: 'Create your managed Pulse Cloud workspace.',+ pageDescription: 'Create your Pulse Cloud account and hosted workspace.',workspaceHeading: 'Workspace',planHeading: 'Plan',- nextHeading: 'Next',- nextSteps: [- 'Continue through checkout if prompted.',- 'Finish sign-in from the email link.',- 'Open your workspace and start connecting systems.',- ],+ nextHeading: 'How it works',+ nextSteps: CLOUD_ACCOUNT_FLOW_STEPS,existingAccountHeading: 'Already signed up?',- existingAccountDescription: 'Request a fresh sign-in link.',- createWorkspaceLabel: 'Create Workspace',- creatingWorkspaceLabel: 'Creating...',- emailSignInLinkLabel: 'Email Sign-In Link',+ existingAccountDescription: 'Request a fresh Pulse Account sign-in link.',+ createWorkspaceLabel: 'Continue to Checkout',+ creatingWorkspaceLabel: 'Preparing Checkout...',+ emailSignInLinkLabel: 'Email Pulse Account Link',sendingSignInLinkLabel: 'Sending...',} as const;diff --git a/internal/cloudcp/public_cloud_signup_handlers.go b/internal/cloudcp/public_cloud_signup_handlers.goindex a1a6d43bad..4eb79b03e1 100644--- a/internal/cloudcp/public_cloud_signup_handlers.go+++ b/internal/cloudcp/public_cloud_signup_handlers.go@@ -88,7 +88,7 @@ var publicCloudSignupPageTemplate = template.Must(template.New("public-cloud-sig{{if .ErrorMessage}}<div class="error">{{.ErrorMessage}}</div>{{end}}{{if .Cancelled}}<div class="note">Checkout was cancelled. You can start again below.</div>{{end}}- <form method="POST" action="/signup">+ <form method="POST" action="{{.FormAction}}">{{/* Tier labels show monthly pricing for orientation. Stripe checkoutdisplays the actual price from the configured price ID. */}}{{if or .HasPower .HasMax}}@@ -111,11 +111,11 @@ var publicCloudSignupPageTemplate = template.Must(template.New("public-cloud-sig<button class="cta" type="submit">Continue To Secure Checkout</button></form>- <p class="fine">After checkout, you will receive a magic-link email to access your dedicated tenant.</p>+ <p class="fine">After checkout, we will email a Pulse Account sign-in link so you can open your hosted workspace.</p><ol><li>Your Stripe checkout completes securely.</li>- <li>Pulse Cloud provisions your dedicated tenant container.</li>- <li>You receive a sign-in magic link by email.</li>+ <li>Pulse Cloud provisions your hosted workspace.</li>+ <li>The email link opens Pulse Account, where you open your workspace and continue setup.</li></ol></div></div>@@ -128,7 +128,7 @@ var publicCloudSignupCompleteTemplate = template.Must(template.New("public-cloud<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">- <title>Pulse Cloud Signup Complete</title>+ <title>Pulse Cloud Checkout Complete</title><style nonce="{{.Nonce}}">:root { color-scheme: light; }body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f8fafc; color: #0f172a; }@@ -141,9 +141,9 @@ var publicCloudSignupCompleteTemplate = template.Must(template.New("public-cloud<body><div class="wrap"><div class="card">- <h1>Signup Received</h1>- <p>Your checkout completed. Pulse Cloud is provisioning your workspace.</p>- <p>Watch your inbox for a magic-link sign-in email. If it does not arrive shortly, return to signup and request a new link.</p>+ <h1>Checkout Complete</h1>+ <p>Your checkout completed. Pulse Cloud is provisioning your hosted workspace.</p>+ <p>Watch your inbox for a Pulse Account sign-in link. That link lands in Pulse Account, where you can open your workspace and continue setup.</p></div></div></body>@@ -166,6 +166,7 @@ type publicCloudSignupPageData struct {Email stringOrgName stringTier string // selected tier slug ("starter", "power", "max")+ FormAction stringErrorMessage stringCancelled boolNonce string@@ -189,6 +190,8 @@ type publicMagicLinkRequest struct {Target string `json:"target,omitempty"`}+const canonicalPublicCloudSignupPath = "/cloud/signup"+func NewPublicCloudSignupHandlers(cfg *CPConfig, reg *registry.TenantRegistry, magicLinks interface {GenerateToken(email, tenantID string) (string, error)GeneratePortalToken(email, tenantID string) (string, error)@@ -259,12 +262,13 @@ func (h *PublicCloudSignupHandlers) HandleSignupPage(w http.ResponseWriter, r *htier = cloudTierStarter // valid but unconfigured tier → default to starter}data := publicCloudSignupPageData{- Email: strings.TrimSpace(r.URL.Query().Get("email")),- OrgName: strings.TrimSpace(r.URL.Query().Get("org_name")),- Tier: string(tier),- Cancelled: strings.EqualFold(strings.TrimSpace(r.URL.Query().Get("cancelled")), "1"),- HasPower: h.cfg != nil && strings.TrimSpace(h.cfg.CloudPowerPriceID) != "",- HasMax: h.cfg != nil && strings.TrimSpace(h.cfg.CloudMaxPriceID) != "",+ Email: strings.TrimSpace(r.URL.Query().Get("email")),+ OrgName: strings.TrimSpace(r.URL.Query().Get("org_name")),+ Tier: string(tier),+ FormAction: canonicalPublicCloudSignupPath,+ Cancelled: strings.EqualFold(strings.TrimSpace(r.URL.Query().Get("cancelled")), "1"),+ HasPower: h.cfg != nil && strings.TrimSpace(h.cfg.CloudPowerPriceID) != "",+ HasMax: h.cfg != nil && strings.TrimSpace(h.cfg.CloudMaxPriceID) != "",}h.renderSignupPage(w, r, http.StatusOK, data)case http.MethodPost:@@ -282,6 +286,7 @@ func (h *PublicCloudSignupHandlers) HandleSignupPage(w http.ResponseWriter, r *hEmail: email,OrgName: orgName,Tier: tierStr,+ FormAction: canonicalPublicCloudSignupPath,ErrorMessage: "Invalid plan tier selected.",HasPower: h.cfg != nil && strings.TrimSpace(h.cfg.CloudPowerPriceID) != "",HasMax: h.cfg != nil && strings.TrimSpace(h.cfg.CloudMaxPriceID) != "",@@ -294,6 +299,7 @@ func (h *PublicCloudSignupHandlers) HandleSignupPage(w http.ResponseWriter, r *hEmail: email,OrgName: orgName,Tier: string(tier),+ FormAction: canonicalPublicCloudSignupPath,ErrorMessage: "A valid email address is required.",HasPower: h.cfg != nil && strings.TrimSpace(h.cfg.CloudPowerPriceID) != "",HasMax: h.cfg != nil && strings.TrimSpace(h.cfg.CloudMaxPriceID) != "",@@ -305,6 +311,7 @@ func (h *PublicCloudSignupHandlers) HandleSignupPage(w http.ResponseWriter, r *hEmail: email,OrgName: orgName,Tier: string(tier),+ FormAction: canonicalPublicCloudSignupPath,ErrorMessage: "Organization name must be 3-64 characters and cannot contain slashes.",HasPower: h.cfg != nil && strings.TrimSpace(h.cfg.CloudPowerPriceID) != "",HasMax: h.cfg != nil && strings.TrimSpace(h.cfg.CloudMaxPriceID) != "",@@ -316,6 +323,7 @@ func (h *PublicCloudSignupHandlers) HandleSignupPage(w http.ResponseWriter, r *hEmail: email,OrgName: orgName,Tier: string(tier),+ FormAction: canonicalPublicCloudSignupPath,ErrorMessage: "The selected plan tier is not currently available.",HasPower: h.cfg != nil && strings.TrimSpace(h.cfg.CloudPowerPriceID) != "",HasMax: h.cfg != nil && strings.TrimSpace(h.cfg.CloudMaxPriceID) != "",@@ -330,6 +338,7 @@ func (h *PublicCloudSignupHandlers) HandleSignupPage(w http.ResponseWriter, r *hEmail: email,OrgName: orgName,Tier: string(tier),+ FormAction: canonicalPublicCloudSignupPath,ErrorMessage: "Unable to create checkout session. Please try again.",HasPower: h.cfg != nil && strings.TrimSpace(h.cfg.CloudPowerPriceID) != "",HasMax: h.cfg != nil && strings.TrimSpace(h.cfg.CloudMaxPriceID) != "",@@ -398,7 +407,7 @@ func (h *PublicCloudSignupHandlers) HandlePublicSignup(w http.ResponseWriter, rwritePublicSignupJSON(w, http.StatusCreated, map[string]any{"checkout_url": checkoutURL,- "message": "Checkout session created. Continue in Stripe to provision your Pulse Cloud tenant.",+ "message": "Checkout session created. Continue in Stripe to provision your Pulse Cloud workspace.",})}@@ -421,7 +430,10 @@ func (h *PublicCloudSignupHandlers) HandlePublicMagicLinkRequest(w http.Response}target := parsePublicMagicLinkTarget(req.Target)- const msg = "If that email is registered, you'll receive a magic link shortly."+ msg := "If that email is registered, you'll receive a magic link shortly."+ if target == cpauth.MagicLinkTargetPortal {+ msg = "If that email is registered, you'll receive a Pulse Account sign-in link shortly."+ }if h.registry == nil || h.magicLinks == nil {writePublicSignupJSON(w, http.StatusOK, map[string]any{"success": true,@@ -489,8 +501,8 @@ func (h *PublicCloudSignupHandlers) createCheckout(email, orgName string, tier c}stripe.Key = strings.TrimSpace(h.cfg.StripeAPIKey)- successURL := buildCPURL(h.cfg.BaseURL, "/signup/complete", nil)- cancelURL := buildCPURL(h.cfg.BaseURL, "/signup", url.Values{+ successURL := buildCPURL(h.cfg.BaseURL, canonicalPublicCloudSignupPath+"/complete", nil)+ cancelURL := buildCPURL(h.cfg.BaseURL, canonicalPublicCloudSignupPath, url.Values{"cancelled": {"1"},"email": {email},"org_name": {orgName},diff --git a/internal/cloudcp/public_cloud_signup_handlers_test.go b/internal/cloudcp/public_cloud_signup_handlers_test.goindex 2095b0a8ba..9bfe0096e0 100644--- a/internal/cloudcp/public_cloud_signup_handlers_test.go+++ b/internal/cloudcp/public_cloud_signup_handlers_test.go@@ -78,6 +78,28 @@ func TestPublicCloudSignupHandleSignupPageRendersForm(t *testing.T) {if !strings.Contains(body, "<form") || !strings.Contains(body, "Start Pulse Cloud") {t.Fatalf("expected signup form markup in response body")}+ if !strings.Contains(body, `action="/cloud/signup"`) {+ t.Fatalf("expected signup form to post to the canonical cloud signup path")+ }+}++func TestPublicCloudSignupHandleSignupCompleteRendersPulseAccountHandoff(t *testing.T) {+ h := NewPublicCloudSignupHandlers(&CPConfig{}, nil, nil, nil)+ req := httptest.NewRequest(http.MethodGet, "/cloud/signup/complete", nil)+ rec := httptest.NewRecorder()++ h.HandleSignupComplete(rec, req)++ if rec.Code != http.StatusOK {+ t.Fatalf("status=%d, want %d", rec.Code, http.StatusOK)+ }+ body := rec.Body.String()+ if !strings.Contains(body, "Checkout Complete") {+ t.Fatalf("expected checkout completion heading")+ }+ if !strings.Contains(body, "Pulse Account sign-in link") {+ t.Fatalf("expected Pulse Account handoff copy")+ }}func TestPublicCloudSignupHandleSignupPagePostValidRedirectsToStripe(t *testing.T) {diff --git a/internal/cloudcp/stripe/helpers_test.go b/internal/cloudcp/stripe/helpers_test.goindex e270ae1a68..63eac70d6c 100644--- a/internal/cloudcp/stripe/helpers_test.go+++ b/internal/cloudcp/stripe/helpers_test.go@@ -1,11 +1,52 @@package stripeimport (+ "context"+ "net/url"+ "strings""testing"+ cpauth "github.com/rcourtman/pulse-go-rewrite/internal/cloudcp/auth"+ cpemail "github.com/rcourtman/pulse-go-rewrite/internal/cloudcp/email""github.com/rcourtman/pulse-go-rewrite/internal/license/entitlements")+type captureProvisionerEmailSender struct {+ calls int+ msg cpemail.Message+}++func (c *captureProvisionerEmailSender) Send(_ context.Context, msg cpemail.Message) error {+ c.calls+++ c.msg = msg+ return nil+}++func extractMagicLinkToken(t *testing.T, body string) string {+ t.Helper()++ start := strings.Index(body, "http")+ if start < 0 {+ t.Fatalf("expected magic link URL in body %q", body)+ }++ rawURL := body[start:]+ if end := strings.IndexAny(rawURL, " \r\n\t<>\""); end >= 0 {+ rawURL = rawURL[:end]+ }++ parsed, err := url.Parse(strings.TrimSpace(rawURL))+ if err != nil {+ t.Fatalf("parse magic link URL: %v", err)+ }++ token := strings.TrimSpace(parsed.Query().Get("token"))+ if token == "" {+ t.Fatalf("expected token in magic link URL %q", rawURL)+ }+ return token+}+func TestMapSubscriptionStatus(t *testing.T) {tests := []struct {input string@@ -182,3 +223,40 @@ func TestRedactMagicLinkURL(t *testing.T) {})}}++func TestGenerateAndLogPortalMagicLinkIssuesPortalTargetedToken(t *testing.T) {+ svc, err := cpauth.NewService(t.TempDir())+ if err != nil {+ t.Fatalf("NewService: %v", err)+ }+ t.Cleanup(svc.Close)++ emailSender := &captureProvisionerEmailSender{}+ provisioner := &Provisioner{+ magicLinks: svc,+ baseURL: "https://cloud.example.com",+ emailSender: emailSender,+ emailFrom: "[email protected]",+ }++ provisioner.generateAndLogPortalMagicLink("[email protected]", "t_hosted_1")++ if emailSender.calls != 1 {+ t.Fatalf("email sender calls=%d, want 1", emailSender.calls)+ }++ token := extractMagicLinkToken(t, emailSender.msg.Text)+ validated, err := svc.ValidateToken(token)+ if err != nil {+ t.Fatalf("ValidateToken: %v", err)+ }+ if validated.Target != cpauth.MagicLinkTargetPortal {+ t.Fatalf("token target=%q, want %q", validated.Target, cpauth.MagicLinkTargetPortal)+ }+ if validated.TenantID != "t_hosted_1" {+ t.Fatalf("token tenantID=%q, want %q", validated.TenantID, "t_hosted_1")+ }+ if validated.Email != "[email protected]" {+ t.Fatalf("token email=%q, want %q", validated.Email, "[email protected]")+ }+}diff --git a/internal/cloudcp/stripe/provisioner.go b/internal/cloudcp/stripe/provisioner.goindex 0e51ae2822..c86c2f14d4 100644--- a/internal/cloudcp/stripe/provisioner.go+++ b/internal/cloudcp/stripe/provisioner.go@@ -318,13 +318,13 @@ func (p *Provisioner) pollHealth(ctx context.Context, containerID string) bool {}}-func (p *Provisioner) generateAndLogMagicLink(email, tenantID string) {+func (p *Provisioner) generateAndLogPortalMagicLink(email, tenantID string) {if p.magicLinks == nil || email == "" {return}- token, err := p.magicLinks.GenerateToken(email, tenantID)+ token, err := p.magicLinks.GeneratePortalToken(email, tenantID)if err != nil {- log.Error().Err(err).Str("tenant_id", tenantID).Msg("Failed to generate magic link token")+ log.Error().Err(err).Str("tenant_id", tenantID).Msg("Failed to generate Pulse Account magic link token")return}magicURL := cpauth.BuildVerifyURL(p.baseURL, token)@@ -332,7 +332,7 @@ func (p *Provisioner) generateAndLogMagicLink(email, tenantID string) {log.Error().Str("tenant_id", tenantID).Str("base_url", strings.TrimSpace(p.baseURL)).- Msg("Failed to build magic link URL")+ Msg("Failed to build Pulse Account magic link URL")return}@@ -354,23 +354,23 @@ func (p *Provisioner) generateAndLogMagicLink(email, tenantID string) {log.Error().Err(sendErr).Str("tenant_id", tenantID).Str("email", email).- Msg("Failed to send magic link email — falling back to log")+ Msg("Failed to send Pulse Account magic link email — falling back to log")} else {log.Info().Str("tenant_id", tenantID).Str("email", email).- Msg("Magic link email sent")+ Msg("Pulse Account magic link email sent")return // Email sent successfully, don't log the URL}}}- // Fallback: log the magic link URL+ // Fallback: log the Pulse Account magic link URL.log.Info().Str("tenant_id", tenantID).Str("email", email).Str("magic_link_url_redacted", redactMagicLinkURL(magicURL)).- Msg("Magic link generated for new tenant")+ Msg("Pulse Account magic link generated for new tenant")}func redactMagicLinkURL(raw string) string {@@ -746,7 +746,7 @@ func (p *Provisioner) HandleCheckout(ctx context.Context, session CheckoutSessioif err := p.registry.Update(tenant); err != nil {return fmt.Errorf("update tenant record: %w", err)}- p.generateAndLogMagicLink(email, tenantID)+ p.generateAndLogPortalMagicLink(email, tenantID)log.Warn().Str("tenant_id", tenantID).Msg("Provisioned without container because CP_ALLOW_DOCKERLESS_PROVISIONING is enabled")@@ -759,7 +759,7 @@ func (p *Provisioner) HandleCheckout(ctx context.Context, session CheckoutSessioif err := p.registry.Update(tenant); err != nil {return fmt.Errorf("update tenant record: %w", err)}- p.generateAndLogMagicLink(email, tenantID)+ p.generateAndLogPortalMagicLink(email, tenantID)} else {log.Warn().Str("tenant_id", tenantID).