mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-12-02 10:09:02 +01:00
## Why `FEATURE_REQUESTS.md` tracked 45 paying installs (39 migrated v5 + 6 new v6 buyers) still running the public Community binary because switching onto the private Pulse Pro runtime forced operators out to `pulserelay.pro/download.html` to reinstall manually — even though the backend switch endpoints (`GET /api/updates/pro-runtime` and `POST /api/updates/pro-runtime/apply`) were already built and tested on `main`. ## What changed - **API client (`frontend-modern/src/api/updates.ts`):** Added typed `ProRuntimeSwitch` / `ProRuntimeSwitchReason` and `UpdatesAPI.checkProRuntimeSwitch` / `UpdatesAPI.applyProRuntimeSwitch`. - **Shared Docker login sanitizer (`frontend-modern/src/components/Settings/updatesSettingsModel.ts`):** Exported `getBrokerRegistryLoginPrompt` so the runtime switch reuses the exact password-free registry login sanitizer from Pro container updates. - **Plans & Billing state & UI (`useProLicensePanelState.ts`, `ProLicensePlanSection.tsx`, `ProLicensePanel.tsx`):** Automatically queries `GET /api/updates/pro-runtime` whenever `hasPulseProRuntimeMismatch` is true and renders: - **In-place installs (`installInPlace: true`):** One-click **Switch to Pulse Pro** button calling `POST /api/updates/pro-runtime/apply` with live `/api/updates/status` progress bar, restart/reconnect refresh, and inline error/retry handling. - **Docker installs (`docker` present):** Inline copyable digest-pinned `composePullCommand` and `composeUpCommand` blocks plus sanitized `docker login` prompt. - **Refusal reasons & transient errors:** Clear per-reason copy (`older_release`, `prerelease_only`, `source_build`, `unsupported_deployment`, `not_eligible`, `unavailable`) with `Check again` retry and `Open Pulse Pro downloads` fallback. - **Tests, contracts & browser receipt:** Added tests in `updates.test.ts`, `ProLicensePanel.test.tsx`, `ProLicensePlanSectionRuntimeSwitch.test.tsx`, and `settingsArchitecture.test.ts`; updated `api-contracts.md`, `deployment-installability.md`, `cloud-paid.md`, and `frontend-primitives.md`; recorded a verified Playwright receipt. ## Verification - `pulse-dev-validate`: Vitest passed across `updates.test.ts`, `ProLicensePanel.test.tsx`, `ProLicensePlanSectionTrial.test.tsx`, `ProLicensePlanSectionRuntimeSwitch.test.tsx`, and `settingsArchitecture.test.ts`. - `pulse-dev-validate`: full `npm run lint`, `npm run type-check`, `npm run build`, and Go binary build passed. - `pulse-dev-validate`: live Playwright verification on `/settings/pulse-intelligence/billing/plan` across Desktop (`1440x900`) and Mobile (`390x844`) covering in-place switch ready/progress/409-error, Docker commands with overflow & secret-redaction checks, and `unavailable` retry with native screenshot inspection. - `pulse-dev-validate`: canonical `.husky/pre-commit`, `commit-msg`, and `.husky/pre-push` gates passed.