Skip to content

Fix the return from checkout landing on the homepage; welcome list after upgrading - #37

Merged
I-794 merged 1 commit into
mainfrom
claude/practical-archimedes-s2nxsa
Nov 16, 2026
Merged

I-794 merged 1 commit into
mainfrom
claude/practical-archimedes-s2nxsa

Conversation

@I-794

@I-794 I-794 commented Nov 16, 2026

Copy link
Copy Markdown
Owner

The bug

After paying in Stripe's checkout, a returning visitor landed on the homepage instead of the editor. The service worker matches navigations against its cached pages, and /editor/?pro=success&session_id=... did not match the cached editor page because of the query string, so it fell back to the homepage. The same thing affected /editor/?look= (Gallery "Use this look") and ?ext= links for returning visitors.

The fix

  • Checkout now returns to /editor/#pro=success (and #pro=cancel); a fragment is ignored when matching cached pages
  • The browser remembers the checkout session it started (glint_pro_checkout), so the editor can confirm the payment with the server however the person comes back. A checkout that was never seen to finish is re-checked quietly the next time the editor opens, and dropped after a while
  • The service worker ignores query parameters when matching cached pages (ignoreURLParametersMatching), which fixes the ?look= and ?ext= links too
  • After upgrading, the account panel opens with "Welcome to Glint Pro" and a short list of what the plan brings; it shows once

Testing

  • npm run check passes; testBillingRoutes checks the new return address and that the session id is returned
  • Browser run with stand-ins, six cases: returned with #pro=success, paid but landed without a marker, abandoned checkout, cancelled, payment still pending, and starting a checkout stores the id
  • The built sw.js carries the new matching rule
  • The first real sandbox purchase reached Stripe's checkout and completed; this fixes what happened after it

Generated by Claude Code

A returning visitor's service worker did not match /editor/?pro=success&session_id=... against the cached editor page and fell back to the homepage. Checkout now returns to /editor/#pro=success, the browser remembers the session id it started, and an unfinished checkout is re-checked when the editor next opens. The service worker ignores query parameters when matching cached pages, which also fixes ?look= and ?ext= links for returning visitors. After upgrading, the account panel lists what Pro brings.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_016tciSRcwDsHcLgxbSDvQgC
@vercel

vercel Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
glint Ready Ready Preview Nov 16, 2026 3:26am UTC

@I-794
I-794 merged commit 96b5c02 into main Nov 16, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 93db8df7 Deployed Nov 16, 2026 by vercel[bot]
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.

2 participants