Objective
Remove the legacy inline HTML dashboard from serve.ts and the fallback logic in createApp(). The React SPA (apps/studio/) fully replaces it. The dashboard has never been published, so there are no backward-compat concerns.
Context
PR #806 scaffolded apps/studio/ (React SPA) and renamed agentv serve → agentv studio. The old dashboard was a ~1000-line generateServeHtml() function that inlined all HTML/CSS/JS as template strings in apps/cli/src/commands/results/serve.ts. The SPA fallback path in createApp() still calls generateServeHtml() if the studio dist directory isn't found.
Scope
Delete
generateServeHtml() function and all its helpers (inline CSS, JS template strings) in serve.ts
- The fallback branch at the
'/' route in createApp():
// Delete this fallback:
return c.html(generateServeHtml(results, sourceFile));
Simplify
createApp() route for '/': serve studioDistPath/index.html or throw a clear error:
Error: Studio dist not found. Run "bun run build" to build the SPA.
- Remove the
studioDir?: string | false option if it was only used to disable SPA serving for the inline fallback. Check if tests rely on it — if so, update tests to build studio first or mock the dist path.
- Remove the
serve alias — studio is the only command name. No backward-compat needed since dashboard was never published.
Keep
- All API routes (
/api/runs, /api/feedback, /api/index, /api/results/:filename, static asset serving)
resolveStudioDistDir() — still needed to locate the built SPA
- The
studio command registration in cli.ts
Acceptance signals
Non-goals
- No new features — this is pure cleanup
- Don't restructure API routes or change the Hono app shape
- Don't rename the package or command
Related
Objective
Remove the legacy inline HTML dashboard from
serve.tsand the fallback logic increateApp(). The React SPA (apps/studio/) fully replaces it. The dashboard has never been published, so there are no backward-compat concerns.Context
PR #806 scaffolded
apps/studio/(React SPA) and renamedagentv serve→agentv studio. The old dashboard was a ~1000-linegenerateServeHtml()function that inlined all HTML/CSS/JS as template strings inapps/cli/src/commands/results/serve.ts. The SPA fallback path increateApp()still callsgenerateServeHtml()if the studio dist directory isn't found.Scope
Delete
generateServeHtml()function and all its helpers (inline CSS, JS template strings) inserve.ts'/'route increateApp():Simplify
createApp()route for'/': servestudioDistPath/index.htmlor throw a clear error:studioDir?: string | falseoption if it was only used to disable SPA serving for the inline fallback. Check if tests rely on it — if so, update tests to build studio first or mock the dist path.servealias —studiois the only command name. No backward-compat needed since dashboard was never published.Keep
/api/runs,/api/feedback,/api/index,/api/results/:filename, static asset serving)resolveStudioDistDir()— still needed to locate the built SPAstudiocommand registration incli.tsAcceptance signals
generateServeHtmland inline HTML/CSS/JS template strings are deleted fromserve.tsagentv studioerrors clearly if studio dist is missing (not a silent fallback)agentv servealias is removedstudioDir: falseorgenerateServeHtml)bun run build && bun apps/cli/src/cli.ts studiostill serves the React SPANon-goals
Related
apps/studio/, renamesserve→studio)