Skip to content

feat(billing): subscription UI, plan limits, checkout recovery and server logging - #278

Merged
Shachindra merged 22 commits into
prodfrom
feat/dodo-payments-integration
Oct 11, 2026
Merged

Shachindra merged 22 commits into
prodfrom
feat/dodo-payments-integration

Conversation

@BunnyPraneeth5

Copy link
Copy Markdown
Member

What

  • Billing UI: plan cards driven by the live gateway catalog, checkout with
    idempotency keys, billing/return confirmation page, workspace billing tab
    (plan, status, next billing date, cancel at period end, resume checkout).
  • Plan limits surfaced: VPN device usage card with pause/manage, Drop
    storage quota preflight + usage, device-limit and plan-ending notices, API
    keys tab gated to Starter+.
  • Checkout recovery: unfinished checkout shows "Resume checkout"; a workspace
    that's already paid offers "Open billing"; stale attempts start a fresh
    checkout (gateway replaces it once the old one is confirmed unpaid).
  • Server logging: production writes JSON lines with an ISO timestamp
    (LOG_FORMAT=text to opt out). Server errors are logged with route and path.
    Each gateway proxy call logs request_id, method, path, status, duration and
    forwards X-Request-ID so a request can be traced across both containers.
  • Scanner noise: requests carrying a Next-Action header get a 404 and one
    log line (the app has no Server Actions) instead of multi-line errors.

Ops notes

  • LOG_FORMAT=text disables JSON logging if plain output is preferred.
  • No new required env vars.

Testing

  • pnpm type-check, pnpm lint, pnpm test (231 tests), production build pass.

BunnyPraneeth5 and others added 22 commits September 10, 2026 22:19
Add planLabel to EffectiveEntitlement, resolved from the winning org's
plan id via orgPlanLabel (e.g. \'Business · Scale\') with a tierLabel
fallback. Consume it on the dashboard, sidebar plan card, wallet menu,
and a new Plan row on the profile page. Workspace and dashboard org
lists now format org.plan/org.kind through orgPlanLabel instead of
rendering the raw id.
Add accentButtonClass/actionButtonClass helpers so links can share the
button look without nesting a button inside an anchor. Billing return
page gets a per-phase status icon and a single consistent action row;
BillingPanel unifies its notice banners and secondary link styling;
subscribe page slims the hero, rebalances columns, and titles the
benefits card. Layout only, no behavior changes.
Presentational /payment/result route rendering a success or failure
card from a status prop. Status resolution is left to the caller; the
page performs no auth, session, or storage access.
Deleted the repo's old dev/prod GitHub Actions workflows that built and pushed Docker images to GHCR and deployed them over SSH via docker compose. These workflows are no longer part of the current deployment flow, so removing them avoids stale automation and duplicate deployment paths.
Only Starter is buyable now, other plans and extra seats show coming soon. Also fixed the assign seat button, profile load errors and hid dev-only sign-in messages in prod.
Older gateways leave out billing_prices, which broke /pricing. Treat it as optional so the page just shows plans as coming soon.
Blocks a second Starter. Buying a business plan next to an existing plan asks for confirmation first.
- Workspace switcher in the header (view only, never changes limits)
- Plan and usage card: devices, Drop storage, API keys, seats
- Clear error messages with next steps (remove device, upgrade, pick node)
- Device list: rename, remove, paused status
- Drop: warns before uploading if a file won't fit; clear share labels
- Billing: what happens after cancel; plan-ending banner and notifications
- Pricing copy lists only features that exist
- Proxy forwards the real user IP; image upload checks login
- Contributor notes on plan limit rules in AGENTS.md
- Dashboard: drop the second plan card; cancel date moves to the sidebar
- Connect: one device-limit box, device-list error only, styled remove dialog
- Drop: show quotas as 1 GB like the gateway
- Admin: change plans only in Admin > Orgs
- Pricing: remove the extra-plan confirm dialog (second Starter is still blocked)
… log gateway proxy calls

- Production server output is JSON with an ISO time (LOG_FORMAT=text to opt out)
- Requests with a Next-Action header get 404 and one short log line (the app has no Server Actions)
- Each gateway proxy call logs request_id, method, path, status and ms, and sends X-Request-ID to the gateway
- Gateway unreachable now returns 502 and is logged
Unfinished checkout offers Resume checkout; an active plan offers Open billing; a stale attempt starts a fresh checkout.
@Shachindra
Shachindra merged commit fc648c9 into prod Oct 11, 2026
10 of 11 checks passed
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.

3 participants