Repository navigation
[backport cloud/1.49] FE-1251 feat: add flagged payment recovery UI - #14800
Merged
Merged
Conversation
## Summary Adds the independently flagged frontend slice for Payment Recovery US1 and US3: unattended renewal-failure visibility and role-safe paused-workspace run recovery, without depending on #14091. ### Root cause and why this is needed Payment recovery states were coupled to `billing_control_enabled`, which is the rollout control for existing out-of-credits and subscription-ending notices. Paused workspaces also fell through the generic inactive path, replacing the entire queue group with `Subscribe to Run`. This hid batch/queue controls and exposed generic subscription/payment language to members instead of the required role-safe recovery UX. ### How this changes - Adds the authenticated server flag key `v1_payment_recovery`, exposed as `flags.v1PaymentRecovery` with the normal `ff:v1_payment_recovery` local override. - Gates only `payment_failed` and `paused` banners/run-lock behavior with the new flag; existing out-of-credits, ending, and generic inactive behavior remain on their existing paths. - Shows billing managers a non-dismissible `Payment failed` banner with `Update payment`; returning focus refetches status/balance while that banner is visible. - Keeps the queue group mounted when paused. Existing auto-run mode is reset and the visible dropdown is locked so no queued execution bypasses recovery. - Gives owners a gold `Update payment to run` action and portal recovery dialog; members see a gray locked `Run` action and a billing-private `Subscription paused` explainer with `Ok, got it`. - Uses the existing billing portal action, which opens Stripe Billing Portal in a new tab. ### API / backend boundary This PR consumes existing `billing_status` values (`payment_failed`, `paused`) and the existing payment-portal endpoint. Backend/remote config must deliver `v1_payment_recovery`. It does not implement dunning, recovery state transitions, or server mechanics. PR #14091 remains separate transactional-decline work; this PR has no dependency on its dialog or implementation. ## Changes - **What**: Flag wiring, payment recovery banner derivation/focus refresh, paused queue lock, owner/member recovery dialog, focused unit/component coverage. ## Review Focus - Recovery states are independent from `billing_control_enabled` while unrelated states preserve existing gates. - Paused owner/member flows cannot submit via primary action or Run-on-Change, but batch/dropdown controls stay mounted. - Members receive no payment-declined, card, or payment-method details. ## Screenshots Captured in the real cloud application with billing/workspace endpoints mocked through the repository's Playwright fixtures; no Storybook state was used. ### AS IS — paused owner uses generic inactive replacement  ### TO BE — paused owner queue lock and recovery   ### TO BE — paused member privacy-safe explainer  ## Validation - `pnpm typecheck` - `pnpm lint:unstaged` - 101 focused unit/component tests - 2 real-app Playwright cloud scenarios (paused owner/member) - `pnpm exec oxfmt --check` on touched files - `git diff --check` `pnpm typecheck:browser` is currently blocked by pre-existing `BillingStatusResponse` fixture drift on `main` (existing fixtures are missing newly required seat fields); the added Playwright fixture itself was exercised successfully before being kept out of this focused diff. --------- Co-authored-by: Amp <amp@ampcode.com>
comfy-pr-bot
enabled auto-merge (squash)
August 5, 2026 12:12
Contributor
🎭 Playwright: ✅ 1785 passed, 0 failed · 3 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook |
dante01yoon
approved these changes
Aug 5, 2026
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## cloud/1.49 #14800 +/- ##
=============================================
Coverage ? 78.76%
=============================================
Files ? 1791
Lines ? 104546
Branches ? 32064
=============================================
Hits ? 82341
Misses ? 21775
Partials ? 430
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #14701 to
cloud/1.49Automatically created by backport workflow.