Skip to content

Hide premium-tier UI behind VITE_SHOW_PREMIUM flag#3

Merged
MaxHalford merged 1 commit into
mainfrom
feat/hide-premium-public-launch
Jun 2, 2026
Merged

Hide premium-tier UI behind VITE_SHOW_PREMIUM flag#3
MaxHalford merged 1 commit into
mainfrom
feat/hide-premium-public-launch

Conversation

@MaxHalford

Copy link
Copy Markdown
Owner

Summary

  • Public-launch v1: lead with the open-source SQL canvas; defer Pro plan, Desktop download, MCP, and sign-in/account to later phases.
  • One master flag (VITE_SHOW_PREMIUM) controls all of it. Defaults to false; flip to true to re-surface premium UI. Granular flags can be split out later if a staged re-introduction is needed.
  • Underlying premium logic (isPro checks, autofix, WS sync) is untouched — just unreachable without sign-in.

What gets hidden when off

  • LandingPage: Pro section, Desktop section, Pro/Desktop FAQs, Pro/MCP mentions in JSON-LD + meta description
  • MenuBar: "Connect via MCP..." entry, Share menu item, Pro badge, sign-in dropdown, user/account dropdown, Share & MCP dialogs
  • SettingsPanel: Hex remover (autofix) section
  • SqlBox: wand (cast-a-spell) button
  • Router: /account and /oauth/consent redirect to /app. /auth/callback is intentionally NOT blocked — BigQuery OAuth reuses it.

Test plan

  • Build with VITE_SHOW_PREMIUM=false: landing page shows only the OSS sections (Hero, What You Get, Supported Databases, FAQ, What's New)
  • Build with VITE_SHOW_PREMIUM=false: in-app menu bar has no sign-in, no Pro badge, no MCP entry, no Share item; settings panel has no Hex remover; SQL box has no wand
  • Build with VITE_SHOW_PREMIUM=false: visiting /account or /oauth/consent redirects to /app
  • Build with VITE_SHOW_PREMIUM=false: BigQuery OAuth round-trip still works (uses /auth/callback)
  • Build with VITE_SHOW_PREMIUM=true: everything renders as before this PR

🤖 Generated with Claude Code

Public-launch v1: lead with the open-source SQL canvas, defer Pro plan,
Desktop download, MCP, and sign-in/account to later phases.

One master flag controls all of it. Defaults to off; set to true to surface
the premium UI again. Underlying logic (isPro checks, autofix, WS sync) is
untouched — just unreachable without sign-in.

When off:
- LandingPage: hides Pro section, Desktop section, Pro/Desktop FAQs, and
  Pro/MCP mentions in JSON-LD + meta description
- MenuBar: hides "Connect via MCP...", Share menu item, Pro badge, sign-in
  dropdown, user/account dropdown
- SettingsPanel: hides Hex remover section
- SqlBox: hides the wand (cast-a-spell) button
- Router: /account and /oauth/consent redirect to /app (/auth/callback
  stays open — BigQuery OAuth reuses it)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MaxHalford
MaxHalford merged commit 366713c into main Jun 2, 2026
3 checks passed
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.

1 participant