docs(agent-instructions): broaden dev-server host/origin guidance #30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/agent-instructions-dev-server-hosts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Addresses the post-merge comment on #22.
Summary
The bundled default
CLAUDE.mdpreviously mentioned only Vite'sBlocked request. This host is not allowed.failure mode. With the preview proxy in #21, the same class of failure manifests across most modern dev servers (Next.js HMR socket rejected as cross-origin, CRA's webpack-dev-server, etc.) — and the operator's hostname can be anything fromlocalhostto a custom DNS likedevops.lan, never127.0.0.1.Replaces the narrow Vite paragraph with a
#### Dev-server host/origin checkssubsection that:server.allowedHosts: true,server.hmr.host), SvelteKit/Astro/Nuxt/Remix (Vite-based), Next.js ≥ 15.2 (allowedDevOriginstop-level), CRA/webpack-dev-server (WDS_SOCKET_HOST/allowedHosts: 'all').Scope
Documentation-only — no behavior change.
DEFAULT_HASHis recomputed from file content at runtime, so no constant to bump. Existingagent-instructionstests still pass (19/19).Not done here (open follow-up)
The PR #22 comment asked for the proxy hostname to be injected into CLAUDE.md, not just documented. This change reduces but doesn't fully eliminate the discovery round-trip — Next.js still requires the exact hostname. Closing the gap would mean an
operator_hostnameinstance setting + seed-time placeholder substitution. Left for a follow-up if desired.Test plan
pnpm --dir nexus exec vitest run src/lib/server/agent-instructions/→ 19/19 pass~/.claude/CLAUDE.mdand in/settings?tab=agent-instructions.Closing as already merged — the change has landed via PR #21.
This PR's only commit (
5ed6d11) was also the first commit of what became thefeat/artifactsbranch (PR #21). When that PR was rebased before merging, this commit was carried through with the same patch but re-authored asLuca Zanussi <dev@luca.zanus.si>and with theCo-Authored-Bytrailer stripped. It landed onmainas commit297eff4.git diff main..fix/agent-instructions-dev-server-hostsis empty (git rebase mainfrom this branch reportswarning: skipped previously applied commit 5ed6d11), so there's nothing left to merge here.The
Dev-server host/origin checkssection is live onmaininnexus/static/default-CLAUDE.md. Closing.Pull request closed