Skip to content

[backport core/1.48] fix(billing): support top-up 3DS verification - #14505

Merged
comfy-pr-bot merged 1 commit into
core/1.48from
backport-14490-to-core-1.48
Jul 31, 2026
Merged

[backport core/1.48] fix(billing): support top-up 3DS verification#14505
comfy-pr-bot merged 1 commit into
core/1.48from
backport-14490-to-core-1.48

Conversation

@comfy-pr-bot

Copy link
Copy Markdown
Member

Backport of #14490 to core/1.48

Automatically created by backport workflow.

## 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.

![AS IS — pending 3DS top-up without verification
CTA](https://ampcode.com/user-content/artifacts/5f60be314f53f524ddf29af87cca410225c23b8bbcc7ca009932fe3e9833d20b-file.png)

### TO BE

The pending top-up presents **Complete verification** as the primary
action while polling continues.

![TO BE — pending 3DS top-up with Complete verification
CTA](https://ampcode.com/user-content/artifacts/794fa7f2ef11048d343b040c5627eb3821f37a014397aeca1fbd8f59569caca2-file.png)

### AS IS → TO BE

![AS IS to TO BE
animation](https://ampcode.com/user-content/artifacts/aaa04969432901024282d494ca05bd87c70f728128073ffe196cd68400bead19-file.gif)

---------

Co-authored-by: dante01yoon <6510430+dante01yoon@users.noreply.github.com>
Co-authored-by: Amp <amp@ampcode.com>
@comfy-pr-bot comfy-pr-bot added the backport Backporting a PR onto a release candidate label Jul 31, 2026
@comfy-pr-bot
comfy-pr-bot enabled auto-merge (squash) July 31, 2026 20:59
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 31, 2026
@dosubot

dosubot Bot commented Jul 31, 2026

Copy link
Copy Markdown

📄 Knowledge review

Dosu skipped reviewing this PR because your organization has used its 200 included credits for the month. Your usage will reset on 2026-08-01. To have Dosu review this PR before then, ask your organization admin to upgrade to a pro account.


Leave Feedback Ask Dosu about ComfyUI_frontend Add Dosu to your team

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 07/31/2026, 09:01:15 PM UTC

Links

🎭 Playwright: ✅ 1759 passed, 0 failed · 2 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1738 / ❌ 0 / ⚠️ 2 / ⏭️ 5)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

@comfy-pr-bot
comfy-pr-bot merged commit 893184a into core/1.48 Jul 31, 2026
75 checks passed
@comfy-pr-bot
comfy-pr-bot deleted the backport-14490-to-core-1.48 branch July 31, 2026 21:12
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

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           
Flag Coverage Δ
unit 69.13% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../components/TopUpCreditsDialogContentWorkspace.vue 77.41% <100.00%> (+4.61%) ⬆️
...platform/workspace/stores/billingOperationStore.ts 64.49% <100.00%> (+0.68%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

backport Backporting a PR onto a release candidate size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants