Launch preview panel auto-opens edited Angular component template .html files as static pages, rendering raw source
Open 💬 0 comments Opened Jul 3, 2026 by EthanSK
Environment
- Claude Code desktop app (macOS), v2.1.195
- Nx + Angular monorepo
Behavior
Every time the agent edits a .html file, the Launch preview panel automatically displays that file as if it were a standalone static web page. In an Angular (or any SPA framework) repo, edited .html files are component templates — fragments full of @if/@let/@for control flow and property bindings that only mean anything compiled inside the app. The browser panel renders them as raw source text (control-flow syntax shown literally as body text).
No hooks are configured in the project or user settings, and there is no .claude/launch.json — this appears to be built-in auto-preview behavior.
Why it's a problem
- The panel content is meaningless noise for framework projects, and it re-opens on every template edit during long refactors.
- It's actively misleading: the user believed the agent was "testing in the browser" against their real app, when nothing was being executed at all. Trust in what the agent is/isn't verifying matters.
Suggestion
Any of:
- Skip auto-preview when the file is recognizably a framework template fragment (Angular/Vue/Svelte control-flow markers, no
<!doctype html>/<html>root), or when the workspace is a recognizable SPA project. - A setting to disable auto-opening edited files in the preview panel.
- Prefer a configured
.claude/launch.jsondev server for preview when present, over raw file display.
🤖 Generated with Claude Code