feat(ui): runtime demo mode — one build serves demo + real (#60) - #83
Merged
Conversation
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).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ends the two-build divergence (VITE_DEMO build vs real build on separate Vercel projects that drift). Demo is decided at runtime:
DEMOreads?demo=1(persisted;?demo=0exits), with theVITE_DEMOflag as a fallback.NET = helperConfigured() && !DEMO— the same canonical build can point at a helper AND still show the demo.?demo=1).Live-validated: default = real (no banner);
?demo=1= demo (banner + mock) and persists across in-app nav;?demo=0exits. 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 keepVITE_DEMO=1). Closes the code half of #60.