[backport core/1.48] fix(billing): support top-up 3DS verification - #14505
Merged
Conversation
## Summary Surface the hosted 3DS verification action for pending credit top-ups so customers can complete bank authentication instead of timing out in the top-up dialog. The [reported failure](https://comfy-organization.slack.com/archives/C09LDUKDQ1K/p1785480655794419?thread_ts=1785452793.178309&cid=C09LDUKDQ1K) is real. The backend now preserves authentication-required top-ups and publishes `action_url` ([cloud#5890](Comfy-Org/cloud#5890)), but the frontend only rendered action URLs for subscription operations. Top-up polling also retained the generic two-minute timeout after discovering an authentication challenge. ## Changes - **What**: Expose pending top-up action URLs for the active workspace and render a **Complete verification** CTA using the existing subscription-verification pattern. - **What**: Keep polling action-required top-ups for the 23-hour backend authentication window; ordinary top-ups retain the two-minute timeout. - **What**: Validate the URL in the store and open it with `noopener,noreferrer` without rendering the sensitive hosted URL in the DOM. - **What**: Add cloud E2E coverage for the pending top-up → polled 3DS action → verification CTA flow. ## Review Focus - The verification CTA is permission-gated and disappears when the operation settles or the active workspace changes. - Only operations that have actually surfaced an action URL receive the extended timeout. ## Testing - `pnpm test:unit src/platform/workspace/stores/billingOperationStore.test.ts src/platform/workspace/components/TopUpCreditsDialogContentWorkspace.test.ts` (56 passed) - `pnpm test:browser:local browser_tests/tests/dialogs/creditsTile.spec.ts` (4 passed) - `pnpm test:browser:local browser_tests/tests/dialogs/creditsTile.spec.ts --grep "opens verification" --repeat-each 5` (5 passed) - `pnpm typecheck` and `pnpm typecheck:browser` - `pnpm exec oxfmt --check <touched files>` - `pnpm exec oxlint --type-aware <touched files>` - Pre-push `knip --cache` ## Screenshots Captured from the real `TopUpCreditsDialogContentWorkspace` component with a controlled pending 3DS operation; no hosted payment URL or customer data is present. ### AS IS The top-up remains pending with only a loading indicator. No verification action is available.  ### TO BE The pending top-up presents **Complete verification** as the primary action while polling continues.  ### AS IS → TO BE  --------- Co-authored-by: dante01yoon <6510430+dante01yoon@users.noreply.github.com> Co-authored-by: Amp <amp@ampcode.com>
comfy-pr-bot
enabled auto-merge (squash)
July 31, 2026 20:59
📄 Knowledge reviewDosu skipped reviewing this PR because your organization has used its |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1759 passed, 0 failed · 2 flaky📊 Browser Reports
|
dante01yoon
approved these changes
Jul 31, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## core/1.48 #14505 +/- ##
==========================================
Coverage 79.31% 79.32%
==========================================
Files 1746 1746
Lines 99314 99331 +17
Branches 32579 32588 +9
==========================================
+ Hits 78774 78794 +20
+ Misses 20138 20135 -3
Partials 402 402
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 #14490 to
core/1.48Automatically created by backport workflow.