Skip to content

fix(web): show plan changes once the provider confirms them - #125

Merged
clbotdev merged 1 commit into
mainfrom
issue-66-billing-ui-fixes
Oct 25, 2026
Merged

clbotdev merged 1 commit into
mainfrom
issue-66-billing-ui-fixes

Conversation

@clbotdev

Copy link
Copy Markdown
Contributor

Part of #66. Two bugs on the Plan tab, found in a browser test on QA using Dodo test payments.

  • Plan changes looked stuck. After an immediate plan change (Starter → Pro, Pro → Business yearly), the Plan tab kept showing the old plan, with Change plan disabled, until a manual reload. The change waits for the provider's webhook, and the page only read billing once, before the webhook arrived. The page now re-reads billing every 2 seconds while an immediate change is pending (for up to 90 seconds), then reloads the details so the limits update. The plan card also shows the "Plan change to … is being confirmed" banner, which before appeared only on the Teams tab.
  • Wrong Free-plan text. The scheduled-cancellation note said the organization "moves to Free: 1 active team, 1,000 subscribed contacts, and 3,000 sends per month". Free contacts are unlimited (ADR 0003). The note no longer repeats Free's limits, so it can't go out of date again.

Tests

  • New page test: a pending change shows the banner and a disabled Change plan; once billing confirms the change, the page shows the new plan without a reload. The test waits with real sleeps, because Testing Library's waitFor stalls the page's poll timer under Bun.
  • bun --filter @sendlit/web test: 96 pass.
  • bun run lint and the web typecheck: clean.

The browser check on QA follows once this is merged and the v0.0.0 tag is moved.

After an immediate plan change the Plan tab kept showing the old plan,
with Change plan disabled, until a manual reload. The page now re-reads
billing every two seconds while the change is pending (up to 90 seconds)
and shows the pending-change banner on the plan card too.

The scheduled-cancellation note no longer restates Free's limits; it
said 1,000 subscribed contacts, but Free contacts are unlimited.

Part of #66.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants