Files
Pulse/internal/cloudcp/portal/frontend
rcourtman 13e90e7833 Stop promising renewal on a cancelled MSP plan
The provider portal's Plan tab told every paying provider their plan
"Renews automatically while your subscription is active", including one
who had just cancelled renewal in Manage billing. The licence the
control plane holds is signed to the paid period end plus grace and
carries no cancellation state, so the portal cannot tell the two apart
until the period ends, when the existing "has not renewed" copy takes
over.

Say what the portal does know instead: the plan's client limit, and that
Manage billing shows when the subscription will renew or end. The test
pins the new copy and forbids the renewal promise.

Found on a Stripe sandbox purchase, upgrade and cancel-at-period-end
walk against a v6.6.0 control plane.

Contract-Neutral: Plan tab copy only; no licence, billing or API behaviour changes
2026-10-25 19:45:21 +00:00
..
2026-03-29 12:25:46 +01:00
2026-03-29 12:25:46 +01:00

Pulse Account Frontend Dev Loop

The production portal is embedded into the control-plane binary, so styling changes do not appear on cloud.pulserelay.pro until the frontend bundle is rebuilt and the control-plane is redeployed.

For local UI work, use the preview server instead of production.

Commands

npm --prefix internal/cloudcp/portal/frontend run dev

This does three things:

  • builds the current portal frontend with the same esbuild pipeline used for production
  • watches internal/cloudcp/portal/frontend/src
  • serves a local preview at http://127.0.0.1:8765

Preview URLs

  • Managed hosted account: http://127.0.0.1:8765/?scenario=managed
  • Read-only hosted account: http://127.0.0.1:8765/?scenario=readonly
  • Self-hosted commercial account: http://127.0.0.1:8765/?scenario=selfhosted
  • Empty hosted account: http://127.0.0.1:8765/?scenario=empty

Append &reset=1 to reset a scenario back to its seed state.

The preview server keeps scenario state in memory and stubs the main portal APIs so you can exercise:

  • workspace create/suspend/delete
  • access invite/change-role/remove
  • hosted billing handoff
  • self-hosted billing/license/privacy flows

The preview server is intentionally local-only. It is for design and interaction iteration, not for validating production credentials or external services.

Production Build

When the UI is ready to ship, rebuild the embedded bundle:

npm --prefix internal/cloudcp/portal/frontend run build

That updates:

  • internal/cloudcp/portal/dist/portal_app.js
  • internal/cloudcp/portal/dist/portal_app.css
  • internal/cloudcp/portal/dist/build_manifest.json

After that, rebuild and deploy the control-plane binary/image to see the change on the live portal.

Functional Caveat

The preview harness is good for local front-end iteration, but it is still a harness. Final verification for auth, live account state, Stripe, and production data should happen against a real control-plane instance before shipping.