fix(auth): remove login gate for all visitors#3115
Conversation
The setupAuthWidget() call was gated behind isProUser(), which created a deadlock: new users without legacy API keys could never see the Sign In button and thus could never authenticate. Removes the guard in both the main app and the pro landing page pricing section. Closes #34 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Greptile SummaryThis PR resolves the bootstrapping deadlock documented in todo #34 by removing the Confidence Score: 5/5Safe to merge — targeted two-line removal with no new logic introduced and correct sequencing preserved. All three changed files are straightforward removals of intentional-but-outdated guards. The No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[App.init] --> B[initAuthState - unconditional]
B --> C[setupUnifiedSettings]
C --> D_NEW["setupAuthWidget (unconditional — this PR)"]
D_NEW --> E[authModal set on ctx]
E --> F[capturePendingCheckoutIntentFromUrl]
F --> G{pendingCheckout?}
G -- yes --> H["resumePendingCheckout\n(authModal.open available ✓)"]
G -- no --> I[Continue init]
subgraph Before this PR
D_OLD["if isProUser():\n setupAuthWidget()"]
D_OLD_FALSE["New user → authModal = undefined\nSign In button never mounts\nCheckout silently broken"]
end
Reviews (1): Last reviewed commit: "fix(auth): remove isProUser() gate so al..." | Re-trigger Greptile |
|
@koala73 — this PR removes the login gate as you asked. Before merging, we want to also have the API key management UI ready so users who sign in can create their own keys. Here's the plan and the order we're thinking:
We could either:
What's your preference on priority? Is flat-rate enough to start, or do you want metered billing before opening the gates? 🤖 Generated with Claude Code |
|
@SebastienMelki thanks. We can start with 1 + 2, before rolling 3 - which is the ideal scenario |
|
@koala73 — API key management is now ready in #3125. Here's the full picture:
Per your earlier feedback, 1 + 2 are good to ship without 3. Want to merge these in order (this one first, then #3125), or should we wait for anything else? |
PR #3115 removed the isProUser() localStorage gate from pro-test/src/App.tsx that hid PricingSection + PricingTable behind `wm-widget-key` / `wm-pro-key`, but the compiled bundle under public/pro/assets/ (the static bundle served at worldmonitor.app/pro) was never rebuilt. Visitors without legacy API keys in localStorage therefore still see no prices and no path into the normal Clerk sign-in that the PricingSection CTAs trigger. Rebuilding the bundle drops the gate check (grep count goes from 1 to 0) and rewires the index.html asset hashes.
…ps (#3148) PR #3115 removed the isProUser() localStorage gate from pro-test/src/App.tsx that hid PricingSection + PricingTable behind `wm-widget-key` / `wm-pro-key`, but the compiled bundle under public/pro/assets/ (the static bundle served at worldmonitor.app/pro) was never rebuilt. Visitors without legacy API keys in localStorage therefore still see no prices and no path into the normal Clerk sign-in that the PricingSection CTAs trigger. Rebuilding the bundle drops the gate check (grep count goes from 1 to 0) and rewires the index.html asset hashes.
Summary
isProUser()guard aroundsetupAuthWidget()insrc/App.tsso the Sign In button is visible to all visitors, not just users with legacy API keyspro-test/src/App.tsxPer @koala73's request — time to remove the blocker and let everyone sign in.
Test plan
🤖 Generated with Claude Code