feat(demo): Stage 2 PR-1 — Vercel-deployable + visual skeleton#221
Merged
Conversation
vercel.json wires the repo to deploy as a static site from Vercel: - buildCommand: pnpm -F open-alice-ui build:demo - installCommand: pnpm install --frozen-lockfile --filter='!@traderalice/desktop' - outputDirectory: ui/dist - SPA rewrites: all unmatched paths → /index.html (BrowserRouter hard-refresh) Demo banner (DemoBanner.tsx) — sticky amber top bar shown only when VITE_DEMO_MODE is on: "Demo · You're looking at a snapshot · Install →". Mounted in App.tsx next to UpdateBanner; build-time gated so production prod bundle is unchanged. Terminal stub polish — "Agent terminal · live PTY running Claude Code / Codex / shell" with install CTA. Replaces the earlier minimal "terminal disabled" copy with product-tone framing for marketing-quality demo. Vite build target bumped to ES2022 to unlock top-level await (main.tsx's conditional demo-mode dynamic import). All evergreen browsers (Chrome 89+, Safari 15+, Firefox 89+) support it; no legacy constraint. Why client-side MSW even though Vercel runs functions: see memory `project-demo-mode-vercel-target`. Same bundle runs locally and on Vercel, zero vendor lock-in. memory `project-openalice-no-llm-proxy` also captured: live LLM calls are PERMANENTLY excluded from demo (BYO-login is structural to OpenAlice — workspace agents spawn local CLI processes using the user's own credentials; never proxied). Verified: - pnpm -F open-alice-ui build (no demo flag): 0 msw / VITE_DEMO_MODE / DemoBanner refs in prod bundle (grep clean) - pnpm -F open-alice-ui build:demo: produces 277KB demo chunk + 2.82MB main, dynamic-imported under VITE_DEMO_MODE - pnpm -F open-alice-ui preview --port 5180 + Playwright deep-link to /workspaces/demo-ws/s/demo-session: 0 console errors, SPA routing works - Demo banner visible at top, terminal stub renders new product copy Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 27, 2026
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.
Summary
First PR in the Stage 2 series (demo mode → marketing-grade). Lands the Vercel deployment surface + the visual signal that "this is a demo, not the real product". The richer pieces (PTY replay, flagship scenario, fixture depth) come in PR-2 / PR-3 / PR-4.
After this merges, you can wire the repo into Vercel and deploy directly — no per-platform tweaks needed.
What changed
Vercel wiring
vercel.jsonat repo root:buildCommand: pnpm -F open-alice-ui build:demoinstallCommand: pnpm install --frozen-lockfile --filter='!@traderalice/desktop'(skips Electron, ~1G saved)outputDirectory: ui/dist/index.html(BrowserRouter hard-refresh works)Demo banner
ui/src/demo/DemoBanner.tsx— sticky amber top bar shown ONLY in demo mode:Mounted in
App.tsxnext to the existingUpdateBanner, gated byimport.meta.env.VITE_DEMO_MODEso production builds tree-shake it out. Persistent (no dismiss) — it's the "this is a demo, not real" signal.Terminal stub polish
Replaces Stage 1's minimal "terminal disabled" message with product-tone copy:
Vite target bump
build.target: 'es2022'— unlocks top-level await (main.tsx's conditional demo-mode dynamic import). All evergreen browsers Chrome 89+ / Safari 15+ / Firefox 89+ support it; no legacy constraint.Architecture notes (why client-side MSW on Vercel)
Vercel is hybrid (Functions / Edge), not static-only. We could run server code. We don't — by design:
dev:demolocally and on Vercel ⇒ deployment ≡ devThe principle is permanent: OpenAlice never proxies LLM calls. Workspace agents spawn local
claude/codexCLI processes using the user's own login. There is no "Stage 3 unlock" where demo gets a live LLM Function — that path is structurally closed (broker-credentials-style BYO is the moat).Verification
pnpm -F open-alice-ui exec tsc -bpnpm -F open-alice-ui build(no demo flag) — bundle auditmsw/VITE_DEMO_MODE/DemoBanner/DemoTerminalStubrefs indist/assets/*.jspnpm -F open-alice-ui build:demoVITE_DEMO_MODEpnpm install --frozen-lockfile --filter='!@traderalice/desktop'(Vercel installCommand)pnpm -F open-alice-ui preview --port 5180+ Playwright deep-link to/workspaces/demo-ws/s/demo-sessionTest plan
npx tsc -bclean in ui/What's next (deferred to subsequent Stage 2 PRs)
DemoTerminalReplay+ browser-side recording tool + first real transcriptBoundary touch
None — no trading / auth / broker / migrations code modified.
🤖 Generated with Claude Code