From b3faf28177bef716521932f018161ea804b349a3 Mon Sep 17 00:00:00 2001 From: devbox2-codex Date: Sat, 11 Apr 2026 07:29:27 +0000 Subject: [PATCH] docs(agents): note the Studio stale-dist trap under Functional Testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Running `bun apps/cli/src/cli.ts studio` only live-reloads the CLI and backend routes. The Studio web UI is served as a static bundle from `apps/studio/dist/`, which is build output and does not recompile on source changes. Without a manual `bun run build` in `apps/studio`, `agentv studio` silently serves whatever JS/CSS was last built — which may be from a different branch, before the merge you just pulled, or simply stale. This bit the post-merge UAT on #1040: the TagsEditor component was correctly in the source but not in the dist, so the driven-browser session kept rendering an older Compare tab and looked like a feature regression. Cost ~15 minutes of confusion to diagnose. Adds a paragraph under the existing "Functional Testing (CLI)" section so the next agent (or human) knows to rebuild the Studio dist before screenshotting or driving `agent-browser` against Studio. --- AGENTS.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index cf6ad0866..4256a3c75 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -204,6 +204,14 @@ When functionally testing changes to the AgentV CLI, **NEVER** use `agentv` dire **Prefer running from source** (`src/cli.ts`) during development. The dist build can silently serve stale code if you forget to rebuild after changes. +**Studio frontend exception — rebuild `apps/studio/dist/` before UAT.** Running `agentv studio` from source (`bun apps/cli/src/cli.ts studio ...`) only reloads the CLI and backend routes from source. The Studio web UI (React/Tailwind bundle) is served as static assets from `apps/studio/dist/`, which is build output and does **not** recompile on change. If you are testing Studio UI changes — especially post-merge on `main` or after pulling — rebuild the frontend first: + +```bash +cd apps/studio && bun run build +``` + +Skipping this step silently serves the previous bundle, so you'll see the old UI even though your source edits and the backend API are live. This has burned at least one post-merge UAT; always rebuild before screenshotting or driving Studio with `agent-browser`. + ### Browser E2E Testing (Docs Site) Use `agent-browser` for visual verification of docs site changes. Environment-specific rules: