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
Replace in-product pricing page with handoff route
rcourtmanc37b1e83be31
diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex 653f8abfa6..1bbaf1082e 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -71,14 +71,16 @@ agreement, and cloud-specific enforcement rules.49. `frontend-modern/src/components/Settings/useProLicensePanelState.ts`50. `frontend-modern/src/components/Settings/useRelaySettingsPanelState.ts`51. `frontend-modern/src/pages/CloudPricing.tsx`-52. `frontend-modern/src/pages/PricingV6.tsx`-53. `frontend-modern/src/utils/apiClient.ts`-54. `frontend-modern/src/utils/cloudPlans.ts`-55. `frontend-modern/src/utils/commercialBillingModel.ts`-56. `frontend-modern/src/utils/monitoredSystemPresentation.ts`-57. `frontend-modern/src/utils/selfHostedPlans.ts`-58. `frontend-modern/src/utils/licensePresentation.ts`-59. `frontend-modern/src/utils/upgradePresentation.ts`+52. `frontend-modern/src/pages/HostedSignup.tsx`+53. `frontend-modern/src/pages/PricingHandoff.tsx`+54. `frontend-modern/src/utils/apiClient.ts`+55. `frontend-modern/src/utils/cloudPlans.ts`+56. `frontend-modern/src/utils/commercialBillingModel.ts`+57. `frontend-modern/src/utils/licensePresentation.ts`+58. `frontend-modern/src/utils/monitoredSystemPresentation.ts`+59. `frontend-modern/src/utils/pricingHandoff.ts`+60. `frontend-modern/src/utils/selfHostedPlans.ts`+61. `frontend-modern/src/utils/upgradePresentation.ts`## Shared Boundaries@@ -358,11 +360,13 @@ success-notification, and canonical denial handling through`frontend-modern/src/utils/trialStartAction.ts` instead of carrying local`startProTrial()` redirect/error branches that drift from backend commercialtruth.-That same rule also covers the self-hosted pricing page in-`frontend-modern/src/pages/PricingV6.tsx`: pricing CTA state may choose when to-switch from trial to upgrade presentation, but the actual hosted handoff and-backend denial classification must still flow through the shared trial-start-owner instead of parsing raw trial-start status codes inline.+The same commercial handoff rule also covers the legacy `/pricing` route in+`frontend-modern/src/pages/PricingHandoff.tsx` and+`frontend-modern/src/utils/pricingHandoff.ts`: compatibility handoff may keep+product-owned destinations such as monitored-system billing or Cloud plans+inside the app, but public self-hosted pricing must leave the product for the+canonical website rather than rendering a second public pricing surface inside+Pulse.The trial-start rate-limit contract is part of that same boundary. Local`/api/license/trial/start` retries are allowed as a short human-scale burst sooperators can revisit the hosted handoff without getting locked out for a day,@@ -653,9 +657,9 @@ models. `frontend-modern/src/utils/cloudPlans.ts` and`frontend-modern/src/utils/selfHostedPlans.ts` are the canonical frontendsources for cloud and self-hosted plan copy, limits, and comparison metadata,while `frontend-modern/src/pages/CloudPricing.tsx`,-`frontend-modern/src/pages/HostedSignup.tsx`, `frontend-modern/src/pages/PricingV6.tsx`,-and the self-hosted billing settings surfaces must consume those shared owners-instead of redefining retail plan facts or counted-unit policy locally.+`frontend-modern/src/pages/HostedSignup.tsx`, and the self-hosted billing+settings surfaces must consume those shared owners instead of redefining+retail plan facts or counted-unit policy locally.That shared ownership also includes display-ready price semantics. Monthlyheadline price, founding-rate override, compare-at strike-through copy,campaign badge copy, and annual summary text must come from the shared@@ -665,10 +669,10 @@ The same owner also holds shared hosted commercial copy such as page title,introductory description, common Cloud inclusions, setup-step guidance,hosted-signup section headings, and primary hosted-signup CTA labels whenthose facts describe the canonical offer rather than one page's local layout.-The same rule applies to self-hosted pricing framing: page title/description,-badge copy, primary CTA labels, and adjacent upsell-link copy on-`PricingV6.tsx` must come from the shared self-hosted plan-definition owner-rather than page-local strings.+The same rule applies to self-hosted commercial framing inside product-owned+billing and activation surfaces: plan names, counted-unit copy, and upgrade+adjacency must come from the shared self-hosted plan-definition owner rather+than page-local strings.The shared license presentation owner also holds self-hosted Pro settingsupsell and trial-ended notice copy for `ProLicensePlanSection.tsx`; thatsurface must consume canonical helper notices instead of carrying inlinediff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 186bb15a26..7ea7d66b5d 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -149,6 +149,12 @@ work extends shared components instead of creating new local variants.consume `frontend-modern/src/contexts/appRuntime.ts`; they must not import`frontend-modern/src/App.tsx`, because `App.tsx` owns provider placementwhile frontend primitives own reusable consumption.+ That same shared shell boundary now also owns thin public-route handoff+ presentation in `frontend-modern/src/App.tsx`: compatibility routes such as+ `/pricing` may stay outside authenticated chrome, but they must remain+ minimal handoff shells that defer destination truth to the owning subsystem+ instead of embedding a second copy of public marketing or checkout UI inside+ the product runtime.3. Add feature-specific presentation only when no shared primitive should own it4. Add guardrail tests when a new shared pattern is introduced5. Keep shared platform-connections shell state on the reusable settings boundary: `frontend-modern/src/components/Settings/useSettingsInfrastructurePanelProps.ts`, `frontend-modern/src/components/Settings/InfrastructurePlatformConnectionsSummaryCard.tsx`, and `frontend-modern/src/components/Settings/PlatformConnectionsWorkspace.tsx` must continue to derive provider counts, availability, and shared subtab copy from one infrastructure-settings source instead of creating provider-local summary fetches or VMware-only shell vocabulary.diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex 5b92f939e6..ac67c2acf5 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -1645,13 +1645,14 @@"frontend-modern/src/components/Settings/useRelaySettingsPanelState.ts","frontend-modern/src/pages/CloudPricing.tsx","frontend-modern/src/pages/HostedSignup.tsx",- "frontend-modern/src/pages/PricingV6.tsx",+ "frontend-modern/src/pages/PricingHandoff.tsx","frontend-modern/src/useAppRuntimeState.ts","frontend-modern/src/utils/apiClient.ts","frontend-modern/src/utils/cloudPlans.ts","frontend-modern/src/utils/commercialBillingModel.ts","frontend-modern/src/utils/licensePresentation.ts","frontend-modern/src/utils/monitoredSystemPresentation.ts",+ "frontend-modern/src/utils/pricingHandoff.ts","frontend-modern/src/utils/selfHostedPlans.ts","frontend-modern/src/utils/upgradePresentation.ts","internal/api/public_signup_handlers.go",@@ -2170,7 +2171,6 @@"frontend-modern/src/components/Settings/__tests__/ProLicensePanel.test.tsx","frontend-modern/src/pages/__tests__/CloudPricing.test.tsx","frontend-modern/src/pages/__tests__/HostedSignup.test.tsx",- "frontend-modern/src/pages/__tests__/PricingV6.test.tsx","frontend-modern/src/utils/__tests__/selfHostedPlans.test.ts"]},@@ -2229,12 +2229,13 @@},{"id": "pricing-pages",- "label": "pricing page proof",+ "label": "pricing route and page proof","match_prefixes": [],"match_files": ["frontend-modern/src/pages/CloudPricing.tsx","frontend-modern/src/pages/HostedSignup.tsx",- "frontend-modern/src/pages/PricingV6.tsx"+ "frontend-modern/src/pages/PricingHandoff.tsx",+ "frontend-modern/src/utils/pricingHandoff.ts"],"allow_same_subsystem_tests": false,"test_prefixes": [],@@ -2242,7 +2243,8 @@"frontend-modern/src/api/__tests__/hostedSignup.test.ts","frontend-modern/src/pages/__tests__/CloudPricing.test.tsx","frontend-modern/src/pages/__tests__/HostedSignup.test.tsx",- "frontend-modern/src/pages/__tests__/PricingV6.test.tsx"+ "frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx",+ "frontend-modern/src/utils/__tests__/pricingHandoff.test.ts"]}]diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 59379d1880..3f2186a7ab 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -153,6 +153,12 @@ querying, and the operator-facing storage health presentation layer.32. Keep infrastructure summary chart bucketing presentation-only on the adjacent shared API boundary. When `internal/api/router.go` normalizes mixed-cadence infrastructure history into equal-time summary buckets for operator-facing summary cards, storage and recovery may consume the resulting visual context only; they must not reinterpret those normalized chart samples as recovery freshness windows, backup cadence, or restore evidence.33. Keep workload chart downsampling presentation-only on that same adjacent shared API boundary. When `internal/api/router.go` caps mixed-cadence workload history into equal-time buckets for operator-facing workload cards, storage and recovery may consume the resulting visual context only; they must not reinterpret those shaped chart samples as recovery freshness windows, backup cadence, or restore evidence.34. Keep storage and recovery websocket reads on the neutral app-runtime boundary. `frontend-modern/src/components/Recovery/RecoveryPointDetails.tsx`, `frontend-modern/src/components/Storage/useStoragePageResources.ts`, and storage/recovery-adjacent dashboard composition may consume live websocket state only through `frontend-modern/src/contexts/appRuntime.ts`, not by importing `frontend-modern/src/App.tsx` or rebuilding shell-local providers.+35. Keep shared `frontend-modern/src/App.tsx` public-route ownership explicit by+ surface. Storage/recovery preview entrypoints such as+ `/preview/setup-complete` may remain public app-shell routes, but unrelated+ commercial compatibility handoffs like `/pricing` must stay separate thin+ route exits rather than borrowing storage/recovery preview framing,+ first-session copy, or page-state assumptions.## Forbidden Pathsdiff --git a/frontend-modern/src/App.tsx b/frontend-modern/src/App.tsxindex 3181b3762f..d6ecf230bd 100644--- a/frontend-modern/src/App.tsx+++ b/frontend-modern/src/App.tsx@@ -72,7 +72,7 @@ const AIIntelligencePage = lazy(() =>import('./pages/AIIntelligence').then((module) => ({ default: module.AIIntelligence })),);const NotFoundPage = lazy(() => import('./pages/NotFound'));-const PricingPage = lazy(() => import('./pages/PricingV6'));+const PricingHandoffPage = lazy(() => import('./pages/PricingHandoff'));const CloudPricingPage = lazy(() => import('./pages/CloudPricing'));const HostedSignupPage = lazy(() => import('./pages/HostedSignup'));const OperationsPage = lazy(() => import('./pages/Operations'));@@ -431,7 +431,7 @@ function App() {// Use Router with routesreturn (<Router root={RootLayout}>- <Route path="/pricing" component={PricingPage} />+ <Route path="/pricing" component={PricingHandoffPage} /><Route path="/cloud" component={CloudPricingPage} /><Route path="/cloud/signup" component={HostedSignupPage} /><Route path="/preview/setup-complete" component={SetupCompletionPreviewPage} />diff --git a/frontend-modern/src/__tests__/App.architecture.test.ts b/frontend-modern/src/__tests__/App.architecture.test.tsindex c3d32a91fa..a65a5a1a05 100644--- a/frontend-modern/src/__tests__/App.architecture.test.ts+++ b/frontend-modern/src/__tests__/App.architecture.test.ts@@ -22,11 +22,16 @@ describe('App architecture', () => {expect(appSource).toContain('const ROOT_DASHBOARD_PATH = DASHBOARD_PATH;');expect(appSource).toContain('<Route path={ROOT_DASHBOARD_PATH} component={DashboardPage} />');expect(appSource).toContain('<Route path="/" component={() => <Navigate href={ROOT_DASHBOARD_PATH} />} />');+ expect(appSource).toContain(+ "const PricingHandoffPage = lazy(() => import('./pages/PricingHandoff'));",+ );+ expect(appSource).toContain('<Route path="/pricing" component={PricingHandoffPage} />');expect(appSource).toContain("const StoragePage = lazy(() => import('./pages/Storage'));");expect(appSource).toContain("const OperationsPage = lazy(() => import('./pages/Operations'));");expect(appSource).not.toContain("const StorageComponent = lazy(() => import('./components/Storage/Storage'));",);+ expect(appSource).not.toContain("const PricingPage = lazy(() => import('./pages/PricingV6'));");expect(appSource).not.toContain('function ConnectionStatusBadge(');expect(appSource).not.toContain('function AppLayout(');expect(appSource).not.toContain('export const WebSocketContext = createContext<');diff --git a/frontend-modern/src/pages/CloudPricing.tsx b/frontend-modern/src/pages/CloudPricing.tsxindex 74eb02a998..babbec3af0 100644--- a/frontend-modern/src/pages/CloudPricing.tsx+++ b/frontend-modern/src/pages/CloudPricing.tsx@@ -10,6 +10,7 @@ import {getCloudPlanPricePresentation,type CloudPlanDefinition,} from '@/utils/cloudPlans';+import { getPublicPricingUrl } from '@/utils/pricingHandoff';function CloudTierCard(props: { tier: CloudPlanDefinition }) {const t = props.tier;@@ -133,9 +134,12 @@ export default function CloudPricing() {</span><span>Prefer self-hosting?{' '}- <A href="/pricing" class="text-blue-600 hover:underline dark:text-blue-400">+ <a+ href={getPublicPricingUrl()}+ class="text-blue-600 hover:underline dark:text-blue-400"+ >See self-hosted plans- </A>+ </a></span><span>Managing multiple clients?{' '}diff --git a/frontend-modern/src/pages/PricingHandoff.tsx b/frontend-modern/src/pages/PricingHandoff.tsxnew file mode 100644index 0000000000..613e9f16ca--- /dev/null+++ b/frontend-modern/src/pages/PricingHandoff.tsx@@ -0,0 +1,41 @@+import { Navigate, useLocation } from '@solidjs/router';+import { Show, createMemo, onMount } from 'solid-js';+import { trackPaywallViewed } from '@/utils/upgradeMetrics';+import {+ getPricingRouteDestination,+ handoffToExternalPricing,+ isExternalPricingDestination,+} from '@/utils/pricingHandoff';++export default function PricingHandoff() {+ const location = useLocation();+ const destination = createMemo(() => getPricingRouteDestination(location.search));+ const externalDestination = createMemo(() => isExternalPricingDestination(destination()));++ onMount(() => {+ trackPaywallViewed('pricing', 'pricing_handoff');+ if (externalDestination()) {+ handoffToExternalPricing(destination());+ }+ });++ return (+ <Show when={externalDestination()} fallback={<Navigate href={destination()} />}>+ <div class="flex min-h-[50vh] items-center justify-center">+ <div class="space-y-2 text-center">+ <h1 class="text-lg font-semibold text-base-content">Redirecting to pricing</h1>+ <p class="text-sm text-muted">+ If the handoff does not start automatically,{' '}+ <a+ href={destination()}+ class="text-blue-600 hover:underline dark:text-blue-400"+ >+ continue to the public pricing site+ </a>+ .+ </p>+ </div>+ </div>+ </Show>+ );+}diff --git a/frontend-modern/src/pages/PricingV6.tsx b/frontend-modern/src/pages/PricingV6.tsxdeleted file mode 100644index fc4f6db5b3..0000000000--- a/frontend-modern/src/pages/PricingV6.tsx+++ /dev/null@@ -1,407 +0,0 @@-import { For, Show, createMemo, createSignal, onMount } from 'solid-js';-import { Card } from '@/components/shared/Card';-import {- Table,- TableHeader,- TableBody,- TableRow,- TableHead,- TableCell,-} from '@/components/shared/Table';-import { PageHeader } from '@/components/shared/PageHeader';-import { trackPaywallViewed } from '@/utils/upgradeMetrics';-import {- entitlements,- getUpgradeActionUrlOrFallback,- loadLicenseStatus,-} from '@/stores/license';-import { showToast } from '@/utils/toast';-import { logger } from '@/utils/logger';-import { getTrialStartErrorKind } from '@/utils/upgradePresentation';-import {- SELF_HOSTED_COMMERCIAL_PRESENTATION,- SELF_HOSTED_FEATURE_ROWS,- SELF_HOSTED_PLAN_BY_TIER,- type SelfHostedFeatureRow,- type SelfHostedPlanDefinition,- type SelfHostedTierKey,-} from '@/utils/selfHostedPlans';-import { runStartProTrialAction } from '@/utils/trialStartAction';--// ----------------------------------------------------------------------------// Shared sub-components-// -----------------------------------------------------------------------------function TierCtaButton(props: { children: string; disabled?: boolean; onClick?: () => void }) {- return (- <button- class={[- 'w-full inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-semibold transition-colors',- props.disabled- ? 'bg-surface-hover text-base-content cursor-not-allowed'- : 'bg-blue-600 text-white hover:bg-blue-700',- ].join(' ')}- disabled={props.disabled}- onClick={props.onClick}- type="button"- >- {props.children}- </button>- );-}--function TierCtaLabel(props: { children: string }) {- return (- <div class="w-full inline-flex items-center justify-center rounded-md border border-border bg-surface px-4 py-2 text-sm font-semibold text-base-content">- {props.children}- </div>- );-}--function CheckCell(props: {- value: boolean | string;- tier: SelfHostedTierKey;- featureKey: string;-}) {- if (typeof props.value === 'string') {- const label = `${props.tier} tier: ${props.value}`;- return (- <span- class="inline-flex w-full justify-center text-sm font-semibold text-base-content"- aria-label={label}- title={label}- >- {props.value}- </span>- );- }-- const label = props.value- ? `Included in ${props.tier} tier`- : `Not included in ${props.tier} tier`;- return (- <span- class={[- 'inline-flex w-full justify-center text-sm font-semibold',- props.value ? 'text-emerald-700 dark:text-emerald-300' : 'text-muted',- ].join(' ')}- aria-label={label}- title={label}- >- {props.value ? '✓' : '—'}- </span>- );-}--function BulletList(props: { items: readonly string[] }) {- return (- <ul class="mt-4 space-y-2 text-sm text-base-content">- <For each={props.items}>- {(item) => (- <li class="flex gap-2">- <span class="text-blue-700 dark:text-blue-300 shrink-0">•</span>- <span>{item}</span>- </li>- )}- </For>- </ul>- );-}--// ----------------------------------------------------------------------------// Tier cards-// -----------------------------------------------------------------------------function TierCard(props: {- tier: SelfHostedPlanDefinition;- cta: () => import('solid-js').JSX.Element;- highlighted?: boolean;- badge?: string;- message?: string | null;-}) {- return (- <Card- padding="lg"- class={- props.highlighted- ? 'relative overflow-hidden ring-2 ring-blue-600 dark:ring-blue-500 border-blue-200 dark:border-blue-900'- : 'relative'- }- >- <Show when={props.badge}>- <div class="absolute right-4 top-4">- <span class="inline-flex items-center rounded-full bg-blue-600 px-2.5 py-1 text-[11px] font-semibold text-white shadow-sm">- {props.badge}- </span>- </div>- </Show>-- <h2 class="text-lg font-semibold text-base-content">{props.tier.name}</h2>- <div class="mt-2 text-3xl font-semibold tracking-tight text-base-content">- {props.tier.price}- </div>- <div class="mt-1 text-sm text-muted">{props.tier.subline}</div>-- <BulletList items={props.tier.highlights} />-- <div class="mt-6 space-y-2">- {props.cta()}- <Show when={props.message}>- <div class="text-xs text-amber-700 dark:text-amber-300">{props.message}</div>- </Show>- </div>- </Card>- );-}--// ----------------------------------------------------------------------------// Main page component-// -----------------------------------------------------------------------------export default function PricingV6() {- const subscriptionState = createMemo(() => entitlements()?.subscription_state ?? '');- const currentTier = createMemo(() => entitlements()?.tier ?? 'free');- const isActiveOrTrial = createMemo(- () => subscriptionState() === 'active' || subscriptionState() === 'trial',- );-- const [trialCtaMode, setTrialCtaMode] = createSignal<'trial' | 'upgrade'>('trial');- const [startingTrial, setStartingTrial] = createSignal(false);- const [trialMessage, setTrialMessage] = createSignal<string | null>(null);-- onMount(() => {- trackPaywallViewed('pricing', 'pricing_v6');- void loadLicenseStatus().catch((error) => {- logger.debug('[PricingV6] Failed to load license status on mount', error);- });- });-- const startTrial = async () => {- if (startingTrial()) return;- setTrialMessage(null);- setStartingTrial(true);-- try {- const outcome = await runStartProTrialAction({- successMessage: 'Pro trial started (14 days).',- showSuccess: (message) => showToast('success', message),- showError: setTrialMessage,- onError: (error) => {- if (getTrialStartErrorKind(error) === 'already_used') {- setTrialCtaMode('upgrade');- }- logger.warn('[PricingV6] Trial start request failed', error);- },- });- if (outcome === 'activated') {- await loadLicenseStatus(true);- }- } finally {- setStartingTrial(false);- }- };-- // -- CTAs per tier ---- // Normalize backend tier strings to pricing-page columns.- // pro_annual and lifetime map to "pro"; expired/no-subscription maps to "free".- const normalizedTier = createMemo(() => {- if (!isActiveOrTrial()) return 'free';- const raw = currentTier();- if (raw === 'pro_annual' || raw === 'lifetime') return 'pro';- return raw;- });-- const isCurrentTier = (tier: string) => normalizedTier() === tier;-- const communityCta = createMemo(() => {- if (isCurrentTier('free')) {- return <TierCtaButton disabled>{SELF_HOSTED_COMMERCIAL_PRESENTATION.currentPlanLabel}</TierCtaButton>;- }- return <TierCtaLabel>{SELF_HOSTED_COMMERCIAL_PRESENTATION.freeLabel}</TierCtaLabel>;- });-- // Tier rank for comparison — higher rank = higher tier.- const TIER_RANK: Record<string, number> = {- free: 0,- relay: 1,- pro: 2,- pro_plus: 3,- cloud: 4,- msp: 5,- enterprise: 6,- };-- // Whether the user is eligible for a trial — backend provides this directly.- const canStartTrial = createMemo(() => entitlements()?.trial_eligible === true);-- const relayCta = createMemo(() => {- if (isCurrentTier('relay')) {- return <TierCtaButton disabled>{SELF_HOSTED_COMMERCIAL_PRESENTATION.currentPlanLabel}</TierCtaButton>;- }- // Users already on a higher tier don't need a Relay CTA.- if ((TIER_RANK[normalizedTier()] ?? 0) > (TIER_RANK['relay'] ?? 0)) {- return <TierCtaLabel>{SELF_HOSTED_COMMERCIAL_PRESENTATION.includedLabel}</TierCtaLabel>;- }- return (- <a- class="w-full inline-flex items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-blue-700"- href={getUpgradeActionUrlOrFallback('relay')}- target="_blank"- rel="noopener noreferrer"- >- {SELF_HOSTED_COMMERCIAL_PRESENTATION.buyRelayLabel}- </a>- );- });-- const proTrialOrUpgrade = createMemo(() => {- if (isCurrentTier('pro')) {- return <TierCtaButton disabled>{SELF_HOSTED_COMMERCIAL_PRESENTATION.currentPlanLabel}</TierCtaButton>;- }- // Users already on a higher tier don't need a Pro CTA.- if ((TIER_RANK[normalizedTier()] ?? 0) > (TIER_RANK['pro'] ?? 0)) {- return <TierCtaLabel>{SELF_HOSTED_COMMERCIAL_PRESENTATION.includedLabel}</TierCtaLabel>;- }-- if (canStartTrial() && trialCtaMode() !== 'upgrade') {- return (- <TierCtaButton disabled={startingTrial()} onClick={startTrial}>- {SELF_HOSTED_COMMERCIAL_PRESENTATION.startTrialLabel}- </TierCtaButton>- );- }-- return (- <a- class="w-full inline-flex items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-blue-700"- href={getUpgradeActionUrlOrFallback('upgrade')}- target="_blank"- rel="noopener noreferrer"- >- {SELF_HOSTED_COMMERCIAL_PRESENTATION.upgradeToProLabel}- </a>- );- });-- const proPlusCta = createMemo(() => {- if (isCurrentTier('pro_plus')) {- return <TierCtaButton disabled>{SELF_HOSTED_COMMERCIAL_PRESENTATION.currentPlanLabel}</TierCtaButton>;- }- // Users already on a higher tier don't need a Pro+ CTA.- if ((TIER_RANK[normalizedTier()] ?? 0) > (TIER_RANK['pro_plus'] ?? 0)) {- return <TierCtaLabel>{SELF_HOSTED_COMMERCIAL_PRESENTATION.includedLabel}</TierCtaLabel>;- }-- if (canStartTrial() && trialCtaMode() !== 'upgrade') {- return (- <TierCtaButton disabled={startingTrial()} onClick={startTrial}>- {SELF_HOSTED_COMMERCIAL_PRESENTATION.startTrialLabel}- </TierCtaButton>- );- }-- return (- <a- class="w-full inline-flex items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-blue-700"- href={getUpgradeActionUrlOrFallback('upgrade')}- target="_blank"- rel="noopener noreferrer"- >- {SELF_HOSTED_COMMERCIAL_PRESENTATION.upgradeToProPlusLabel}- </a>- );- });-- // -- Render ---- return (- <div class="space-y-6">- <PageHeader- title={SELF_HOSTED_COMMERCIAL_PRESENTATION.pageTitle}- description={SELF_HOSTED_COMMERCIAL_PRESENTATION.pageDescription}- />-- {/* Tier cards — 4 columns on desktop, 2 on tablet, 1 on mobile */}- <div class="grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4">- <TierCard tier={SELF_HOSTED_PLAN_BY_TIER.community} cta={communityCta} />- <TierCard tier={SELF_HOSTED_PLAN_BY_TIER.relay} cta={relayCta} />- <TierCard- tier={SELF_HOSTED_PLAN_BY_TIER.pro}- cta={proTrialOrUpgrade}- highlighted- badge={SELF_HOSTED_COMMERCIAL_PRESENTATION.mostPopularBadge}- message={trialMessage()}- />- <TierCard tier={SELF_HOSTED_PLAN_BY_TIER.proPlus} cta={proPlusCta} />- </div>-- {/* Upsell links */}- <div class="flex flex-wrap items-center justify-center gap-x-6 gap-y-2 text-sm text-muted">- <For each={SELF_HOSTED_COMMERCIAL_PRESENTATION.footerLinks}>- {(link) => (- <span>- {link.preface}{' '}- <a href={link.href} class="text-blue-600 hover:underline dark:text-blue-400">- {link.label}- </a>- </span>- )}- </For>- </div>-- {/* Feature comparison table */}- <Card padding="lg" class="overflow-hidden">- <h2 class="text-base font-semibold text-base-content">- {SELF_HOSTED_COMMERCIAL_PRESENTATION.featureComparisonHeading}- </h2>- <div class="mt-4 overflow-x-auto">- <Table class="min-w-[800px] w-full border-collapse">- <TableHeader>- <TableRow class="bg-surface-alt border-b border-border">- <TableHead class="px-4 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">- Feature- </TableHead>- <TableHead class="px-3 py-2 text-center text-xs font-semibold uppercase tracking-wide text-muted">- Community- </TableHead>- <TableHead class="px-3 py-2 text-center text-xs font-semibold uppercase tracking-wide text-muted">- Relay- </TableHead>- <TableHead class="px-3 py-2 text-center text-xs font-semibold uppercase tracking-wide text-muted">- Pro- </TableHead>- <TableHead class="px-3 py-2 text-center text-xs font-semibold uppercase tracking-wide text-muted">- Pro+- </TableHead>- </TableRow>- </TableHeader>- <TableBody class="bg-surface divide-y divide-border-subtle">- <For each={SELF_HOSTED_FEATURE_ROWS}>- {(row: SelfHostedFeatureRow) => (- <TableRow>- <TableCell class="px-4 py-2">- <div class="text-sm font-medium text-base-content">{row.name}</div>- </TableCell>- <TableCell class="px-3 py-2">- <CheckCell value={row.community} tier="community" featureKey={row.key} />- </TableCell>- <TableCell class="px-3 py-2">- <CheckCell value={row.relay} tier="relay" featureKey={row.key} />- </TableCell>- <TableCell class="px-3 py-2">- <CheckCell value={row.pro} tier="pro" featureKey={row.key} />- </TableCell>- <TableCell class="px-3 py-2">- <CheckCell value={row.proPlus} tier="proPlus" featureKey={row.key} />- </TableCell>- </TableRow>- )}- </For>- </TableBody>- </Table>- </div>- </Card>- </div>- );-}diff --git a/frontend-modern/src/pages/__tests__/CloudPricing.test.tsx b/frontend-modern/src/pages/__tests__/CloudPricing.test.tsxindex 57a599cf4c..2fd217686d 100644--- a/frontend-modern/src/pages/__tests__/CloudPricing.test.tsx+++ b/frontend-modern/src/pages/__tests__/CloudPricing.test.tsx@@ -42,6 +42,10 @@ describe('CloudPricing', () => {screen.getByText('Create your workspace. No credit card is required for the trial.'),).toBeInTheDocument();expect(screen.getByText('Setup')).toBeInTheDocument();+ expect(screen.getByRole('link', { name: 'See self-hosted plans' })).toHaveAttribute(+ 'href',+ 'https://pulserelay.pro/pricing?utm_source=pulse&utm_medium=app&utm_campaign=upgrade',+ );expect(screen.queryByText(/provisioned in under 60 seconds/i),).not.toBeInTheDocument();diff --git a/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx b/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsxnew file mode 100644index 0000000000..6c8b0f09b0--- /dev/null+++ b/frontend-modern/src/pages/__tests__/PricingHandoff.test.tsx@@ -0,0 +1,70 @@+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import { cleanup, render, screen, waitFor } from '@solidjs/testing-library';+import { Route, Router } from '@solidjs/router';+import PricingHandoff from '@/pages/PricingHandoff';++const trackPaywallViewedMock = vi.fn();+const handoffToExternalPricingMock = vi.fn();++vi.mock('@/utils/upgradeMetrics', () => ({+ trackPaywallViewed: (...args: unknown[]) => trackPaywallViewedMock(...args),+}));++vi.mock('@/utils/pricingHandoff', async () => {+ const actual = await vi.importActual<typeof import('@/utils/pricingHandoff')>(+ '@/utils/pricingHandoff',+ );+ return {+ ...actual,+ handoffToExternalPricing: (...args: unknown[]) => handoffToExternalPricingMock(...args),+ };+});++describe('PricingHandoff', () => {+ beforeEach(() => {+ trackPaywallViewedMock.mockReset();+ handoffToExternalPricingMock.mockReset();+ window.scrollTo = vi.fn();+ });++ afterEach(() => {+ cleanup();+ window.history.replaceState({}, '', '/');+ });++ it('hands public pricing requests off to the website', async () => {+ window.history.replaceState({}, '', '/pricing?feature=relay');++ render(() => (+ <Router>+ <Route path="/pricing" component={PricingHandoff} />+ </Router>+ ));++ await waitFor(() => {+ expect(handoffToExternalPricingMock).toHaveBeenCalledWith(+ 'https://pulserelay.pro/pricing?utm_source=pulse&utm_medium=app&utm_campaign=upgrade&feature=relay',+ );+ });++ expect(screen.getByRole('heading', { name: 'Redirecting to pricing' })).toBeInTheDocument();+ expect(screen.getByRole('link', { name: /continue to the public pricing site/i })).toHaveAttribute(+ 'href',+ 'https://pulserelay.pro/pricing?utm_source=pulse&utm_medium=app&utm_campaign=upgrade&feature=relay',+ );+ });++ it('keeps monitored-system pricing handoffs inside the product', async () => {+ window.history.replaceState({}, '', '/pricing?feature=max_monitored_systems');++ render(() => (+ <Router>+ <Route path="/pricing" component={PricingHandoff} />+ <Route path="/settings/system/billing" component={() => <div>Billing destination</div>} />+ </Router>+ ));++ expect(await screen.findByText('Billing destination')).toBeInTheDocument();+ expect(handoffToExternalPricingMock).not.toHaveBeenCalled();+ });+});diff --git a/frontend-modern/src/pages/__tests__/PricingV6.test.tsx b/frontend-modern/src/pages/__tests__/PricingV6.test.tsxdeleted file mode 100644index 04e1e5960c..0000000000--- a/frontend-modern/src/pages/__tests__/PricingV6.test.tsx+++ /dev/null@@ -1,135 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';-import { fireEvent, render, screen, waitFor } from '@solidjs/testing-library';-import type { JSX } from 'solid-js';--import PricingV6 from '../PricingV6';-import pricingV6Source from '../PricingV6.tsx?raw';--const entitlementsState = {- subscription_state: 'expired',- tier: 'free',- trial_eligible: false,-};-const startProTrialMock = vi.fn();-const loadLicenseStatusMock = vi.fn().mockResolvedValue(undefined);-const showToastMock = vi.fn();--vi.mock('@/components/shared/Card', () => ({- Card: (props: { children?: JSX.Element }) => <div>{props.children}</div>,-}));--vi.mock('@/components/shared/Table', () => ({- Table: (props: { children?: JSX.Element }) => <table>{props.children}</table>,- TableHeader: (props: { children?: JSX.Element }) => <thead>{props.children}</thead>,- TableBody: (props: { children?: JSX.Element }) => <tbody>{props.children}</tbody>,- TableRow: (props: { children?: JSX.Element }) => <tr>{props.children}</tr>,- TableHead: (props: { children?: JSX.Element }) => <th>{props.children}</th>,- TableCell: (props: { children?: JSX.Element }) => <td>{props.children}</td>,-}));--vi.mock('@/components/shared/PageHeader', () => ({- PageHeader: (props: { title: string; description: string }) => (- <header>- <h1>{props.title}</h1>- <p>{props.description}</p>- </header>- ),-}));--vi.mock('@/stores/license', () => ({- entitlements: () => entitlementsState,- getUpgradeActionUrlOrFallback: (tier: string) => `/${tier}`,- loadLicenseStatus: (...args: unknown[]) => loadLicenseStatusMock(...args),- startProTrial: (...args: unknown[]) => startProTrialMock(...args),-}));--vi.mock('@/utils/upgradeMetrics', () => ({- trackPaywallViewed: vi.fn(),-}));--vi.mock('@/utils/toast', () => ({- showToast: (...args: unknown[]) => showToastMock(...args),-}));--vi.mock('@/utils/logger', () => ({- logger: {- debug: vi.fn(),- warn: vi.fn(),- },-}));--describe('PricingV6', () => {- beforeEach(() => {- entitlementsState.subscription_state = 'expired';- entitlementsState.tier = 'free';- entitlementsState.trial_eligible = false;- startProTrialMock.mockReset();- loadLicenseStatusMock.mockReset();- loadLicenseStatusMock.mockResolvedValue(undefined);- showToastMock.mockReset();- });-- it('renders self-hosted plan tiers from the shared pricing model', () => {- render(() => <PricingV6 />);-- expect(screen.getAllByText('Community').length).toBeGreaterThan(0);- expect(screen.getAllByText('Relay').length).toBeGreaterThan(0);- expect(screen.getAllByText('Pro').length).toBeGreaterThan(0);- expect(screen.getAllByText('Pro+').length).toBeGreaterThan(0);- expect(- screen.getByText(- 'Core monitoring stays free. Relay adds remote access, and Pro unlocks AI operations.',- ),- ).toBeInTheDocument();- expect(screen.getByText('AI Patrol (BYOK)')).toBeInTheDocument();- expect(- screen.getByText('Patrol quickstart after activation or trial: 25 runs, no API key'),- ).toBeInTheDocument();- expect(screen.getByText('8 monitored systems · 14-day history')).toBeInTheDocument();- expect(screen.getByText('15 monitored systems')).toBeInTheDocument();- expect(screen.getByText('50 monitored systems')).toBeInTheDocument();- expect(screen.getByText('Feature Comparison')).toBeInTheDocument();- expect(screen.getByText('Most Popular')).toBeInTheDocument();- expect(screen.getByRole('link', { name: 'See Cloud plans' })).toHaveAttribute('href', '/cloud');- expect(screen.getByRole('link', { name: 'See MSP plans' })).toHaveAttribute(- 'href',- 'mailto:[email protected]?subject=Pulse%20MSP%20Inquiry',- );- expect(- screen.queryByText('Billing is based on monitored systems. Child resources are included.'),- ).not.toBeInTheDocument();- expect(screen.queryByRole('button', { name: 'View counting rules' })).not.toBeInTheDocument();- });-- it('imports the shared self-hosted pricing model instead of redefining it locally', () => {- expect(pricingV6Source).toContain("@/utils/selfHostedPlans");- expect(pricingV6Source).toContain("@/utils/upgradePresentation");- expect(pricingV6Source).toContain("@/utils/trialStartAction");- expect(pricingV6Source).not.toContain('const TIERS =');- expect(pricingV6Source).not.toContain('const FEATURE_ROWS');- expect(pricingV6Source).not.toContain("setTrialMessage('Trial already used.')");- expect(pricingV6Source).not.toContain('startProTrial()');- });-- it('switches Pro pricing CTA to upgrade when trial is already used', async () => {- entitlementsState.trial_eligible = true;- startProTrialMock.mockRejectedValue({- status: 409,- code: 'trial_already_used',- message: 'Trial already used',- });-- render(() => <PricingV6 />);-- fireEvent.click(screen.getAllByRole('button', { name: 'Start Free 14-day Trial' })[0]);-- await waitFor(() => {- expect(screen.getByText('Trial already used')).toBeInTheDocument();- });-- expect(screen.getByRole('link', { name: 'Upgrade to Pro' })).toHaveAttribute(- 'href',- '/upgrade',- );- });-});diff --git a/frontend-modern/src/stores/license.ts b/frontend-modern/src/stores/license.tsindex abb86e387b..09adf17af9 100644--- a/frontend-modern/src/stores/license.ts+++ b/frontend-modern/src/stores/license.ts@@ -6,6 +6,10 @@ import {} from '@/api/license';import { eventBus } from '@/stores/events';import { logger } from '@/utils/logger';+import {+ getInProductPricingDestination,+ getUpgradeFallbackDestination,+} from '@/utils/pricingHandoff';// Reactive signals for entitlements (canonical gating source).const [entitlements, setEntitlements] = createSignal<LicenseEntitlements | null>(null);@@ -183,37 +187,12 @@ export function getFirstUpgradeActionUrl(): string | undefined {return current?.upgrade_reasons?.[0]?.action_url;}-const DEFAULT_PUBLIC_UPGRADE_URL =- 'https://pulserelay.pro/pricing?utm_source=pulse&utm_medium=app&utm_campaign=upgrade';--const IN_PRODUCT_UPGRADE_FALLBACKS: Record<string, string> = {- // Limit-driven upsells should land on billing/usage so operators can see- // the counted-system ledger before choosing how to expand capacity.- max_monitored_systems: '/settings/system/billing',- cloud: '/cloud',-};--function getInProductUpgradeFallback(key: string): string | undefined {- return IN_PRODUCT_UPGRADE_FALLBACKS[key];-}--function getPublicUpgradeFallback(key: string): string {- const normalizedKey = key.trim();- const url = new URL(DEFAULT_PUBLIC_UPGRADE_URL);- if (normalizedKey) {- // Keep frontend fallbacks aligned with the canonical public pricing origin- // used by pkg/licensing when entitlement-specific action URLs are missing.- url.searchParams.set('feature', normalizedKey);- }- return url.toString();-}-export function getUpgradeActionUrlOrFallback(key: string): string {return (getUpgradeActionUrl(key) ||- getInProductUpgradeFallback(key) ||+ getInProductPricingDestination(key) ||getFirstUpgradeActionUrl() ||- getPublicUpgradeFallback(key)+ getUpgradeFallbackDestination(key));}diff --git a/frontend-modern/src/utils/__tests__/pricingHandoff.test.ts b/frontend-modern/src/utils/__tests__/pricingHandoff.test.tsnew file mode 100644index 0000000000..d92da12b8f--- /dev/null+++ b/frontend-modern/src/utils/__tests__/pricingHandoff.test.ts@@ -0,0 +1,50 @@+import { describe, expect, it } from 'vitest';+import {+ getPricingRouteDestination,+ getPublicPricingUrl,+ getUpgradeFallbackDestination,+ isExternalPricingDestination,+} from '@/utils/pricingHandoff';++describe('pricingHandoff', () => {+ it('routes product-owned monitored-system pricing links to billing', () => {+ expect(getUpgradeFallbackDestination('max_monitored_systems')).toBe('/settings/system/billing');+ });++ it('routes product-owned cloud pricing links to the in-product cloud page', () => {+ expect(getUpgradeFallbackDestination('cloud')).toBe('/cloud');+ });++ it('routes self-hosted upgrades to the public pricing site', () => {+ expect(getUpgradeFallbackDestination('relay')).toBe(+ 'https://pulserelay.pro/pricing?utm_source=pulse&utm_medium=app&utm_campaign=upgrade&feature=relay',+ );+ });++ it('returns the canonical public pricing URL when no feature is provided', () => {+ expect(getPublicPricingUrl()).toBe(+ 'https://pulserelay.pro/pricing?utm_source=pulse&utm_medium=app&utm_campaign=upgrade',+ );+ });++ it('preserves extra query parameters when handing off the legacy pricing route', () => {+ expect(getPricingRouteDestination('?feature=relay&utm_content=legacy-bookmark')).toBe(+ 'https://pulserelay.pro/pricing?utm_source=pulse&utm_medium=app&utm_campaign=upgrade&feature=relay&utm_content=legacy-bookmark',+ );+ });++ it('keeps internal route exceptions when handing off the legacy pricing route', () => {+ expect(getPricingRouteDestination('?feature=max_monitored_systems')).toBe(+ '/settings/system/billing',+ );+ });++ it('detects external pricing destinations', () => {+ expect(+ isExternalPricingDestination(+ 'https://pulserelay.pro/pricing?utm_source=pulse&utm_medium=app&utm_campaign=upgrade',+ ),+ ).toBe(true);+ expect(isExternalPricingDestination('/cloud')).toBe(false);+ });+});diff --git a/frontend-modern/src/utils/pricingHandoff.ts b/frontend-modern/src/utils/pricingHandoff.tsnew file mode 100644index 0000000000..fa2cdf0075--- /dev/null+++ b/frontend-modern/src/utils/pricingHandoff.ts@@ -0,0 +1,59 @@+const DEFAULT_PUBLIC_PRICING_URL =+ 'https://pulserelay.pro/pricing?utm_source=pulse&utm_medium=app&utm_campaign=upgrade';++const IN_PRODUCT_PRICING_DESTINATIONS: Record<string, string> = {+ max_monitored_systems: '/settings/system/billing',+ cloud: '/cloud',+};++function normalizeFeatureKey(feature: string | null | undefined): string | undefined {+ const normalized = feature?.trim();+ return normalized ? normalized : undefined;+}++export function getInProductPricingDestination(+ feature: string | null | undefined,+): string | undefined {+ const normalizedFeature = normalizeFeatureKey(feature);+ if (!normalizedFeature) return undefined;+ return IN_PRODUCT_PRICING_DESTINATIONS[normalizedFeature];+}++export function getPublicPricingUrl(feature?: string | null): string {+ const url = new URL(DEFAULT_PUBLIC_PRICING_URL);+ const normalizedFeature = normalizeFeatureKey(feature);+ if (normalizedFeature) {+ url.searchParams.set('feature', normalizedFeature);+ }+ return url.toString();+}++export function getUpgradeFallbackDestination(feature?: string | null): string {+ return getInProductPricingDestination(feature) || getPublicPricingUrl(feature);+}++export function getPricingRouteDestination(search: string): string {+ const params = new URLSearchParams(search.startsWith('?') ? search.slice(1) : search);+ const feature = params.get('feature');+ const inProductDestination = getInProductPricingDestination(feature);+ if (inProductDestination) {+ return inProductDestination;+ }++ const url = new URL(DEFAULT_PUBLIC_PRICING_URL);+ for (const [key, value] of params.entries()) {+ const normalizedValue = value.trim();+ if (normalizedValue) {+ url.searchParams.set(key, normalizedValue);+ }+ }+ return url.toString();+}++export function isExternalPricingDestination(destination: string): boolean {+ return /^https?:\/\//.test(destination);+}++export function handoffToExternalPricing(destination: string): void {+ window.location.replace(destination);+}diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.pyindex 64112de0d5..bf6aab4512 100644--- a/scripts/release_control/subsystem_lookup_test.py+++ b/scripts/release_control/subsystem_lookup_test.py@@ -609,8 +609,8 @@ class SubsystemLookupTest(unittest.TestCase):self.assertEqual(match["lane_context"]["lane_id"], "L3")self.assertEqual(match["verification_requirement"]["id"], "pro-license-surface")- def test_lookup_paths_assigns_pricing_v6_to_cloud_paid(self) -> None:- result = lookup_paths(["frontend-modern/src/pages/PricingV6.tsx"])+ def test_lookup_paths_assigns_pricing_handoff_to_cloud_paid(self) -> None:+ result = lookup_paths(["frontend-modern/src/pages/PricingHandoff.tsx"])self.assertEqual(result["unowned_runtime_files"], [])self.assertEqual({item["subsystem"] for item in result["impacted_subsystems"]},