Skip to content

feat(ui): runtime demo mode — one build serves demo + real (#60) - #83

Merged
danielgorgonha merged 1 commit into
mainfrom
feat/runtime-demo-mode
Aug 3, 2026
Merged

feat(ui): runtime demo mode — one build serves demo + real (#60)#83
danielgorgonha merged 1 commit into
mainfrom
feat/runtime-demo-mode

Conversation

@danielgorgonha

Copy link
Copy Markdown
Member

Ends the two-build divergence (VITE_DEMO build vs real build on separate Vercel projects that drift). Demo is decided at runtime:

  • api.ts: DEMO reads ?demo=1 (persisted; ?demo=0 exits), with the VITE_DEMO flag as a fallback. NET = helperConfigured() && !DEMO — the same canonical build can point at a helper AND still show the demo.
  • Landing: the primary CTA enters demo mode (?demo=1).
  • DemoBanner: an Exit demo link so demo is never a trap.

Live-validated: default = real (no banner); ?demo=1 = demo (banner + mock) and persists across in-app nav; ?demo=0 exits. 76 vitest green.

Vercel follow-up (dashboard, not code)

Consolidate to one canonical deploy, retire/redirect the stale net-preview, and point the submission demo URL at ?demo=1 (or keep VITE_DEMO=1). Closes the code half of #60.

Ends the two-build divergence (a VITE_DEMO build vs a real build, on separate Vercel projects that
drift). Demo mode is now decided at RUNTIME:
- api.ts: DEMO reads `?demo=1` (persisted in localStorage; `?demo=0` exits), falling back to the
  VITE_DEMO build flag for the existing demo project. NET = helperConfigured() && !DEMO, so the SAME
  canonical build can point at a hosted helper AND still show the demo (mock) on `?demo=1`.
- Landing: the primary CTA enters demo mode (`?demo=1#/vaults`) instead of a build-flagged deploy.
- DemoBanner: an "Exit demo" link (`?demo=0`) so demo mode is never a trap.

Live-validated: default = real (no banner), `?demo=1` = demo (banner + mock + exit) and persists
across in-app navigation, `?demo=0` exits. 76 vitest green; tsc + build clean.

Follow-up (Vercel dashboard, not code): consolidate to one canonical deploy, retire/redirect the
stale net-preview project, and point the submission demo URL at `?demo=1` (or keep VITE_DEMO=1).
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
konclave-demo Ready Ready Preview Aug 3, 2026 3:28am

Request Review

@danielgorgonha
danielgorgonha merged commit 0ee5c0c into main Aug 3, 2026
7 checks passed
@danielgorgonha
danielgorgonha deleted the feat/runtime-demo-mode branch August 3, 2026 03:29
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