Skip to content

breaking: make waitlist var opt-in#614

Open
cjroth wants to merge 3 commits into
mainfrom
cjroth/waitlist-env-var
Open

breaking: make waitlist var opt-in#614
cjroth wants to merge 3 commits into
mainfrom
cjroth/waitlist-env-var

Conversation

@cjroth
Copy link
Copy Markdown
Member

@cjroth cjroth commented Apr 16, 2026

This replaces the waitlist opt-out var (VITE_BYPASS_WAITLIST) with an opt-in var (VITE_ENABLE_WAITLIST) so that users self-deploying will not encounter the waitlist unnecessarily. The waitlist is only used by Mozilla's upcoming hosted version of Thunderbolt and is not appropriate for self-hosting users.


Note

Low Risk
Small, localized routing/env-var change; main risk is misconfiguration causing unexpected waitlist gating or access behavior in deployments.

Overview
The waitlist gate is flipped from an opt-out model (removed VITE_BYPASS_WAITLIST) to an opt-in model via VITE_ENABLE_WAITLIST.

Routing guards in src/app.tsx are updated so the /waitlist route only exists when VITE_ENABLE_WAITLIST=true (and not in PR previews), and the main app routes only require authentication/redirection to /waitlist when the waitlist is enabled (or to /oidc-redirect in OIDC mode).

Reviewed by Cursor Bugbot for commit 9141bc6. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

cjroth added 2 commits April 16, 2026 15:50
- uncomment the flag so local dev skips the waitlist out of the box
- Replace VITE_BYPASS_WAITLIST (opt-out) with VITE_ENABLE_WAITLIST (opt-in)
- Default behavior now skips the waitlist; deployments must explicitly enable it
- PR previews continue to bypass the waitlist regardless
@github-actions
Copy link
Copy Markdown

Semgrep Security Scan

No security issues found.

@cjroth cjroth force-pushed the cjroth/waitlist-env-var branch from 4aab4fb to 3eff1d6 Compare April 16, 2026 19:50
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@claude
Copy link
Copy Markdown

claude Bot commented Apr 16, 2026

Review

Breaking Change — Deployment Configuration Update Required

The rename from VITE_BYPASS_WAITLIST (opt-out) to VITE_ENABLE_WAITLIST (opt-in) inverts the default: any existing production deployment with an active waitlist (no env var previously set) will silently lose the AuthGate on all main app routes after deploying this PR, unless VITE_ENABLE_WAITLIST=true is added to its environment config.

src/app.tsx line 90, src/app.tsx lines 122–126

Before: no env var → shouldBypassWaitlist=falseAuthGate active
After: no env var → waitlistEnabled=false<Outlet /> (no auth gate)

This is intentional for the new opt-in semantics, but any deployment that currently relies on the waitlist to gate access needs VITE_ENABLE_WAITLIST=true added before or alongside this deploy. Consider adding a migration note to the PR body or a deployment checklist item.


No other issues found. Doc fixes and link corrections look correct.

Comment thread src/app.tsx
@claude
Copy link
Copy Markdown

claude Bot commented Apr 16, 2026

Review

Security / Breaking Change

The auth gate is now coupled to waitlistEnabled. When VITE_ENABLE_WAITLIST is unset (the new default), waitlistEnabled = false and the main app routes render via bare <Outlet /> — no authentication required at the routing layer. This inverts the previous behavior where auth was active by default and only opted out with VITE_BYPASS_WAITLIST=true.

No CI/CD workflow file sets VITE_ENABLE_WAITLIST, so any deployment that doesn't explicitly add the env var will silently lose the frontend auth gate on next deploy. Unauthenticated users will reach all app routes (chats, settings, tasks) and receive broken API responses rather than a redirect to login.

If the intent is that "no waitlist" deployments still require a user to be authenticated, the auth gate and the waitlist toggle need to be independent. A deployment could want the auth gate without the waitlist UI.

src/app.tsx lines 122–126.

Comment thread src/app.tsx
Comment on lines 120 to 127
<Route
element={
shouldBypassWaitlist ? (
<Outlet />
) : (
waitlistEnabled ? (
<AuthGate require="authenticated" redirectTo={oidcMode ? '/oidc-redirect' : '/waitlist'} />
) : (
<Outlet />
)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When waitlistEnabled is false (the default with no env var set), this renders <Outlet /> with no auth gate — every main app route is accessible without authentication. Previously, shouldBypassWaitlist = false by default, so the auth gate was always active unless explicitly bypassed.

If "waitlist disabled" and "auth not required" are genuinely the same thing for all deployment types, this is fine. But if there are deployments that want auth without the waitlist UI, the two concerns need to be separated (e.g. a separate VITE_REQUIRE_AUTH flag, or the auth gate could redirect to a sign-in page rather than /waitlist when the waitlist is off).

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

PR Metrics

Metric Value
Lines changed (prod code) +9 / -10
JS bundle size (gzipped) 🟢 1.02 MB → 1.02 MB (-6.9 KB, -0.7%)
Test coverage 🟢 70.57% → 70.57% (+0.0%)
Load time (preview) Preview not ready — Render deploy may have timed out

Updated Thu, 16 Apr 2026 20:07:53 GMT · run #937

ital0
ital0 previously approved these changes Apr 16, 2026
- ensure AuthGate wraps main routes when oidcMode is on, even if
  waitlist is disabled, so unauthenticated users get redirected
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@claude
Copy link
Copy Markdown

claude Bot commented Apr 16, 2026

Code Review

Security / Breaking Change

The default authentication posture has reversed. Previously, the frontend auth gate was on by defaultVITE_BYPASS_WAITLIST=true was required to remove it. Now it is off by defaultVITE_ENABLE_WAITLIST=true is required to enable it.

When VITE_ENABLE_WAITLIST is unset (the new default) and OIDC is not in use, the main app route element evaluates to <Outlet /> with no AuthGate wrapping it. Unauthenticated users can navigate directly to any main-app route (e.g. /chats/new) without being redirected to the waitlist or OIDC flow.

src/app.tsx lines 119–128: oidcMode || waitlistEnabled is false || false under the default config, so <Outlet /> is used unconditionally.

This is fine if the intent is that the waitlist is the only reason to enforce frontend auth (i.e. the backend always enforces auth independently). But it's a breaking default for any existing deployment that was relying on the old secure-by-default posture — upgrading without setting VITE_ENABLE_WAITLIST=true silently removes the frontend auth gate.

Suggestion: If there are production deployments on the old env-var scheme, consider a migration note or a deprecation warning for VITE_BYPASS_WAITLIST.

No other issues found.

Comment thread src/app.tsx
Comment on lines +119 to 128
{/* Main app routes - authenticated only (pass-through when waitlist and OIDC both disabled) */}
<Route
element={
shouldBypassWaitlist ? (
<Outlet />
) : (
oidcMode || waitlistEnabled ? (
<AuthGate require="authenticated" redirectTo={oidcMode ? '/oidc-redirect' : '/waitlist'} />
) : (
<Outlet />
)
}
>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When oidcMode=false and waitlistEnabled=false (the new default when VITE_ENABLE_WAITLIST is unset), this evaluates to <Outlet /> — no auth gate at all. Previously the default was the opposite: auth was required unless VITE_BYPASS_WAITLIST=true was explicitly set.

If the intent is that the backend always enforces auth and the frontend gate is purely for the waitlist UX, this is fine. If any production environment was relying on the frontend auth gate as a default, upgrading without setting VITE_ENABLE_WAITLIST=true silently removes it.

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