Repository navigation
Add Next.js demo with live usage and parallel CLI arena - #21
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The credential-bearing provider path and concurrent Codex/MCP process sandbox have correctness and lifecycle findings requiring fixes and final human security review.
Review effort: Lite
Findings: 3
Open (4)
What changed in this PR
Replaces the static routing demo with a Next.js App Router host while preserving the pure harness in src/.
Changes:
- Adds live Jev routing, key storage, usage reporting, and responsive React UI.
- Adds a synthetic Codex CLI arena with parallel MCP lanes and inspectors.
- Updates tests, documentation, CI, and removes the old static demo host.
| File | Description |
|---|---|
tsconfig.json |
Enables Next.js and React compilation. |
tsconfig.demo.json |
Removes obsolete demo configuration. |
tests/usage.test.ts |
Tests usage parsing and accounting. |
tests/routing-demo.test.ts |
Removes obsolete static-server tests. |
tests/routing-bench.test.ts |
Adapts benchmark assertions. |
tests/live-host.test.ts |
Tests live host validation and failures. |
tests/arena.test.ts |
Tests MCP and CLI arena behavior. |
scripts/verify-live-browser.mjs |
Adds live UI verification. |
scripts/verify-arena-browser.mjs |
Adds arena UI verification. |
scripts/demo-routing.ts |
Removes obsolete launcher. |
scripts/arena-mcp.mjs |
Adds bounded synthetic MCP server. |
README.md |
Documents the new demo host. |
public/favicon.svg |
Adds application favicon. |
package.json |
Adds Next.js development and build scripts. |
next.config.ts |
Configures Next.js aliases and security headers. |
examples/routing/usage.ts |
Implements session usage tracking. |
examples/routing/server.ts |
Removes obsolete static server. |
examples/routing/live-client.ts |
Adds browser live-routing client. |
examples/routing/index.html |
Removes obsolete static page. |
examples/routing/demo-state.ts |
Supports injected live routers. |
examples/routing/compare.ts |
Adds live measurements to comparisons. |
examples/routing/browser.ts |
Removes obsolete browser implementation. |
examples/routing/api-key.ts |
Implements local key storage. |
examples/host/runtime.ts |
Creates server-side live handler. |
examples/host/live.ts |
Adds bounded provider adapter. |
examples/host/codex.ts |
Runs isolated Codex CLI processes. |
examples/host/arena-lanes.ts |
Coordinates parallel arena lanes. |
examples/arena/cases.ts |
Defines synthetic arena fixtures. |
docs/verification/next-browser-2026-09-22.json |
Records browser verification. |
docs/verification/live-routing-2026-09-22.json |
Records live routing smoke test. |
docs/verification/live-browser-2026-09-22.json |
Records live UI checks. |
docs/verification/live-arena-parallel-2026-09-22.json |
Records parallel arena run. |
docs/verification/live-arena-2026-09-22.json |
Records arena smoke test. |
docs/routing-demo.md |
Documents the new host and arena. |
docs/roadmap.md |
Updates project milestones. |
docs/plans/routing-demo.md |
Tracks requested demo work. |
docs/architecture.md |
Documents host boundaries. |
components/routing-room.tsx |
Implements routing UI. |
components/header.tsx |
Adds navigation, key, and usage controls. |
components/example-lab.tsx |
Adds schema/context experiments. |
components/comparison.tsx |
Displays routing accounting. |
components/arena.tsx |
Implements arena orchestration UI. |
components/arena-results.tsx |
Displays lane results and accounting. |
components/arena-inspector.tsx |
Adds run inspection tabs. |
app/page.tsx |
Defines routing page. |
app/layout.tsx |
Defines shared application layout. |
app/globals.css |
Styles the application UI. |
app/examples/page.tsx |
Defines examples page. |
app/arena/page.tsx |
Defines arena page. |
app/api/route/route.ts |
Exposes live routing endpoint. |
app/api/config/route.ts |
Exposes host configuration status. |
app/api/arena/route.ts |
Streams arena execution events. |
AGENTS.md |
Adds host-specific safety guidance. |
.gitignore |
Ignores Next.js generated files. |
.github/workflows/checks.yml |
Adds production build verification. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
5 tasks done
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.


What changed
The static routing demo could not save a TypeSafe key, report live usage, or compare an actual CLI host. Replace it with a Next.js App Router application while preserving the pure harness in
src/unchanged.This is an explicitly requested example-host expansion. Dependencies were landed separately in #19/#8; this PR adds no dependency versions. Auth-only temporary CLI homes, read-only sandboxing, disabled external features, bounded inputs/output/time, and process-group cancellation stay in the host, outside the exported package.
Verdict impact
None. No
src/changes, verdict changes, decision-table changes, proposal-review question changes, or model-pin changes. The fixture host may read invented files and record proposals; it never executes model-proposed source.Verification
pnpm typecheckpnpm test— 72 offline tests, including parallel-start/settlement, CLI activity transitions, MCP bounds, origin normalization, and usage accounting.pnpm build— production build in an isolated copy of the final source so the requested dev preview remains available.pnpm check:secretsand signed commits; existing hooks remain enabled.read_filecall. Separate from automated tests; not a quality, cost, or latency benchmark.The template's no-provider/no-credential/no-execution-path checkbox does not apply to this requested optional local host: those additions are explicitly described above. No provider, React, or CLI I/O enters
src/.Review fixes: fixture contents now stay behind MCP rather than in the common prompt; pending proposals retain their bounded diff and rationale in the inspector/export; Windows CLI execution is explicitly refused before any process or auth workspace starts.
Limitations: the CLI host requires macOS or Linux; file-based Codex sign-in is required; keychain-only auth is unsupported. Browser key storage is origin-local and unencrypted, as disclosed in settings. Independent trajectories, cache effects, and shared host resources affect comparisons. Answer quality is not automatically scored. Human keyboard-only/VoiceOver acceptance and repeated live benchmarking remain outstanding.