feat(deploy): canonical demo at demo.cacheplane.ai (Phase 2)#306
Merged
Conversation
6 tasks: extract shared proxy module (+ 7 unit tests), wire Angular environment files, scripts/assemble-demo.ts + vercel.demo.json, CI deploy step, external setup checklist, post-merge verification. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The proxy logic was previously inline in scripts/examples-middleware.ts. Extract a createProxyHandler(config) factory into a new scripts/langgraph-proxy.ts module so the Phase 2 demo deployment can import the same handler. examples-middleware.ts becomes a thin wrapper that supplies the existing examples-specific Referer-based backend resolver. Behavior is unchanged for the cockpit-examples deployment. Adds 7 unit tests covering header injection, path stripping, CORS preflight, SSE streaming, error paths, and the resolveBackend hook. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds the standard Angular environments/ file-replacement pattern matching every cockpit Angular app. Production uses /api (same-origin, proxied by the Vercel langgraph-proxy function to the shared cockpit-dev LangGraph Cloud assistant). Development still uses http://localhost:2024 for the locally-run langgraph dev server. Replaces two hardcoded http://localhost:2024 references in threads.service.ts and demo-shell.component.ts with reads from the environment module. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Builds the canonical-demo Angular app and assembles it into deploy/demo/ with a Vercel Build Output API tree containing: - Static SPA files at deploy/demo/ - Node serverless proxy at .vercel/output/functions/api/[[...path]].func/ - Route table sending /api/* to the proxy, everything else to index.html The proxy is a 5-line wrapper around scripts/langgraph-proxy.ts (scripts/demo-middleware.ts) using defaults — single backend, no Referer-based fan-out. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a deploy step parallel to the existing cockpit-examples deploy.
Gated on changes to examples/chat/{angular,python}/**, the proxy
scripts, vercel.demo.json, or libs/**. Uses the new
VERCEL_DEMO_PROJECT_ID secret and the existing VERCEL_ORG_ID +
VERCEL_TOKEN.
Wires DEMO_URL into the production-smoke env block for future
Playwright assertions against demo.cacheplane.ai.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
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.
Summary
Phase 2 of the canonical-demo deployment plan. Stands up
https://demo.cacheplane.aias an independent Vercel project (cacheplane-demo) servingexamples/chat/angularwith a/api/*proxy to the sharedcockpit-devLangGraph Cloud assistant (thechatgraph from Phase 1).Architecture
scripts/langgraph-proxy.ts—createProxyHandler(config)factory. Used by both the existing cockpit-examples deployment (now a thin wrapper preserving its Referer-based fan-out) and the new demo deployment (a 5-line wrapper using defaults).scripts/assemble-demo.tsbuildsexamples-chat-angularin production mode and producesdeploy/demo/with a Vercel Build Output API tree (Node serverless function + route table).examples/chat/angulargets the standard Angularenvironments/file-replacement pattern. Production points at/api, dev athttp://localhost:2024. Two hardcodedlocalhost:2024references removed.External setup (already done by controller)
cacheplane-democreated (prj_i2WgVNmv8N6IMkaUVeLLxJOGyFUW)demo.cacheplane.aiattached + auto-verified via Vercel DNSLANGSMITH_API_KEY+CACHEPLANE_LICENSE_PUBLIC_KEYset on the projectVERCEL_DEMO_PROJECT_IDGitHub secret addedSpec & Plan
docs/superpowers/specs/2026-05-13-canonical-demo-deploy-design.mddocs/superpowers/plans/2026-05-13-canonical-demo-deploy-phase-2.mdTest plan
scripts/langgraph-proxy.spec.ts(header injection, CORS, path stripping, SSE streaming, error paths, resolveBackend hook)npx tsx scripts/assemble-demo.ts --skip-buildproduces a valid Build Output API treelocalhost:2024with/apiDeploy → Vercelruns the new demo deploy step → CI greencurl -I https://demo.cacheplane.ai→ 200curl -s https://demo.cacheplane.ai/api/_proxy_debug | jq .showshasApiKey: trueexamples.cacheplane.aicontinues to work (refactor only)🤖 Generated with Claude Code