fix(site-editor): v7 Advanced → Local behaves as on main

Draft
TL
4d ago
+177-12

Part of the v8 Studio stack (base: #7796). v8 Fast Preview + Localhost track, on top of #7873. PO decisions of 2026-10-11.

R1: v7's draft picker → Advanced → Local behaves as on main. The stack had turned Local into a deco serve probe for every site: an async save, a "checking" state, and a different hint. v7 sites get main's code back.

What

  • The picker now knows the site version: isV8 = isBlocksV8Project(vmcp.metadata) (the server marker from #7871), passed ChatModeRow → BranchPill → BranchPicker → AdvancedPicker.
  • v7: LocalUrlForm (moved to local-url-form.tsx so it can be tested) is main's component verbatim.
    • It saves productionUrlFromDomain(url) synchronously, with no request, no checking state and no error line, and shows main's hint.
    • The picker also stops clearing or writing the deco serve connection for v7. Since #7873, that connection reads as none on v7 anyway.
  • v8: the Advanced Local tab keeps the deco serve form (ServeLocalUrlForm) for now. The next PR replaces it with a Localhost item in the drafts list.

Tests

  • local-url-form.test.tsx:
    • On v7, saving localhost:3000 calls onSave(productionUrlFromDomain("localhost:3000")) in the same tick, and fetch is never called (spy).
    • An empty field can't be saved.
    • The hint is main's, and Turn off clears.
  • tsc --noEmit for apps/web, oxlint, and biome format are clean. The 20 test files under thread/repository and chat/pills pass, one process per file.

Stack

v8 Fast Preview track: previous: #7873 · next: #7875

🤖 Generated with Claude Code

https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig