Repository navigation
[backport core/1.56] FE-3257 fix(billing-web): a late sign-in no longer sends an open checkout to the home page - #20324
Conversation
…kout to the home page (#20319) ## Why In QA, opening testbilling from the app's subscribe sometimes landed on the billing home page ("Open billing from your Comfy product to manage your plan…") instead of the checkout, with `preview-subscribe` canceled in DevTools. Denys reproduced it often by opening checkout, closing the tab, and subscribing again. ## Root cause A fresh billing-web tab always goes through `/sign-in?returnTo=/v1/checkout…`. `SignInView` reads `route.query.returnTo` only when `onSignedIn` fires. With the shared web session, `App.vue` remounts the router view under `BillingShell` once the workspace scope arrives, so a second sign-in page mounts and starts its own mint for the already-restored user. The first page's mint navigates to `/v1/checkout` correctly. When the second one resolves later, the current route is the checkout, which has no `returnTo`. `safeReturnTo(undefined)` then falls back to `/`, and the router replaces the checkout with the home page mid-preview. The timing depends on the shell remount and the second `/workspaces/current` round trip, which is why it's intermittent. ## How `onSignedIn` navigates only while the tab is still on the sign-in route. A sign-in that resolves after the tab has moved on does nothing. ## AS IS / TO BE | AS IS (testbilling, QA report) | TO BE (this branch, local billing-web against testcloud) | | --- | --- | | <img width="480" src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/refs/heads/assets/pr-20319/as-is.png"> | <img width="400" src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/refs/heads/assets/pr-20319/to-be.jpg"> | | The subscribe link lands on the billing home page at `/` | The same link goes through `/sign-in` and stays on `/v1/checkout` | ## Test plan - [x] SignInView: a sign-in returns to the `returnTo` link; a sign-in resolving after the route moved to the entry does not call `router.replace` (red before the fix) - [x] vitest `apps/billing-web/src/views` + `src/auth`: 391 passed - [x] Local billing-web against testcloud: opened the checkout link fresh twice, and both went through `/sign-in` and landed on `/v1/checkout` - [ ] Verify on testbilling after deploy - Fixes FE-3257 - QA thread: https://comfy-organization.slack.com/archives/C0932CGKT5K/p1791299972813079 --------- Co-authored-by: GitHub Action <action@github.com>
📦 Bundle Size
🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since befca476ae29e8f605ffab52199169fc36f89fce
Full docs: ADR-DEVEX-LINT-0015 🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measureExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight This candidate changes nothing the matrix measures, so every expensive stage was skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## core/1.56 #20324 +/- ##
=============================================
+ Coverage 85.90% 86.03% +0.13%
=============================================
Files 2461 2560 +99
Lines 140576 143687 +3111
Branches 36245 37313 +1068
=============================================
+ Hits 120759 123628 +2869
- Misses 19439 19530 +91
- Partials 378 529 +151
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 98 files with indirect coverage changes 🚀 New features to boost your workflow:
|
dante01yoon
left a comment
There was a problem hiding this comment.
Clean backport, identical diff to the original.
Backport of #20319 to
core/1.56Automatically created by backport workflow.