feat(site-editor): Blocks v8 sites always use Fast Preview
Draft
TL
4d ago+258+258+012345678901234567890123456789-29-29-01234567890123456789
Part of the v8 Studio stack (base: #7796). v8 Fast Preview + Localhost track, on top of #7871. PO decisions of 2026-10-11.
R2: Blocks v8 sites are always Fast Preview, and Settings shows no switch for them. R3: their preview is the hosted draft.
What
fastPreviewCapability(meta)=previewUrl && (isBlocksV8Project(meta) || meta.fastPreview === true)(packages/shared/src/thread/session-runtime.ts).- v8 (server marker from #7871): new threads are always
cmswhen the project has a preview URL. A stalefastPreview: falseis ignored. A v8 site with no preview URL is stillsandbox; the CMS-unavailable screen already asks for a URL. - v7: no marker, so the expression is main's exact rule (R1).
- Every caller (thread create, sandbox-proxy claim,
useSessionRuntime,use-navigate-to-agent, the chat mode row, the preview) picks this up with no edit. Thread stamps stay immutable and still win.
- v8 (server marker from #7871): new threads are always
- R3 needs nothing new: a
cmsthread on a v8 site already reads the hosted draft throughuseProtocolDraft, which loads the__draft=pointer. - R2: the settings Preview card moves into
PreviewSettingsRows. For v8 it renders only the preview URL: no Fast Preview switch, no in-place render (already inert for protocol projects). v7 renders all three, as on main.
Existing v8 threads
There is no data migration. A v8 thread already stamped sandbox stays a coding session, served by the sandbox daemon's content protocol (R4, next PR). An empty sandbox entry chat stops matching the project default, so the next open creates a cms one.
Tests
session-runtime.test.ts: the marker × fastPreview × URL matrix. The v7 rows are identical to main's rule, v8 iscmswhenever there is a URL, and a stamp still wins on v8.preview-settings-rows.test.tsx: v7 shows the switch and, with it on, in-place render; v8 shows no switch at all, whateverfastPreviewsays.tsc --noEmitis clean forapps/web,apps/apiandpackages/shared. oxlint and biome format are clean.sandbox-proxy.test.tspasses (13). The thread-create stamp is covered by the matrix, becausecreate.integration.test.tsneeds a database.
Stack
v8 Fast Preview track: previous: #7871 · next: #7873
Review fixes (f22177c74)
- For v8, only the Fast Preview switch is hidden. In-place render stays visible, since Fast Preview is always on for v8, so a value saved before the marker can no longer apply while hidden.
- A v8 project with no preview URL shows a hint where the switch used to be: "Add your site's address above to preview drafts. Until then, new chats start a coding session." Covered by a render test.
🤖 Generated with Claude Code