Skip to content

feat(site-editor): Blocks v8 sites always use Fast Preview - #7872

Closed
tlgimenes wants to merge 8 commits into
split/45-blocks-v8-project-markerfrom
split/46-v8-always-fast-preview
Closed

tlgimenes wants to merge 8 commits into
split/45-blocks-v8-project-markerfrom
split/46-v8-always-fast-preview

Conversation

@tlgimenes

@tlgimenes tlgimenes commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

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 feat(projects): server-managed blocksMajor marker for Blocks v8 sites #7871): new threads are always cms when the project has a preview URL. A stale fastPreview: false is ignored. A v8 site with no preview URL is still sandbox; 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.
  • R3 needs nothing new: a cms thread on a v8 site already reads the hosted draft through useProtocolDraft, 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 is cms whenever 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, whatever fastPreview says.
  • tsc --noEmit is clean for apps/web, apps/api and packages/shared. oxlint and biome format are clean. sandbox-proxy.test.ts passes (13). The thread-create stamp is covered by the matrix, because create.integration.test.ts needs a database.

Stack

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

Review fixes (f22177c)

  • 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

https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

`fastPreviewCapability` is now: a preview server URL AND (the project is a
Blocks v8 site OR the Fast Preview switch is on). A v8 project (the
server's `blocksMajor` marker) always starts new threads as CMS sessions,
previewing the hosted draft; v7 keeps main's exact rule because it never
has the marker. Stamps stay immutable.

Project settings render neither the Fast Preview switch nor in-place
render for v8; the preview URL stays. v7 settings are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
tlgimenes and others added 3 commits October 11, 2026 14:23
…ddress

R2 hides only the Fast Preview switch for Blocks v8. In-place render stays
visible (Fast Preview is always on for v8), so a value stored before the
marker is never in effect while hidden. A v8 project without a preview URL
gets a hint where the switch was, since its new chats start a coding session.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
A Blocks v8 site has no Fast Preview switch, so "Required for Fast
Preview" pointed at nothing. v8 now says what the address is for
(previewing drafts); v7 keeps main's copy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
@tlgimenes

Copy link
Copy Markdown
Contributor Author

Folded into #7887 (API) / #7888 (web, stacked on #7887). The tree of #7888 equals this stack's top (split/51-v8-per-site). The branch is kept.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

@tlgimenes tlgimenes closed this Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude PR authored by a coding agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant