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
Normalize infrastructure onboarding route contract
rcourtman238545b207ba
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex c725adde20..979fbade49 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -339,9 +339,9 @@ an add-only capacity posture.state (active/paused/unauthorized/unreachable/stale/pending) andactive scope keys into the table's display. `InfrastructureWorkspace`must not reconstruct per-type health, scope, or last-seen columns- from `useInfrastructureReportingState` for configured connection- rows; the legacy reporting-state path is retained only for- monitoring-stopped inventory rows pending phase 9 cleanup. Drill-in+ from any retired reporting-local state for configured connection+ rows; the aggregator is the only configured-connections source of+ truth. Drill-infrom a unified row opens`frontend-modern/src/components/Settings/ConnectionDetailDrawer.tsx`,which renders the aggregator fields directly (type, address, state,@@ -423,9 +423,9 @@ an add-only capacity posture.still belong to the reporting inventory and inline lifecycle detail, butthey must not appear as peer connection rows on that top ledger. Adding anew system must stay a single entry point on that ledger:- one `Add a system` picker that keeps `Install on a host` explicit for the- agent path while opening the saved-connection create flow for API-backed- platforms on the same page. `/settings/infrastructure/install`,+ one `Add connection` entry point that keeps `Install on a host` explicit+ for the agent path while opening the saved-connection create flow for+ API-backed platforms on the same page. `/settings/infrastructure/install`,`/settings/infrastructure/platforms`, and`/settings/infrastructure/operations` remain valid deep links, but theymust resolve to section focus on that same single-page workspace rather@@ -451,7 +451,11 @@ an add-only capacity posture.canonical `Open Infrastructure Install` handoff and the explicit`Open Platform connections` handoff against the live setup wizard insteadof relying on stale bootstrap tokens, dashboard fallbacks, or preview-only- coverage.+ coverage. That API-backed handoff may keep the operator-facing `Platform+ connections` label, but it must land on the shared infrastructure+ onboarding contract at `/settings/infrastructure?add=pick` and normalize+ back to `/settings/infrastructure` instead of reviving a separate+ platform-management shell.When the first host reports successfully, the install workflow must treatthat as a completion handoff with direct navigation into `/dashboard` and`/settings/infrastructure/operations` instead of leaving operators on a@@ -721,9 +725,10 @@ instead of adopting execution-history persistence as a side effect.The connected-infrastructure reporting workspace also now treats API-backedplatform surfaces as platform-connection-managed capabilities, not host-managedagent extensions. `frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx`,-`InfrastructureActiveRowDetails.tsx`, and `useInfrastructureReportingState.tsx`-must keep Proxmox, PBS, PMG, and TrueNAS on the shared Platform connections-path, while only machine-installed agent, Docker, and Kubernetes surfaces+`frontend-modern/src/components/Settings/useConnectionsLedger.ts`, and+`frontend-modern/src/components/Settings/ConnectionDetailDrawer.tsx` must keep+Proxmox, PBS, PMG, and TrueNAS on the shared Infrastructure API-backed path,+while only machine-installed agent, Docker, and Kubernetes surfacesparticipate in host stop-monitoring scope, uninstall commands, and upgradeactions. That same lifecycle-owned reporting contract now also owns guest-linktruth for agent rows: when a host agent is actually attached to a VM or system@@ -892,42 +897,27 @@ best-effort report.When those lifecycle-adjacent calls fail validation, adjacent automation shouldrely on the API-owned error codes rather than message-text heuristics, becausethe backend contract owns the reporting validation classification.-The API-backed platform connections workspace now also lives explicitly inside-this lifecycle boundary: `ConnectionsTable.tsx`,+The API-backed platform onboarding surface now lives inside the shared+Infrastructure workspace. `ConnectionsTable.tsx`,`connectionsTableModel.ts`, `InfrastructureWorkspace.tsx`,-`infrastructureWorkspaceModel.ts`,-`InfrastructureInstallerSection.tsx`, `InfrastructureInventorySection.tsx`,-`InfrastructureActiveRowDetails.tsx`,-`InfrastructureIgnoredRowDetails.tsx`,-`InfrastructureStopMonitoringDialog.tsx`,-`PlatformConnectionsWorkspace.tsx`, `platformConnectionsModel.ts`,-`TrueNASSettingsPanel.tsx`, `useTrueNASSettingsPanelState.ts`,-`ProxmoxSettingsPanel.tsx`, `proxmoxSettingsModel.ts`,-`ProxmoxDirectWorkspace.tsx`, `ProxmoxConfiguredNodesTable.tsx`,-`ProxmoxDirectConnectionsCard.tsx`, `ProxmoxDiscoveryResultsCard.tsx`,-`ProxmoxDeleteNodeDialog.tsx`, `ProxmoxNodeModalStack.tsx`,-`ConfiguredNodeTables.tsx`, `SettingsSectionNav.tsx`,-`useInfrastructureOperationsState.ts`, `infrastructureSettingsModel.ts`,-`useInfrastructureConfiguredNodesState.ts`,-`useInfrastructureDiscoveryRuntimeState.ts`, `useInfrastructureSettingsState.ts`,-and `useProxmoxDirectWorkspaceState.ts` own the fallback install/direct/reporting-operator flow, with `ConnectionsTable.tsx` plus-`connectionsTableModel.ts` as the canonical top-level infrastructure ledger,-`PlatformConnectionsWorkspace.tsx` as the canonical-API-backed platform shell, `ProxmoxSettingsPanel.tsx` and-`TrueNASSettingsPanel.tsx` as provider-specific workspaces,-`useInfrastructureSettingsState.ts` as the shared platform-connections-composition boundary, and-the direct-node/discovery runtime hooks plus `useTrueNASSettingsPanelState.ts`-as the canonical provider state owners, instead of leaving those panels-ungoverned beside the canonical unified-agent install path.+`infrastructureWorkspaceModel.ts`, `InfrastructureInstallerSection.tsx`,+`platformConnectionsModel.ts`, `useInfrastructureSettingsState.ts`,+`useTrueNASSettingsPanelState.ts`, `useVMwareSettingsPanelState.ts`,+`proxmoxSettingsModel.ts`, `useInfrastructureConfiguredNodesState.ts`, and+`useInfrastructureDiscoveryRuntimeState.ts` own the fallback+install/direct/reporting operator flow, with `ConnectionsTable.tsx` plus+`connectionsTableModel.ts` as the canonical top-level infrastructure ledger+and the inline `ConnectionEditor` credential slots as the API-backed add/edit+surface. Operator-facing setup copy may still use `Platform connections`, but+that label now means the shared Infrastructure onboarding path+(`/settings/infrastructure?add=pick`) rather than a standalone+`PlatformConnectionsWorkspace.tsx` shell.That ledger-first default route must stay focused on one row per top-levelmonitored system. Configured platform connections must stay in secondaryconnection-management flows rather than appearing as peer rows in the default-ledger. Inline detail drawers may surface reporting-item and ignored-item-controls, but installer setup, platform-specific configuration, and profile-management must remain secondary flows rather than being dumped underneath the-default ledger.+ledger, and movement between the connections ledger, inline add flow, and+install surface must stay inside the single `Infrastructure` sidebar+destination rather than reviving extra shells, tabs, or overlays.Those secondary infrastructure views must open through route-backed workspacesrather than modal overlays or stacked inline bodies. When theoperator opens platform connection management, install tooling, or the legacy@@ -944,92 +934,43 @@ Settings sidebar owns only the top-level `Infrastructure` destination; movementbetween those three jobs belongs to explicit ledger actions inside`InfrastructureWorkspace.tsx`, not extra sidebar entries or body-replacingworkspace subtabs.-That same lifecycle-owned platform-connections workspace must keep API-backed-provider state operationally useful, not CRUD-only. `TrueNASSettingsPanel.tsx`-and `useTrueNASSettingsPanelState.ts` must surface the shared runtime health,-poll cadence, discovered contribution summary, and canonical infrastructure /-workloads / storage / recovery handoffs coming from `/api/truenas/connections`-instead of falling back to panel-local inference or agent-first setup guidance.-Saved connection retests from that workspace must use the server-owned-`POST /api/truenas/connections/{id}/test` path so operators can verify stored-credentials without leaking masked-secret placeholders back into the draft-connection form contract. When the operator is editing a saved connection, that-same path must also accept the in-flight form payload and merge unchanged-masked secrets on the server, so edit-dialog tests do not force credential-re-entry just to validate changed host or TLS fields.-When an operator runs a row-level saved-connection test from that workspace,-`useTrueNASSettingsPanelState.ts` must reload the shared connection summary-after the request completes so the card reflects refreshed last-success or-last-error state instead of leaving stale health beside a success or failure-toast.-When that same platform workspace reports TrueNAS as unavailable, the disabled-state must mean the server has explicitly opted out of the default-on TrueNAS-integration, not that operators still need to enable a hidden feature gate for-normal product use.-That same API-backed platform workspace owner now also includes the shared-presentation helpers `frontend-modern/src/utils/clusterEndpointPresentation.ts`-and `frontend-modern/src/utils/proxmoxSettingsPresentation.ts`, so endpoint-reachability state, discovery-prefill defaults, and variant copy stay on the-same governed lifecycle surface instead of drifting into card-local strings or-prefill assembly.-That same platform-connections boundary also defines the agent-optional rule-for API-backed platforms. TrueNAS may surface Assistant control and runtime-insight through the backend-owned platform connection and polling path, but-adjacent lifecycle flows must not start treating a unified-agent install as-the required bootstrap for provider-backed TrueNAS operations.-That same agent-optional rule also covers Assistant diagnostics. Provider--backed TrueNAS app log reads may route through shared AI/runtime wiring on the-platform connection and poller path, but lifecycle-adjacent setup/install-flows must not reframe those diagnostics as requiring unified-agent host-install before TrueNAS becomes operational in Pulse.-That same agent-optional rule also covers Assistant configuration reads.-Provider-backed TrueNAS app config may route through shared AI/runtime wiring-on the platform connection and poller path, but lifecycle-adjacent-setup/install flows must not reframe those config reads as requiring-unified-agent host install before TrueNAS becomes operational in Pulse.-That same platform-connections boundary now also defines the only acceptable-phase-1 VMware onboarding path. If `vmware-vsphere` implementation starts,-`PlatformConnectionsWorkspace.tsx` must add `vCenter` under the shared-API-backed workspace, preserve the saved-connection test and health model, and-keep direct `ESXi` out of the phase-1 route and install model. Lifecycle--adjacent flows must not invent a VMware-only setup shell or reframe unified--agent host install as the bootstrap requirement for VMware support.-That same platform-connections boundary also owns demo/mock continuity for-those settings surfaces. When `/api/system/mock-mode` is enabled,-provider-backed settings panels and their downstream infrastructure,-workloads, storage, and recovery handoffs must read the canonical connection-fixtures from `internal/mock/fixture_graph.go` instead of handler-local demo-lists, so operator-facing demos stay coherent across those adjacent product-surfaces without a restart.-That same lifecycle-owned platform-connections boundary also owns configured+That same lifecycle-owned platform onboarding boundary must keep API-backed+provider state operationally useful, not CRUD-only.+`useTrueNASSettingsPanelState.ts` and `useVMwareSettingsPanelState.ts` must+surface shared runtime health, poll cadence, discovered contribution summary,+and canonical infrastructure / workloads / storage / recovery handoffs coming+from the saved-connection APIs instead of falling back to provider-local+inference or agent-first setup guidance. Saved-connection retests must use the+server-owned test routes, must allow masked-secret continuity on edit, and+must refresh the shared connection-summary state after a save or retest+completes. `frontend-modern/src/utils/clusterEndpointPresentation.ts` and+`frontend-modern/src/utils/proxmoxSettingsPresentation.ts` remain part of that+same governed lifecycle surface, so endpoint reachability state,+discovery-prefill defaults, and variant copy do not drift into card-local+strings or prefill assembly.+That same platform-onboarding boundary also defines the agent-optional rule+for API-backed platforms. TrueNAS and VMware may surface Assistant control,+diagnostics, configuration reads, and runtime insight through the backend-owned+connection and polling path, but adjacent lifecycle flows must not start+treating a unified-agent install as the required bootstrap for provider-backed+operations.+That same boundary also defines the only acceptable VMware phase-1 path:+`vCenter` under the shared Infrastructure onboarding flow. Lifecycle-adjacent+flows must not invent a VMware-only setup shell, direct-ESXi branch, or+agent-first bootstrap story just because the runtime now has a live VMware+connection panel and poller.+That same platform-onboarding boundary also owns demo/mock continuity for API-+backed settings surfaces. When `/api/system/mock-mode` is enabled, provider+fixtures and their downstream infrastructure/workloads/storage/recovery+handoffs must still read from `internal/mock/fixture_graph.go`, so+operator-facing demos stay coherent across those adjacent product surfaces+without a restart.+That same lifecycle-owned platform-onboarding boundary also owns configuredProxmox, PBS, and PMG replacement continuity. Node update handlers must passthe current platform surface into monitored-system admission through the sharedstructured replacement selector so host or name edits preserve the intendedslot without reintroducing lifecycle-local matcher closures or empty-estatefallbacks.-That same lifecycle-owned VMware workspace must also keep the backend-runtime-shape hidden behind one operator-facing connection model. The settings surface-may show one VMware connection's poll health, last error classification, and-observed contribution summary, but it must not force the operator to manage-separate Automation API versus VI JSON sessions or understand multi-client-runtime wiring just to use the shared platform-connections path.-That same shared connection model now also includes one runtime-health owner:-manual saved-connection retests with no edit overlay must refresh the same-poller-owned `poll` summary that ordinary list reads surface, while draft tests-and edit-form overlay tests stay non-persistent until a save succeeds.-Lifecycle-owned settings flows must not bring back a second `test` status model-or a VMware-only health fetch just to describe row health.-That lifecycle-owned VMware slice now also includes the first live runtime-handoff rule. `frontend-modern/src/components/Settings/VMwareSettingsPanel.tsx`,-`frontend-modern/src/components/Settings/useVMwareSettingsPanelState.ts`,-`frontend-modern/src/components/Settings/PlatformConnectionsWorkspace.tsx`,-and `internal/api/router.go` must keep VMware on the shared platform--connections workflow with one `vCenter` connection family under the same-saved-connection ledger. Lifecycle-adjacent install or discovery surfaces must-not fork that-into a VMware-only install wizard, direct-ESXi setup branch, or agent-first-bootstrap story just because the runtime now has a live VMware connection-panel and poller.That same shared router boundary must treat infrastructure summary chartnormalization as summary-only presentation transport: long-range chart bucketshaping may improve operator-facing summary readability, but it must not be@@ -1040,11 +981,12 @@ canonical `/workloads` row contract so lifecycle settings, reporting, andhandoff surfaces never depend on provider-native metric keys.That same lifecycle-owned settings slice now also owns the shared VMwarehandoff framing. `InfrastructureWorkspace.tsx`,-`PlatformConnectionsWorkspace.tsx`, `useInfrastructureSettingsState.ts`, and+`useInfrastructureSettingsState.ts`, and`useSettingsInfrastructurePanelProps.ts` must surface VMware availability andconnection counts from the same shared infrastructure settings state that owns-the VMware panel itself, rather than letting adjacent setup surfaces grow a-second VMware availability fetch or a VMware-only handoff path.+the inline VMware credential flow itself, rather than letting adjacent setup+surfaces grow a second VMware availability fetch or a VMware-only handoff+path.That same infrastructure workspace boundary now also owns the first-runhandoff copy for new operators. `InfrastructureWorkspace.tsx` must keep`Install on a host` visible as the first monitored-system path while still@@ -1246,9 +1188,11 @@ registration must all create the same Pulse-managed `pulse-<canonical-scope-slugtoken name for a given Pulse endpoint instead of letting one caller drift intotimestamp-suffixed or rerun-local token identities.The corresponding node setup modal owner is now an explicit shell-plus-sections-surface: `NodeModal.tsx` composes `NodeModalBasicInfoSection.tsx`,-`NodeModalAuthenticationSection.tsx`, `NodeModalMonitoringSection.tsx`,-`NodeModalStatusFooter.tsx`, `nodeModalModel.ts`, and `useNodeModalState.ts`.+surface:+`ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx` composes+`NodeModalBasicInfoSection.tsx`, `NodeModalAuthenticationSection.tsx`,+`NodeModalMonitoringSection.tsx`, `NodeModalStatusFooter.tsx`,+`nodeModalModel.ts`, and `useNodeModalState.ts`.That same node setup owner also includes`frontend-modern/src/utils/nodeModalPresentation.ts`, which now owns thecanonical node-type defaults, endpoint/auth placeholders, monitoring coverage@@ -1480,13 +1424,13 @@ instead of persisting an orphan profile reference through the API.That same missing-profile assignment contract must survive the shared frontendcontrol surface: `frontend-modern/src/api/agentProfiles.ts` must preserve thecanonical missing-profile message for assignment 404s, and-`AgentProfilesPanel.tsx` and `InfrastructureOperationsController.tsx` must resync profile state after+`AgentProfilesPanel.tsx` and `InfrastructureInstallerSection.tsx` must resync profile state afterthat rejection instead of flattening it into a generic assignment failure whileleaving stale profile options visible.That same shared profile-management boundary must also fail closed on malformedlist payloads: `frontend-modern/src/api/agentProfiles.ts` may not silentlyreinterpret non-array profile or assignment responses as an empty state, and-`useAgentProfilesPanelState.ts` / `InfrastructureOperationsController.tsx` must surface that load+`useAgentProfilesPanelState.ts` / `InfrastructureInstallerSection.tsx` must surface that loadfailure instead of pretending no profiles exist.That same shared profile-management boundary must also fail closed on malformedprofile-object, suggestion, schema, and validation payloads: the shared@@ -1573,7 +1517,8 @@ must preserve both `PULSE_ENABLE_PROXMOX` and `PULSE_PROXMOX_TYPE`, and`scripts/install.ps1` must persist those flags into the managed servicearguments instead of silently collapsing back to generic host monitoring.The same lifecycle ownership now also covers manual node setup command-presentation in the extracted node setup modal owner (`NodeModal.tsx`,+presentation in the extracted node setup surface+(`ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx`,`NodeModalSetupGuideSection.tsx`, `nodeModalModel.ts`, and`useNodeModalState.ts`): the copied PVE permission snippet must stayaligned with the canonical backend setup script, including comma-joined@@ -1591,7 +1536,8 @@ generation and manual setup-script download through canonical `NodesAPI`helpers for both PVE and PBS, preserving the shared setup-token and expirycontract instead of letting one node type drift onto a raw fetch-only path.That same node setup modal owner must also stay on the direct-`node-setup-settings-surface` proof path across `NodeModal.tsx`,+`node-setup-settings-surface` proof path across+`ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx`,`NodeModalAuthenticationSection.tsx`, `NodeModalBasicInfoSection.tsx`,`NodeModalMonitoringSection.tsx`, `NodeModalSetupGuideSection.tsx`,`NodeModalStatusFooter.tsx`, `nodeModalModel.ts`, and `useNodeModalState.ts`,@@ -1884,7 +1830,8 @@ and private-CA continuity controls used by the shared lifecycle commandsurface: the first-session setup-completion install handoff must pass explicit`--insecure` and `--cacert` choices through the shared Unix install builder sothe very first installer fetch and the installer runtime stay aligned with the-same transport contract as `InfrastructureOperationsController.tsx`. In explicit insecure mode, that+same transport contract as `InfrastructureInstallerSection.tsx` and+`useInfrastructureOperationsState.tsx`. In explicit insecure mode, thatmeans the outer `curl` fetch must widen to `-kfsSL` instead of preservingstrict TLS until `install.sh` starts.That same first-session install surface must also preserve canonical@@ -1896,7 +1843,8 @@ That same first-session surface must also preserve Windows install parity:`SetupCompletionPanel` may not stop at Unix-only shell transport while claiming Windowscoverage. Its PowerShell install command must route through the sharedtransport helper so URL, token, insecure-TLS, and custom-CA behavior stay-aligned with `InfrastructureOperationsController.tsx`.+aligned with `InfrastructureInstallerSection.tsx` and+`useInfrastructureOperationsState.tsx`.That same first-session setup-completion surface also owns the operator's v6mental model for Unified Agent onboarding: `SetupCompletionPanel` must teach that oneUnified Agent install creates one canonical Pulse system resource first, then@@ -1983,7 +1931,7 @@ Pulse URL, shell and PowerShell install commands must trim it before appending`/install.sh` or `/install.ps1` so lifecycle transport does not drift ontodouble-slash asset paths.That same shared install-command transport must also fail closed on blank local-overrides: whitespace-only custom Pulse endpoint input in `InfrastructureOperationsController.tsx`+overrides: whitespace-only custom Pulse endpoint input in `InfrastructureInstallerSection.tsx`or `SetupCompletionPanel.tsx` may not override the canonical backend-governedendpoint, and shared command builders must reject blank endpoint URLs insteadof composing `/install.sh` or `/install.ps1` from an empty base.@@ -2226,7 +2174,7 @@ surface-local history identity.The browser-side runtime boundary is now explicit too. Lifecycle-ownedsettings hooks such as`frontend-modern/src/components/Settings/useAgentProfilesPanelState.ts` and-`frontend-modern/src/components/Settings/useInfrastructureReportingState.tsx`+`frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`may read websocket state only through`frontend-modern/src/contexts/appRuntime.ts`. They must not import `@/App` orrecreate app-shell providers, because `frontend-modern/src/App.tsx` ownsdiff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex 91b89feaab..9d94819fa7 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -165,7 +165,7 @@ the canonical monitored-system blocked payload.1. Add or change payload fields through handler + contract tests together2. Update frontend API types in lockstep with backend contract changes.- Websocket-backed API consumers such as `frontend-modern/src/components/Settings/useAPITokenManagerState.ts` and `frontend-modern/src/components/Settings/useInfrastructureReportingState.tsx` may read runtime context only through `frontend-modern/src/contexts/appRuntime.ts`; they must not import `frontend-modern/src/App.tsx`, because payload ownership remains in the API contract rather than the root shell.+ Websocket-backed API consumers such as `frontend-modern/src/components/Settings/useAPITokenManagerState.ts` and `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx` may read runtime context only through `frontend-modern/src/contexts/appRuntime.ts`; they must not import `frontend-modern/src/App.tsx`, because payload ownership remains in the API contract rather than the root shell.3. Add dedicated contract tests for new stable payloads4. Route unified resource sensitivity, routing, and `aiSafeSummary` payload changes through `internal/api/resources.go`, `internal/api/contract_test.go`, and the canonical frontend resource consumer proofs together; resource governance metadata must not ship as an API-only or frontend-only heuristic5. Route unified-resource action, lifecycle, and export audit reads through `internal/api/activity_audit_handlers.go`, `internal/api/router_routes_licensing.go`, and `internal/api/contract_test.go` together so the control-plane execution trail stays on a governed API contract instead of a store-only shape@@ -454,8 +454,9 @@ the canonical monitored-system blocked payload.connected-infrastructure surface kind, and connected-infrastructureconsumers such as`frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx`- and- `frontend-modern/src/components/Settings/useInfrastructureReportingState.tsx`+ together with+ `frontend-modern/src/components/Settings/useConnectionsLedger.ts` and+ `frontend-modern/src/components/Settings/ConnectionDetailDrawer.tsx`must preserve the transport distinction between machine-managed surfaces(`agent`, `docker`, `kubernetes`) and platform-connections-managedsurfaces (`proxmox`, `pbs`, `pmg`, `truenas`) instead of collapsing them@@ -1124,13 +1125,15 @@ explicitly opted out of the default-on TrueNAS integration, not as the normalbootstrap state for a supported platform.That same platform-connections boundary therefore defines the current TrueNASonboarding floor for Pulse. Supported now means operators can bootstrap-TrueNAS through the shared Platform connections workflow and-`/api/truenas/connections` without the unified agent, preserve masked secrets-on ordinary edits, retest saved connections through the stored-secret path,-and see last-sync plus discovered contribution summaries on the same settings-surface. Pulse does not promise a separate TrueNAS-only onboarding wizard,-agent-required bootstrap, or public provider-local app/log/config APIs at this-floor.+TrueNAS through the shared Infrastructure onboarding flow+(`Platform connections` may remain the operator-facing setup-wizard label,+but it lands on `/settings/infrastructure?add=pick` and normalizes into the+shared workspace) and `/api/truenas/connections` without the unified agent,+preserve masked secrets on ordinary edits, retest saved connections through+the stored-secret path, and see last-sync plus discovered contribution+summaries on the same settings surface. Pulse does not promise a separate+TrueNAS-only onboarding wizard, agent-required bootstrap, or public+provider-local app/log/config APIs at this floor.That same infrastructure platform-connections contract is also the onlyacceptable public backend boundary for the admitted VMware vSphere phase-1direction. `/api/vmware/connections` must be the canonical@@ -1372,18 +1375,23 @@ The router now wires the tenant resource state provider during initial setupwhen a multi-tenant monitor is present, so non-default org resource list andfacet reads do not fall back to a missing-provider 500 during normal tenantrequests.-The unified agent settings surface now also follows an explicit shared-boundary with agent-lifecycle. Changes to-`frontend-modern/src/components/Settings/InfrastructureOperationsController.tsx` must carry this-contract together with the shared agent-lifecycle contract and the dedicated API-proof files for token generation, agent lookup, and profile assignment, rather-than remaining an unowned consumer of those contract surfaces.-That shared `InfrastructureOperationsController.tsx` boundary must also stay under explicit proof-routing on both sides instead of relying only on generic owned-file coverage on-the API-contract side: token generation, agent lookup, and profile assignment-transport changes must continue to carry the direct-`unified-agent-settings-surface` proof path together with the lifecycle-side-surface proof.+The unified infrastructure settings surface now also follows an explicit+shared boundary with agent-lifecycle. Changes to+`frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx`,+`frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx`,+`frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx`,+`frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`,+and `frontend-modern/src/components/Settings/useInfrastructureInstallState.tsx`+must carry this contract together with the shared agent-lifecycle contract and+the dedicated API proof files for token generation, agent lookup, profile+assignment, install/uninstall copy transport, and Proxmox setup/install flows,+rather than remaining unowned consumers of those contract surfaces.+That shared infrastructure-settings boundary must also stay under explicit+proof routing on both sides instead of relying only on generic owned-file+coverage on the API-contract side: token generation, agent lookup, profile+assignment, install/uninstall copy transport, and inline Proxmox credential+flows must continue to carry the direct proof paths together with the+lifecycle-side surface proof.The same shared-boundary rule now applies to `frontend-modern/src/api/agentProfiles.ts`,`frontend-modern/src/api/nodes.ts`,`frontend-modern/src/utils/agentInstallCommand.ts`,@@ -1391,11 +1399,15 @@ The same shared-boundary rule now applies to `frontend-modern/src/api/agentProfi`internal/api/config_setup_handlers.go`, and `internal/api/unified_agent.go`:agent install/register/profile control changes must preserve canonical APIpayload behavior instead of drifting into subsystem-local transport rules.-That same shared boundary now assumes `InfrastructureOperationsController.tsx`-is only the shell, while `useInfrastructureOperationsState.tsx` composes `useInfrastructureInstallState.tsx` and `useInfrastructureReportingState.tsx` into the shared API-backed-state/provider contract and the extracted installer, inventory, and stop-monitoring-section owners stay render-side consumers of that canonical state instead of-embedding their own transport calls or ad hoc API parsing.+That same shared boundary now assumes `InfrastructureWorkspace.tsx` owns the+top-level ledger shell, `frontend-modern/src/components/Settings/useConnectionsLedger.ts`+consumes the canonical `/api/connections` projection for configured rows, and+`InfrastructureInstallerSection.tsx` plus+`ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx` consume the shared+API-backed lifecycle state. The retired+`InfrastructureOperationsController.tsx` shell and+`useInfrastructureReportingState.tsx` reporting path must not be reintroduced+as parallel transport owners.That shared `frontend-modern/src/api/agentProfiles.ts` boundary must also stayunder explicit proof routing on both sides instead of remaining a genericfrontend-client match on the API-contract side: assignment, delete, unassign,@@ -1462,12 +1474,13 @@ surfaces instead of treating them as harmless reads. Demo sessions must receiveshared `/api/logs/*` endpoints, so the preview shell cannot expose runtimediagnostics, log streams, or downloadable log bundles behind a supposedlyread-only demo account.-That shared `InfrastructureOperationsController.tsx` boundary now also preserves copied shell-command payload continuity: any privilege-escalation wrapper applied at the-settings surface must keep the full canonical installer argument list intact-instead of dropping token, profile, or command-execution flags between display-and clipboard transport.-That same shared `InfrastructureOperationsController.tsx` boundary now also consumes the canonical+That shared infrastructure install boundary now also preserves copied shell+command payload continuity: any privilege-escalation wrapper applied at+`frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx`+through `useInfrastructureOperationsState.tsx` must keep the full canonical+installer argument list intact instead of dropping token, profile, or+command-execution flags between display and clipboard transport.+That same shared infrastructure-settings boundary now also consumes the canonical`connectedInfrastructure` projection from the backend state contract instead ofreconstructing reporting rows by merging raw unified-resource facets andremoved-_ arrays in the browser. v6 clients no longer receive those removed-_@@ -1614,11 +1627,14 @@ resolves in the fetched profile collection: the current payload state must stayvisible to the operator instead of collapsing into an empty/default selectvalue that misstates the backend assignment.That same shared install-command boundary must preserve selected Proxmox target-profiles across PowerShell transport: `InfrastructureOperationsController.tsx` must emit-`PULSE_ENABLE_PROXMOX` and `PULSE_PROXMOX_TYPE` when the operator copies a-Windows install command for a Proxmox-targeted flow, and `scripts/install.ps1`-must convert those env vars back into canonical `pulse-agent` service args so-the copied payload does not drift from the governed shell command contract.+profiles across PowerShell transport:+`frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx`+and `frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`+must emit `PULSE_ENABLE_PROXMOX` and `PULSE_PROXMOX_TYPE` when the operator+copies a Windows install command for a Proxmox-targeted flow, and+`scripts/install.ps1` must convert those env vars back into canonical+`pulse-agent` service args so the copied payload does not drift from the+governed shell command contract.That same shared PowerShell install transport must also preserveoperator-selected insecure TLS and command-execution settings: copied Windowsinstall and upgrade payloads must emit `PULSE_INSECURE_SKIP_VERIFY` and@@ -1667,7 +1683,7 @@ transport: `SetupCompletionPanel` must expose a governed PowerShell install commroute it through the shared lifecycle helper, so `PULSE_URL`, optional`PULSE_TOKEN`, insecure/self-signed TLS handling, and `PULSE_CACERT` stayidentical to the Windows install payload contract already enforced in-`InfrastructureOperationsController.tsx`.+`InfrastructureInstallerSection.tsx` and `useInfrastructureOperationsState.tsx`.That same first-session install boundary must also preserve the sharedoptional-auth command contract: the Unix install builder must support omitted`--token` transport, and `SetupCompletionPanel` may only omit that argument after an@@ -1703,15 +1719,16 @@ when `PULSE_INSECURE_SKIP_VERIFY` is set, `scripts/install.ps1` must use thesame relaxed certificate policy for the governed binary download and uninstallAPI callback requests instead of preserving `--insecure` only for the lateragent runtime.-That same shared `InfrastructureOperationsController.tsx` boundary must also preserve+That same shared infrastructure install boundary must also preserveplatform-canonical uninstall command payloads: copied utility actions forWindows agents must emit the PowerShell uninstall transport, and uninstallpayloads must only carry real API token secrets rather than token record IDswhen server-side deregistration is requested.That same uninstall payload rule now also applies to copied Unix shell flows:-`InfrastructureOperationsController.tsx` must never serialize a token record ID into the governed-`--token` argument when building uninstall transport, because the backend-runtime only accepts the raw token secret or no token at all.+`frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`+must never serialize a token record ID into the governed `--token` argument+when building uninstall transport, because the backend runtime only accepts+the raw token secret or no token at all.The same shared uninstall transport must preserve `PULSE_URL` for token-optionalWindows flows, because `install.ps1` reads its canonical server endpoint fromthat environment variable when composing the governed uninstall request.@@ -1926,13 +1943,13 @@ assignment rows that no governed UI can represent.That same not-found assignment contract must propagate through the sharedfrontend client path: `frontend-modern/src/api/agentProfiles.ts` must surfacethe canonical missing-profile message for 404 assignment responses, and the-settings profile surfaces in `AgentProfilesPanel.tsx` and `InfrastructureOperationsController.tsx`+settings profile surfaces in `AgentProfilesPanel.tsx` and `InfrastructureInstallerSection.tsx`must treat that message as a resync trigger so stale profile options do notsurvive after the backend has already rejected them.That same shared response contract must also fail closed on malformed listpayloads: the profile-management client may not treat non-array profile orassignment responses as empty collections, and `AgentProfilesPanel.tsx` /-`InfrastructureOperationsController.tsx` must surface the resulting load failure instead of+`InfrastructureInstallerSection.tsx` must surface the resulting load failure instead offlattening it into a fake zero-profile state.That same shared response contract must also fail closed on malformedprofile-object, suggestion, schema, and validation payloads: the@@ -1985,7 +2002,7 @@ host install transport too: shared Unix install command builders must appendthe lifecycle contract already enforced in the unified settings surface.That same frontend install-command contract must also fail closed on blanklocal overrides: whitespace-only custom Pulse endpoint input in-`InfrastructureOperationsController.tsx` or `SetupCompletionPanel.tsx` may not override the canonical+`InfrastructureInstallerSection.tsx` or `SetupCompletionPanel.tsx` may not override the canonicalbackend-governed endpoint, and the shared install-command helper must rejectblank base URLs instead of composing installer script paths from an emptytransport root.@@ -2001,7 +2018,7 @@ for `http://` Pulse URLs automatically, while only the explicit insecure-TLStoggle may widen curl transport itself to `-k`.That same unified settings install boundary must also preserve preview/copyparity: the rendered Linux/macOS/BSD and Windows install snippets in-`InfrastructureOperationsController.tsx` must already reflect the active token contract, custom-CA+`InfrastructureInstallerSection.tsx` must already reflect the active token contract, custom-CAtransport, insecure/plain-HTTP behavior, install-profile env/flags, andcommand-execution mode, rather than showing a stale base command that is onlyrewritten at copy time.@@ -2055,10 +2072,14 @@ field, not merely a positive number, so expired setup-script-url responses arerejected before quick-setup UI state or copy actions trust the returned setuptoken.That same settings quick-setup surface must consume the canonicalized response-directly: `NodeModal.tsx` must copy the governed token-bearing-`commandWithEnv` field but render `commandWithoutEnv` as the visible preview,-using the guaranteed `expires` value without reintroducing module-local-nullable fallbacks. The same shared surface must+directly:+`frontend-modern/src/components/Settings/NodeModalSetupGuideSection.tsx`+inside+`frontend-modern/src/components/Settings/ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx`+must copy the governed token-bearing `commandWithEnv` field but render+`commandWithoutEnv` as the visible preview, using the guaranteed `expires`+value without reintroducing module-local nullable fallbacks. The same shared+surface mustalso treat `setupToken` as bootstrap transport data and `tokenHint` as theoperator-facing display field, so the UI does not re-expose the full one-timetoken once the copied/downloaded artifact already carries it. That preview@@ -2462,9 +2483,11 @@ types. That same shared client boundary must also validate a non-empty`command` response and keep the raw backend `token` field inside`frontend-modern/src/api/nodes.ts` rather than leaking it into downstream UIstate. Downstream Proxmox install-command consumers like the extracted node-setup modal owner (`NodeModal.tsx`, `NodeModalAuthenticationSection.tsx`,-`NodeModalSetupGuideSection.tsx`, `nodeModalModel.ts`, and-`useNodeModalState.ts`) must then surface those canonical validation errors+setup surface+(`ConnectionEditor/CredentialSlots/NodeCredentialSlot.tsx`,+`NodeModalAuthenticationSection.tsx`, `NodeModalSetupGuideSection.tsx`,+`nodeModalModel.ts`, and `useNodeModalState.ts`) must then surface those+canonical validation errorsdirectly rather than collapsing one node-type pane back to genericcopy-generation failure.Hosted organization-route gating now also falls under this API payload@@ -2885,7 +2908,8 @@ That same shared infrastructure-settings API contract now also owns theconnected-infrastructure distinction between machine-managed andplatform-connections-managed reporting. `frontend-modern/src/types/api.ts`,`frontend-modern/src/components/Settings/infrastructureOperationsModel.tsx`,-and `frontend-modern/src/components/Settings/useInfrastructureReportingState.tsx`+`frontend-modern/src/components/Settings/useConnectionsLedger.ts`, and+`frontend-modern/src/components/Settings/ConnectionDetailDrawer.tsx`must treat `truenas` as a canonical connected-infrastructure surface kindalongside `proxmox`, `pbs`, and `pmg`, and the settings reporting/installsurfaces must keep those platform-managed rows navigable back to platform@@ -2902,7 +2926,7 @@ when the governed chart API already owns that transport.The shared browser contract now also includes a neutral app-runtime contextboundary for websocket-backed API consumers. API-contract-owned hooks such as`frontend-modern/src/components/Settings/useAPITokenManagerState.ts` and-`frontend-modern/src/components/Settings/useInfrastructureReportingState.tsx`+`frontend-modern/src/components/Settings/useInfrastructureOperationsState.tsx`may read websocket state through `frontend-modern/src/contexts/appRuntime.ts`,but payload truth, bootstrap rules, and commercial identity still belong tothe governed API handlers and contract tests. Those hooks must not importdiff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 17f30876d8..82a7e1a199 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -213,7 +213,7 @@ work extends shared components instead of creating new local variants.helper plus runtime `monitored_system_capacity` reads rather thanreconstructing raw `current / limit` slash math or `0 remaining` copy inthe banner shell, state owner, or shared model.-5. Keep shared infrastructure shell state on the reusable settings boundary: `frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts` and `frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx` must continue to derive provider counts, availability, and shared subtab copy from one infrastructure-settings source — via the unified aggregator through `frontend-modern/src/components/Settings/useConnectionsLedger.ts` — instead of creating provider-local summary fetches or VMware-only shell vocabulary. Phase 9 retired the old `PlatformConnectionsWorkspace` per-type shell and the `Platform connections` nomenclature.+5. Keep shared infrastructure shell state on the reusable settings boundary: `frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts` and `frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx` must continue to derive provider counts, availability, and shared subtab copy from one infrastructure-settings source — via the unified aggregator through `frontend-modern/src/components/Settings/useConnectionsLedger.ts` — instead of creating provider-local summary fetches or VMware-only shell vocabulary. Phase 9 retired the old `PlatformConnectionsWorkspace` per-type shell, but setup guidance may still use `Platform connections` as the operator-facing label for the shared API-backed onboarding path.That same shared shell boundary now owns the default posture for`/settings/infrastructure`: the landing route should read as one ledger-firstworkspace with one row per top-level monitored system. Configured platform@@ -476,7 +476,7 @@ work extends shared components instead of creating new local variants.path to the bare `/settings/infrastructure`, which renders the unifiedConnections table, not to a separate install subview or to reporting/control. The first-session story is owned by that table's own empty state- and the `Add a system` entry point on it, not by a second landing route,+ and the `Add connection` entry point on it, not by a second landing route,so first-time operators and returning operators see one consistentinfrastructure surface by default.14. Keep dashboard onboarding copy on the shared presentation owner in@@ -1069,6 +1069,12 @@ must treat missing infrastructure history as a governed empty state rather thanas a silent blank sparkline box. Error copy and empty-history copy belong tothe feature shell, while the data path and chart-shaping logic must stay in theowned hook/model layers that feed it.+That same dashboard overview shell also owns workload discoverability copy on+the KPI strip. `frontend-modern/src/features/dashboardOverview/KPIStrip.tsx`+and `frontend-modern/src/utils/dashboardKpiPresentation.ts` must keep the+`Workloads` card explicit that the unified workloads surface contains VMs,+containers, and pods, rather than assuming operators will infer that mapping+from the route label alone.That same dashboard boundary now also owns the shared dashboard presentationhelpers through `frontend-modern/src/utils/dashboardEmptyStatePresentation.ts`,`frontend-modern/src/utils/dashboardGuestPresentation.ts`,diff --git a/frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx b/frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsxindex d3e9dace78..016a1c213f 100644--- a/frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx+++ b/frontend-modern/src/components/Settings/InfrastructureInstallerSection.tsx@@ -465,7 +465,7 @@ export const InfrastructureInstallerSection: Component = () => {{state.getSelectedInstallProfile().description}</p><p class="mt-1.5 text-xs text-muted">- API-backed platforms such as TrueNAS connect through Add infrastructure →+ API-backed platforms such as TrueNAS connect through Add connection →choose the platform type.</p><Show when={state.getInstallProfileFlags().length > 0}>diff --git a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsxindex 08d2e4c04e..a188b1a4c7 100644--- a/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx+++ b/frontend-modern/src/components/Settings/InfrastructureWorkspace.tsx@@ -1,5 +1,5 @@import { Component, Show, createEffect, createMemo, createSignal } from 'solid-js';-import { useLocation, useNavigate } from '@solidjs/router';+import { useLocation, useNavigate, useSearchParams } from '@solidjs/router';import { presentationPolicyIsReadOnly } from '@/stores/sessionPresentationPolicy';import { AgentProfilesPanel } from './AgentProfilesPanel';import { ConnectionDetailDrawer } from './ConnectionDetailDrawer';@@ -13,7 +13,9 @@ import type { ConnectionType } from '@/api/connections';import { InfrastructureInstallerSection } from './InfrastructureInstallerSection';import {buildInfrastructureWorkspacePath,+ deriveAddStepFromSearch,deriveAddStepFromLocation,+ INFRASTRUCTURE_ADD_QUERY_PARAM,type InfrastructureAddStep,} from './infrastructureWorkspaceModel';import type { InfrastructurePlatformSettingsProps } from './proxmoxSettingsModel';@@ -34,6 +36,7 @@ const ADD_STEP_TO_TYPE: Record<InfrastructureAddStep, ConnectionType> = {const InfrastructureWorkspaceContent: Component<InfrastructureWorkspaceProps> = (props) => {const navigate = useNavigate();const location = useLocation();+ const [, setSearchParams] = useSearchParams();const ledger = useConnectionsLedger();const [addMode, setAddMode] = createSignal(false);@@ -49,10 +52,15 @@ const InfrastructureWorkspaceContent: Component<InfrastructureWorkspaceProps> =// Redirect legacy deep links and pre-select the matching type in the editor.createEffect(() => {const path = location.pathname;+ const queryStep = deriveAddStepFromSearch(location.search ?? '');const step = deriveAddStepFromLocation(path, location.search ?? '');if (path === '/settings/infrastructure' && !step) return;- navigate(buildInfrastructureWorkspacePath(), { replace: true });+ if (queryStep) {+ setSearchParams({ [INFRASTRUCTURE_ADD_QUERY_PARAM]: null }, { replace: true });+ } else {+ navigate(buildInfrastructureWorkspacePath(), { replace: true });+ }if (!readOnly() && step) {setAddMode(true);if (step && step !== 'pick') {diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsxindex c1aca3c3db..041594586f 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureOperationsModel.test.tsx@@ -1,6 +1,7 @@import { describe, expect, it } from 'vitest';import type { ConnectedInfrastructureItem } from '@/types/api';import type { UnifiedAgentRow } from '../infrastructureOperationsModel';+import infrastructureInstallerSectionSource from '../InfrastructureInstallerSection.tsx?raw';import {INSTALL_PROFILE_OPTIONS,getCapabilityManagementPath,@@ -153,6 +154,15 @@ describe('infrastructure operations model', () => {expect(INSTALL_PROFILE_OPTIONS.map((option) => option.value)).not.toContain('truenas');});+ it('keeps the embedded installer section on the canonical host-install framing', () => {+ expect(infrastructureInstallerSectionSource).toContain(+ "title={state.isEmbedded() ? 'Install on a host' : 'Infrastructure'}",+ );+ expect(infrastructureInstallerSectionSource).toContain('Generate install token');+ expect(infrastructureInstallerSectionSource).toContain('Generate token');+ expect(infrastructureInstallerSectionSource).not.toContain('Add infrastructure');+ });+it('does not reintroduce the retired reporting state hook on the operations state', async () => {const operationsStateSource = await import('../useInfrastructureOperationsState?raw'diff --git a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsxindex 46e92af3a6..854c330f66 100644--- a/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/InfrastructureWorkspace.test.tsx@@ -1,21 +1,27 @@-import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';+import { cleanup, fireEvent, render, screen, waitFor, within } from '@solidjs/testing-library';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import type { Connection } from '@/api/connections';import { InfrastructureWorkspace } from '../InfrastructureWorkspace';-let mockPathname = '/settings/infrastructure';-let mockSearch = '';+const routeState = vi.hoisted(() => ({+ pathname: '/settings/infrastructure',+ search: '',+}));+const connectionState = vi.hoisted(() => ({+ connections: [] as Connection[],+}));const navigateSpy = vi.hoisted(() => vi.fn());+const setSearchParamsSpy = vi.hoisted(() => vi.fn());const presentationPolicyIsReadOnlyMock = vi.hoisted(() => vi.fn(() => false));--let mockConnections: Connection[] = [];+const probeSpy = vi.hoisted(() => vi.fn().mockResolvedValue({ candidates: [], probedMs: 0 }));vi.mock('@solidjs/router', async () => {const actual = await vi.importActual<typeof import('@solidjs/router')>('@solidjs/router');return {...actual,- useLocation: () => ({ pathname: mockPathname, search: mockSearch }),+ useLocation: () => ({ pathname: routeState.pathname, search: routeState.search }),useNavigate: () => navigateSpy,+ useSearchParams: () => [{}, setSearchParamsSpy],};});@@ -27,6 +33,30 @@ vi.mock('../useInfrastructureOperationsState', () => ({InfrastructureOperationsStateProvider: (props: { children: unknown }) => <>{props.children}</>,}));+vi.mock('../useConnectionsLedger', () => ({+ useConnectionsLedger: () => ({+ connections: () => connectionState.connections,+ rows: () =>+ connectionState.connections.map((connection) => ({+ id: connection.id,+ name: connection.name || connection.id,+ subtitle: connection.type,+ host: connection.address,+ coverageLabels: ['VMs'],+ collectionLabel: connection.type === 'agent' ? 'Agent' : 'API',+ statusLabel: connection.state === 'paused' ? 'Paused' : 'Active',+ statusClassName: '',+ lastActivityText: '1m ago',+ manageLabel: 'View details',+ manage: { kind: 'connection' as const, connectionId: connection.id },+ })),+ findById: (id: string) => connectionState.connections.find((connection) => connection.id === id),+ reload: vi.fn(),+ loading: () => false,+ error: () => null,+ }),+}));+vi.mock('../InfrastructureInstallerSection', () => ({InfrastructureInstallerSection: () => <div data-testid="install-section">install</div>,}));@@ -51,13 +81,31 @@ vi.mock('../AgentProfilesPanel', () => ({AgentProfilesPanel: () => <div data-testid="agent-profiles">profiles</div>,}));+vi.mock('../ConnectionDetailDrawer', () => ({+ ConnectionDetailDrawer: (props: {+ connection: () => Connection | undefined;+ onClose: () => void;+ }) => (+ <>+ {props.connection() ? (+ <div role="dialog" aria-label="Connection details">+ <div>{props.connection()!.name || props.connection()!.id}</div>+ <button type="button" onClick={props.onClose}>+ Close+ </button>+ </div>+ ) : null}+ </>+ ),+}));+vi.mock('@/api/connections', async () => {const actual = await vi.importActual<typeof import('@/api/connections')>('@/api/connections');return {...actual,ConnectionsAPI: {- list: vi.fn(() => Promise.resolve(mockConnections)),- probe: vi.fn().mockResolvedValue({ candidates: [], probedMs: 0 }),+ ...actual.ConnectionsAPI,+ probe: probeSpy,},};});@@ -70,8 +118,8 @@ const connectionFixture = (overrides: Partial<Connection> = {}): Connection => (state: 'active',stateReason: '',enabled: true,- surfaces: ['vms', 'containers', 'storage', 'backups'],- scope: { vms: true, containers: true, storage: true, backups: true },+ surfaces: ['vms', 'containers'],+ scope: { vms: true, containers: true },lastSeen: new Date().toISOString(),lastError: null,source: 'manual',@@ -79,51 +127,70 @@ const connectionFixture = (overrides: Partial<Connection> = {}): Connection => (...overrides,});-const setShowNodeModalSpy = vi.fn();-const setEditingNodeSpy = vi.fn();-const setCurrentNodeTypeSpy = vi.fn();-const setModalResetKeySpy = vi.fn();-const baseProps = () =>({- pveNodes: () => [{ id: 'pve-1', name: 'zeus', host: '10.0.0.1', type: 'pve', status: 'connected' }],- pbsNodes: () => [],- pmgNodes: () => [],- agentStateResources: () => [],- trueNASSettings: {- connections: () => [{ id: 'tn-1', name: 'Tower NAS', host: '10.0.0.20', enabled: true }],- openCreateDialog: vi.fn(),- closeDialog: vi.fn(),- closeDeleteDialog: vi.fn(),- openEditDialog: vi.fn(),- },- vmwareSettings: {- connections: () => [{ id: 'vm-1', name: 'lab-vcenter', host: '10.0.0.30', enabled: true }],- openCreateDialog: vi.fn(),- closeDialog: vi.fn(),- closeDeleteDialog: vi.fn(),- openEditDialog: vi.fn(),- },selectedAgent: () => 'pve',onSelectAgent: vi.fn(),- setShowNodeModal: setShowNodeModalSpy,- setEditingNode: setEditingNodeSpy,- setCurrentNodeType: setCurrentNodeTypeSpy,- setModalResetKey: setModalResetKeySpy,+ initialLoadComplete: () => true,+ discoveryEnabled: () => false,+ discoveryMode: () => 'auto',+ discoveryScanStatus: () => 'idle',+ discoveredNodes: () => [],+ savingDiscoverySettings: () => false,+ envOverrides: () => ({}),+ agentStateResources: () => [],+ pbsInstances: () => [],+ pmgInstances: () => [],+ pveNodes: () => [],+ pbsNodes: () => [],+ pmgNodes: () => [],+ trueNASSettings: {} as any,+ vmwareSettings: {} as any,+ temperatureMonitoringEnabled: () => false,+ triggerDiscoveryScan: vi.fn(),+ loadDiscoveredNodes: vi.fn(),+ handleDiscoveryEnabledChange: vi.fn(),+ testNodeConnection: vi.fn(),+ requestDeleteNode: vi.fn(),+ refreshClusterNodes: vi.fn(),+ setShowNodeModal: vi.fn(),+ editingNode: () => null,+ setEditingNode: vi.fn(),+ setCurrentNodeType: vi.fn(),+ modalResetKey: () => 0,+ setModalResetKey: vi.fn(),+ isNodeModalVisible: () => false,+ securityStatus: () => null,+ resolveTemperatureMonitoringEnabled: () => false,+ temperatureMonitoringLocked: () => false,+ savingTemperatureSetting: () => false,+ handleTemperatureMonitoringChange: vi.fn(),+ disableDockerUpdateActions: () => false,+ disableDockerUpdateActionsLocked: () => false,+ savingDockerUpdateActions: () => false,+ handleDisableDockerUpdateActionsChange: vi.fn(),+ handleNodeTemperatureMonitoringChange: vi.fn(),+ saveNode: vi.fn(),+ showDeleteNodeModal: () => false,+ cancelDeleteNode: vi.fn(),+ deleteNode: vi.fn(),+ deleteNodeLoading: () => false,+ nodePendingDeleteLabel: () => '',+ nodePendingDeleteHost: () => '',+ nodePendingDeleteType: () => '',+ nodePendingDeleteTypeLabel: () => '',}) as any;describe('InfrastructureWorkspace', () => {beforeEach(() => {navigateSpy.mockReset();+ setSearchParamsSpy.mockReset();presentationPolicyIsReadOnlyMock.mockReset();presentationPolicyIsReadOnlyMock.mockReturnValue(false);- setShowNodeModalSpy.mockReset();- setEditingNodeSpy.mockReset();- setCurrentNodeTypeSpy.mockReset();- setModalResetKeySpy.mockReset();- mockPathname = '/settings/infrastructure';- mockSearch = '';- mockConnections = [connectionFixture()];+ probeSpy.mockClear();+ routeState.pathname = '/settings/infrastructure';+ routeState.search = '';+ connectionState.connections = [connectionFixture()];});afterEach(() => {@@ -133,21 +200,22 @@ describe('InfrastructureWorkspace', () => {const renderWorkspace = (propOverrides: Record<string, unknown> = {}) =>render(() => (<InfrastructureWorkspace {...{ ...baseProps(), ...propOverrides }} />) as any);- it('renders the inventory table at the base infrastructure route', () => {+ it('renders the inventory table at the base infrastructure route', async () => {renderWorkspace();- expect(screen.getByRole('heading', { name: 'Monitored systems' })).toBeInTheDocument();+ await waitFor(() =>+ expect(screen.getByRole('heading', { name: 'Monitored systems' })).toBeInTheDocument(),+ );expect(screen.getByRole('button', { name: 'Add connection' })).toBeInTheDocument();+ expect(screen.getByText('zeus')).toBeInTheDocument();expect(screen.queryByTestId('install-section')).toBeNull();- expect(screen.queryByTestId('proxmox-section')).toBeNull();- expect(screen.queryByTestId('agent-profiles')).toBeNull();});- it('renders unified connection rows from the aggregator', async () => {- mockConnections = [+ it('renders unified connection rows from the ledger', async () => {+ connectionState.connections = [connectionFixture({ id: 'pve:zeus', name: 'zeus', type: 'pve', state: 'active' }),connectionFixture({- id: 'truenas:tn-1',+ id: 'truenas:tower',name: 'tower-nas',type: 'truenas',state: 'paused',@@ -162,17 +230,18 @@ describe('InfrastructureWorkspace', () => {expect(screen.getByText('Paused')).toBeInTheDocument();});- it('opens the unified add drawer with the probe step when Add infrastructure is clicked', () => {+ it('opens the inline add flow when Add connection is clicked', () => {renderWorkspace();fireEvent.click(screen.getByRole('button', { name: /Add connection/i }));expect(screen.getByRole('button', { name: /Probe address/i })).toBeInTheDocument();- expect(screen.getByPlaceholderText(/pve01\.lan/)).toBeInTheDocument();+ expect(screen.getByRole('button', { name: /Enter credentials manually/i })).toBeInTheDocument();expect(navigateSpy).not.toHaveBeenCalled();+ expect(setSearchParamsSpy).not.toHaveBeenCalled();});- it('routes to the agent credential slot when the user picks agent manually', () => {+ it('routes to the agent install slot when Pulse agent is picked manually', () => {renderWorkspace();fireEvent.click(screen.getByRole('button', { name: /Add connection/i }));@@ -197,7 +266,7 @@ describe('InfrastructureWorkspace', () => {fireEvent.click(screen.getByRole('button', { name: /Add connection/i }));fireEvent.click(screen.getByRole('button', { name: /Enter credentials manually/i }));- fireEvent.click(screen.getByRole('button', { name: /VMware vCenter/i }));+ fireEvent.click(screen.getByRole('button', { name: /VMware vCenter \/ ESXi/i }));expect(screen.getByTestId('vmware-section')).toBeInTheDocument();});@@ -212,7 +281,7 @@ describe('InfrastructureWorkspace', () => {expect(screen.getByTestId('proxmox-section')).toBeInTheDocument();});- it('can return to the probe step from a credential slot via Back to probe', () => {+ it('can return to the probe step from a credential slot', () => {renderWorkspace();fireEvent.click(screen.getByRole('button', { name: /Add connection/i }));@@ -224,7 +293,7 @@ describe('InfrastructureWorkspace', () => {expect(screen.queryByTestId('install-section')).toBeNull();});- it('toggles agent profiles inside the agent credential slot', () => {+ it('toggles agent profiles inside the agent install slot', () => {renderWorkspace();fireEvent.click(screen.getByRole('button', { name: /Add connection/i }));@@ -235,83 +304,76 @@ describe('InfrastructureWorkspace', () => {expect(screen.getByTestId('agent-profiles')).toBeInTheDocument();});- it('does not mount node-modal legacy spies when a credential slot is rendered', () => {- renderWorkspace();-- fireEvent.click(screen.getByRole('button', { name: /Add connection/i }));- fireEvent.click(screen.getByRole('button', { name: /Enter credentials manually/i }));- fireEvent.click(screen.getByRole('button', { name: /^Proxmox VE/i }));-- expect(setShowNodeModalSpy).not.toHaveBeenCalled();- expect(setEditingNodeSpy).not.toHaveBeenCalled();- expect(setCurrentNodeTypeSpy).not.toHaveBeenCalled();- expect(setModalResetKeySpy).not.toHaveBeenCalled();- });-- it('opens the connection detail drawer when a unified row is viewed', async () => {- mockConnections = [connectionFixture({ id: 'pve:zeus', name: 'zeus' })];+ it('opens the connection detail drawer when a ledger row is viewed', async () => {renderWorkspace();await waitFor(() => expect(screen.getByText('zeus')).toBeInTheDocument());fireEvent.click(screen.getByRole('button', { name: 'View details' }));- expect(screen.getByRole('dialog', { name: 'Connection details' })).toBeInTheDocument();+ const dialog = screen.getByRole('dialog', { name: 'Connection details' });+ expect(dialog).toBeInTheDocument();+ expect(within(dialog).getByText('zeus')).toBeInTheDocument();});- it('redirects legacy install deep link and pre-selects the agent credential slot', async () => {- mockPathname = '/settings/infrastructure/install';+ it('redirects legacy install deep links and pre-selects the agent install slot', async () => {+ routeState.pathname = '/settings/infrastructure/install';renderWorkspace();expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure', { replace: true });+ expect(setSearchParamsSpy).not.toHaveBeenCalled();await waitFor(() => expect(screen.getByTestId('install-section')).toBeInTheDocument());});- it('opens the canonical query onboarding route and pre-selects the agent credential slot', async () => {- mockSearch = '?add=agent';+ it('clears the canonical query onboarding route and pre-selects the agent install slot', async () => {+ routeState.search = '?add=agent';renderWorkspace();- expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure', { replace: true });+ expect(setSearchParamsSpy).toHaveBeenCalledWith({ add: null }, { replace: true });+ expect(navigateSpy).not.toHaveBeenCalled();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';+ it('clears the canonical query onboarding route for platform picking without pre-selecting a type', async () => {+ routeState.search = '?add=pick';renderWorkspace();- expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure', { replace: true });- await waitFor(() => {- expect(screen.getByRole('button', { name: /Probe address/i })).toBeInTheDocument();- });+ expect(setSearchParamsSpy).toHaveBeenCalledWith({ add: null }, { replace: true });+ expect(navigateSpy).not.toHaveBeenCalled();+ 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';+ routeState.pathname = '/settings/infrastructure/platforms/truenas';renderWorkspace();expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure', { replace: true });+ expect(setSearchParamsSpy).not.toHaveBeenCalled();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();+ expect(screen.queryByTestId('truenas-section')).toBeNull();});- it('hides Add infrastructure and the add drawer in read-only mode', () => {+ it('hides Add connection and the add flow in read-only mode', () => {presentationPolicyIsReadOnlyMock.mockReturnValue(true);renderWorkspace();expect(screen.queryByRole('button', { name: /Add connection/i })).toBeNull();- expect(screen.queryByTestId('install-section')).toBeNull();expect(screen.queryByRole('button', { name: /Probe address/i })).toBeNull();+ expect(screen.queryByTestId('install-section')).toBeNull();});- it('collapses read-only sessions back to the inventory and redirects', () => {+ it('clears query onboarding but keeps read-only sessions on the inventory', () => {presentationPolicyIsReadOnlyMock.mockReturnValue(true);- mockPathname = '/settings/infrastructure/install';+ routeState.search = '?add=agent';renderWorkspace();- expect(navigateSpy).toHaveBeenCalledWith('/settings/infrastructure', { replace: true });+ expect(setSearchParamsSpy).toHaveBeenCalledWith({ add: null }, { replace: true });expect(screen.queryByTestId('install-section')).toBeNull();+ expect(screen.queryByRole('button', { name: /Probe address/i })).toBeNull();});});diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex 469f5def43..bc56070769 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -31,6 +31,9 @@ describe('settings architecture guardrails', () => {it('keeps infrastructure onboarding route-backed under the shared settings shell', () => {expect(settingsHeaderMetaSource).toContain("'infrastructure-systems': {");expect(settingsHeaderMetaSource).toContain('Review monitored systems in one ledger');+ expect(settingsHeaderMetaSource).toContain(+ 'use Add connection when you need platform setup or agent install commands.',+ );expect(settingsNavigationHookSource).toContain('deriveAddStepFromLegacyPath(path)');expect(settingsNavigationHookSource).toContain(@@ -48,6 +51,9 @@ describe('settings architecture guardrails', () => {expect(infrastructureWorkspaceModelSource).toContain('export function deriveAddStepFromLegacyPath(',);+ expect(infrastructureWorkspaceModelSource).toContain(+ 'export function deriveAddStepFromSearch(',+ );});it('keeps the infrastructure add flow inline on ConnectionEditor instead of retired overlays', () => {@@ -58,6 +64,10 @@ describe('settings architecture guardrails', () => {expect(infrastructureWorkspaceSource).toContain('TrueNASCredentialSlot');expect(infrastructureWorkspaceSource).toContain('VMwareCredentialSlot');expect(infrastructureWorkspaceSource).toContain('navigate(buildInfrastructureWorkspacePath(), { replace: true });');+ expect(infrastructureWorkspaceSource).toContain('const [, setSearchParams] = useSearchParams();');+ expect(infrastructureWorkspaceSource).toContain(+ 'setSearchParams({ [INFRASTRUCTURE_ADD_QUERY_PARAM]: null }, { replace: true });',+ );expect(infrastructureWorkspaceSource).not.toContain('InfrastructureOperationsController');expect(infrastructureWorkspaceSource).not.toContain('PlatformConnectionsWorkspace');expect(infrastructureWorkspaceSource).not.toContain('NodeModal');diff --git a/frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts b/frontend-modern/src/components/Settings/infrastructureWorkspaceModel.tsindex d79b9f1f01..6b87d7aa4f 100644--- a/frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts+++ b/frontend-modern/src/components/Settings/infrastructureWorkspaceModel.ts@@ -2,7 +2,7 @@ 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';+export const INFRASTRUCTURE_ADD_QUERY_PARAM = 'add';const LEGACY_INSTALL_PATH = `${INFRASTRUCTURE_BASE_PATH}/install`;const LEGACY_PLATFORMS_PATH = `${INFRASTRUCTURE_BASE_PATH}/platforms`;@@ -14,7 +14,7 @@ function matchesPathPrefix(pathname: string, expected: string): boolean {return pathname === expected || pathname.startsWith(`${expected}/`);}-function normalizeInfrastructurePanelStep(+export function normalizeInfrastructurePanelStep(value: string | null | undefined,): InfrastructurePanelStep | null {switch ((value || '').trim()) {@@ -51,15 +51,17 @@ export function deriveAddStepFromLegacyPath(return null;}+export function deriveAddStepFromSearch(search: string): InfrastructurePanelStep | null {+ const params = new URLSearchParams(search);+ return normalizeInfrastructurePanelStep(params.get(INFRASTRUCTURE_ADD_QUERY_PARAM));+}+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),- );+ const stepFromQuery = deriveAddStepFromSearch(search);if (stepFromQuery) {return stepFromQuery;}diff --git a/frontend-modern/src/components/Settings/settingsHeaderMeta.ts b/frontend-modern/src/components/Settings/settingsHeaderMeta.tsindex 78e8c599d6..7738c9559e 100644--- a/frontend-modern/src/components/Settings/settingsHeaderMeta.ts+++ b/frontend-modern/src/components/Settings/settingsHeaderMeta.ts@@ -9,7 +9,7 @@ import {export const SETTINGS_HEADER_META: SettingsHeaderMetaMap = {'infrastructure-systems': {title: 'Infrastructure',- description: `Review monitored systems in one ledger, then use Add infrastructure when you need platform setup or agent install commands. ${SELF_HOSTED_PRO_BILLING_PRESENTATION.infrastructureRouteReferral}`,+ description: `Review monitored systems in one ledger, then use Add connection when you need platform setup or agent install commands. ${SELF_HOSTED_PRO_BILLING_PRESENTATION.infrastructureRouteReferral}`,},'system-general': {title: 'General',diff --git a/frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx b/frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsxindex 684ec52182..b765a3f0c5 100644--- a/frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx+++ b/frontend-modern/src/components/SetupWizard/SetupCompletionPanel.tsx@@ -161,7 +161,7 @@ Infrastructure:---------------${infrastructureUrl}-Use Add infrastructure to connect your first host or API-backed platform+Use Add connection to connect your first host or API-backed platform(Proxmox, TrueNAS, VMware, and others).Keep these credentials secure!diff --git a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.tsindex 5374a4c909..b90c143440 100644--- a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts+++ b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.guardrails.test.ts@@ -17,9 +17,15 @@ describe('SetupCompletionPanel guardrails', () => {expect(setupCompletionPanelSource).toContain('Shown during setup');expect(setupCompletionPanelSource).toContain('props.onComplete(INFRASTRUCTURE_INSTALL_PATH);');expect(setupCompletionPanelSource).toContain('props.onComplete(PLATFORM_CONNECTIONS_PATH);');+ expect(setupCompletionPanelSource).toContain(+ 'Use Add connection to connect your first host or API-backed platform',+ );expect(setupCompletionPanelSource).toContain('continue with the first-host install token Pulse prepares from setup',);+ expect(setupCompletionPanelSource).not.toContain(+ 'Use Add infrastructure to connect your first host or API-backed platform',+ );expect(setupCompletionPanelSource).not.toContain("from '@/stores/licenseCommercial';");expect(setupCompletionPanelSource).not.toContain('runStartProTrialAction');expect(setupCompletionPanelSource).not.toContain('loadCommercialPosture');diff --git a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.test.tsx b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.test.tsxindex 538b6ecb4c..74eae7c557 100644--- a/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.test.tsx+++ b/frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPanel.test.tsx@@ -157,7 +157,7 @@ describe('SetupCompletionPanel', () => {expect(content).toContain('Admin API Token:');expect(content).toContain('Infrastructure:');expect(content).toContain('https://pulse.example.com/settings/infrastructure?add=agent');- expect(content).toContain('Use Add infrastructure to connect');+ expect(content).toContain('Use Add connection to connect');expect(content).not.toContain('Example Install Command');expect(content).not.toContain('Example Windows Install Command');diff --git a/tests/integration/tests/62-runtime-home-onboarding-contract.spec.ts b/tests/integration/tests/62-runtime-home-onboarding-contract.spec.tsnew file mode 100644index 0000000000..3768bfd1dc--- /dev/null+++ b/tests/integration/tests/62-runtime-home-onboarding-contract.spec.ts@@ -0,0 +1,119 @@+import fs from "node:fs";+import path from "node:path";+import { fileURLToPath } from "node:url";+import { test as base, expect } from "@playwright/test";+import { createAuthenticatedStorageState } from "./helpers";++const __dirname = path.dirname(fileURLToPath(import.meta.url));++type WorkerFixtures = {+ authStorageStatePath: string;+};++const test = base.extend<{}, WorkerFixtures>({+ storageState: async ({ authStorageStatePath }, use) => {+ await use(authStorageStatePath);+ },+ authStorageStatePath: [+ async ({ browser }, use, workerInfo) => {+ const storageStatePath = path.resolve(+ __dirname,+ "..",+ "..",+ "tmp",+ "playwright-auth",+ `runtime-home-onboarding-contract-${workerInfo.project.name}.json`,+ );+ fs.mkdirSync(path.dirname(storageStatePath), { recursive: true });+ await createAuthenticatedStorageState(browser, storageStatePath);+ try {+ await use(storageStatePath);+ } finally {+ fs.rmSync(storageStatePath, { force: true });+ }+ },+ { scope: "worker" },+ ],+});++test.describe("runtime-home onboarding contract", () => {+ test.setTimeout(180_000);++ test.beforeEach(async ({ page }) => {+ await page.addInitScript(() => {+ localStorage.setItem("pulse_whats_new_v2_shown", "true");+ });+ });++ test("normalizes the agent install handoff onto the shared infrastructure workspace", async ({+ page,+ }) => {+ await page.goto("/settings/infrastructure?add=agent", {+ waitUntil: "domcontentloaded",+ });++ await page.waitForURL(/\/settings\/infrastructure$/, { timeout: 15_000 });+ await expect(+ page.getByRole("heading", {+ level: 1,+ name: "Infrastructure",+ }),+ ).toBeVisible();+ await expect(+ page.getByRole("heading", { level: 2, name: "Install on a host" }),+ ).toBeVisible();+ await expect(+ page.getByRole("button", { name: /Generate token/i }),+ ).toBeVisible();+ await expect(+ page.getByRole("button", { name: /Probe address/i }),+ ).toHaveCount(0);+ });++ test("normalizes the platform-pick handoff onto the shared infrastructure workspace", async ({+ page,+ }) => {+ await page.goto("/settings/infrastructure?add=pick", {+ waitUntil: "domcontentloaded",+ });++ await page.waitForURL(/\/settings\/infrastructure$/, { timeout: 15_000 });+ await expect(+ page.getByRole("heading", {+ level: 1,+ name: "Infrastructure",+ }),+ ).toBeVisible();+ await expect(+ page.getByRole("button", { name: /Probe address/i }),+ ).toBeVisible();+ await expect(+ page.getByRole("button", { name: /Generate token/i }),+ ).toHaveCount(0);+ });++ test("normalizes legacy platform-management paths back to the inventory workspace", async ({+ page,+ }) => {+ await page.goto("/settings/infrastructure/platforms/truenas", {+ waitUntil: "domcontentloaded",+ });++ await page.waitForURL(/\/settings\/infrastructure$/, { timeout: 15_000 });+ await expect(+ page.getByRole("heading", {+ level: 1,+ name: "Infrastructure",+ }),+ ).toBeVisible();+ await expect(+ page.getByRole("heading", { level: 3, name: "Monitored systems" }),+ ).toBeVisible();+ await expect(+ page.getByRole("button", { name: /Probe address/i }),+ ).toHaveCount(0);+ await expect(+ page.getByRole("heading", { level: 2, name: "Install on a host" }),+ ).toHaveCount(0);+ });+});