Repository navigation
Conversation
v8 sites get a permanent "Localhost" row in the draft selector instead of Advanced → Local. Choosing it switches the editor to the developer's own `deco serve`: schema and content over the content protocol on localhost, and the preview from the app it reports. - Remembered per user and project (`studio:deco-serve-connection:<userId>:<vmcpId>`), tried first at the last endpoint that answered, else localhost:4545. Nothing running is fine: the probe's backoff connects as soon as `deco serve` starts. - Every state guides: connecting, connected, not running (the command with a copy button), Chrome blocking access, another site, update needed. The preview pane guides while there is no app to show, instead of booting a sandbox. - Only this site's `deco serve` is used: `describe.site` must equal the project's site id, else the public key in `.deco/secrets.pub` must equal the committed one; when neither can be compared it asks to update deco serve. A mismatch keeps polling, so starting the right folder connects. - Advanced has no Local tab for v8; v7 keeps main's. `local-url-submit.ts` and the v8 Local form are gone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
This was referenced Oct 11, 2026
tlgimenes
added a commit
that referenced
this pull request
Oct 11, 2026
Brings feat/blocks-v8-hosted up to the top of the stack (#7875). The stack branches and this one share no history for the split files, so git sees add/add conflicts; the resolution is split/49's tree as is. That is exact: split/44's 53d183a has this branch's tree (42a84aa, a68e1ac), and everything after it on the stack only adds to it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…gnores the tunnel - v8 ignores a tunnel saved by the v7 Advanced -> Local (preview and editor); v7 reads it as on main. - The committed public key is read per project (the server always reads main's), a failed read stays pending and is retried instead of reading as "can't tell the site", and a repository with no key is re-read so adding one connects on its own. The copy now asks for the site's .deco/secrets.pub instead of an update that doesn't exist yet. - Once connected, describe is re-read every poll, so a deco serve restarted in another site's folder on the same port is caught. - Choosing Localhost goes to the endpoint this user last connected the project to (kept per user and project), else the default port; the global /site-editor key is only written by /site-editor again. - The v8-only hooks live in V8LocalhostRow, so a v7 draft selector runs none. - Drop a dead clause in the Preview tab's Localhost gate. - Tests: the site check (match, other site, pending/failed key, restart in another folder), useDecoServeConnection per user/project, useLocalPreviewUrl v7 vs v8. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
useLocalStorage writes its default on every read, so the Localhost keys were stored as "...:<userId>:" before the project id was known (and with "null" values on every visit). The connection now uses a scoped store that never writes on read, and neither reads nor writes until both the user and the project are known. Turning Localhost off removes the key. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
The local probe kept its last answer through failed refetches, so after deco serve stopped the Localhost row went on saying "This is another site" (or "update needed") instead of how to start it. The latest probe now wins: a failed probe replaces an earlier problem at once, a connected site rides out a short restart (3 failed probes, about 7 s) before saying it's not running, and a failed describe poll on a connected site re-probes it so the outage is noticed without a save. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
"Studio can't confirm this is your site" always asked to add .deco/secrets.pub to the repository, even when the repository has it and only the folder deco serve runs in doesn't. The site check now waits for the repository's answer and says which copy is missing: the local folder (pull the latest changes, or run deco serve from the site's folder), the repository (add the file to it), or both. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
The header badge turned red while Studio was still connecting or waiting for deco serve to start, though it reconnects on its own. Waiting now shows a neutral badge with a pulsing dot; red is kept for an answer that can't be used (another site, out of date, an error). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
deco serve can answer before the app it names is listening (vite dev still starting), and the app can restart; the preview frame then stayed on Chrome's error page until a save or a reload. The preview now checks the app from the browser (a no-cors HEAD, with backoff) and shows a "Waiting for your app" guide until it answers, then loads it. When the app goes away (two failed checks) the guide comes back, and the frame loads again on its own once it answers. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
useEffect is banned in this codebase (oxlint ban-use-effect). The app check keeps the same behaviour (backoff while down, two failed checks before an app that answered is called gone) as a react-query poll. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
The guide said "you can edit your content in the meantime", but the Preview tab shows no sections while it waits; it now says where: the Content tab. The app's address also broke onto its own line (each piece of the sentence was a flex item); it stays inline as <code>. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…check) PO decision: Studio does not check which site the local `deco serve` belongs to. Removes matchServeSite (describe.site comparison and the `.deco/secrets.pub` comparison against the repository's key, plus the extra read of main's describe for it), the "This is another site" and "Studio can't confirm this is your site" states with their en/pt-BR copy, their red-badge cases and tests. Reconnect, the not-running guide, browser permission, the "another program" protocol check and the Waiting-for-your-app guide stay. Drops the unused fetchAppProbe export. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…raft On a Blocks v8 site edited through the hosted Deco CMS nothing boots, and the draft only exists once the first edit creates it. Fast Preview's "not ready" therefore meant "no draft yet", and the published site sat under a spinner forever. A hosted draft session (v8 marker + GitHub backend, see hostedDraftSession) now shows the published site with no pill until a draft exists, then the draft as before. v7 and sandbox sessions unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
… black v8 only (v7's picker is unchanged): gap-1 between the drafts list items and before Advanced, and the Localhost row/trigger dot is bg-foreground in every connection state. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…alhost row; no Local server pill
- ServeConnectState (components/sections-editor/serve-connect-state.tsx):
the /site-editor guide's look, shared by /site-editor (guide, first look,
connecting and problem gates) and a project's Preview while Localhost
waits for deco serve ("Waiting for your computer"), names no app, or
waits for the app ("Waiting for your app"). Same header, steps and
copyable command; a "your computer <-> Studio" wire with a dot shuttling
back and forth while waiting (connection-shuttle keyframes, 1.8s
ease-in-out alternate; parked mid-wire under prefers-reduced-motion).
- The Localhost row in the draft selector is just the black dot, the name
and "Connected"; the command, guide, spinner and Turn off moved out
(picking a draft turns Localhost off; guidance, waiting and problems live
in the Preview's empty state, with localhostStatus moved to
sections-editor/localhost-status.ts).
- The "Local server" header pill is gone: the Localhost row says where it
stands and the empty state carries every failure (out of date, another
program, version mismatch, error, Chrome blocking). The Read-only badge
stays as DecoServeReadOnlyBadge (nothing else says saves are off).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…ocalhost
Both places now render LocalServeEmptyState with the same copy from one
source: "Waiting for your computer", the project's intro, the two steps
("Studio connects on its own" + "Looking for deco serve on …"), the
Site editor guide / deco serve options / Troubleshooting links and the
travelling dot. Dropped from /site-editor: the Preview-tab/--preview
paragraph, the older-site note, the Quickstart link and the separate
"Looking for deco serve…" first-look screen. Problem states (out of
date, another program, error) and Chrome blocking render the same in
both. The "Look for deco serve on this computer" button stays only where
Chrome still needs a click before asking for local-network permission,
inside the same layout (a project's Localhost choice already was it).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig # Conflicts: # apps/web/src/hooks/use-deco-serve-connection.ts
useDecoServeConnection imports useVirtualMCP from @/sdk/hooks/use-virtual-mcp (so the field component tests' stub applies); mock that module here instead of the @/sdk barrel. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…r the app - The preview waits until the app `deco serve --preview` names answers, so the stub now names a small local app that listens. - A v8 project connects through Localhost in the drafts list (the Local tab is v7 only now): the spec seeds where the user last connected it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig # Conflicts: # packages/e2e/tests/content-protocol-deco-serve.spec.ts
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
V8LocalhostRow only set the deco serve connection, so the popover stayed open; draft rows go through pick(), which closes it. The choice moves to chooseLocalhost(serve, onPicked), which closes the menu on every pick (chosen already or not) and connects only when not connected. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
After a save on Localhost (and /site-editor) the preview waited for the frame to reload itself and trusted that reload. A site that reloads on the file change, before its server re-reads the content, renders the previous save, so the preview stayed one edit behind. The frame is cross-origin and the protocol reports no rendered revision, so the editor now confirms the site's reload with one more, 500 ms after it. At most one extra reload per save; the editor's own reloads aren't watched, so no loop. Extracted to serve-content-reload.ts with tests. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…ts go to Studio's file storage Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Contributor
Author
|
Folded into #7887 (API) / #7888 (web, stacked on #7887). The tree of #7888 equals this stack's top ( 🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
R5: a "Localhost" item in the drafts list for Blocks v8 sites, replacing Advanced → Local. Choosing it switches the editor to the developer's own
deco serve. Schema and content come over the content protocol on localhost (not git or storage), and the preview is the appdeco servereports (describe.preview).The tree of this branch is identical to
feat/blocks-v8-hosted(b016492, a normal merge of this branch, no force-push):git diff --stat origin/split/49-v8-localhost-item origin/feat/blocks-v8-hostedis empty, and both trees hash tob3469a0e2.PO decision (2026-10-11): no site check. Localhost connects to whatever
deco serveanswers on the endpoint, even one running another site's folder. Studio doesn't encourage that, but no code blocks it (b7e4cf8 removed the check).What
Draft selector (v8 only): a permanent Localhost row above "New draft" (
localhost-row.tsx). It is selected while adeco serveconnection is stored, and the trigger then reads "Localhost". Choosing any draft clears it, and so does "Stop using Localhost".Choosing it: the endpoint that answered last time is tried first, else
localhost:4545. If nothing is running yet, the editor's existing probe backoff (1 s up to 10 s) connects as soon asdeco servestarts, and reconnects on its own after a restart.Remembered per user and project: the key is
studio:deco-serve-connection:<userId>:<vmcpId>. The old per-project key only existed on this unreleased stack, so nothing is migrated.States, in plain words with one next step each:
deco servein your site's folder", the command with a copy button, and "We'll connect as soon as it starts"deco serve, another protocol version, another program on the port, or an error, each with its next stepThe row's state comes from the editor's own content backend, so the two never disagree.
Preview pane: while there is no app to show (still connecting, or
deco servefound no app), it shows a guide instead of booting a sandbox or showing the hosted draft.Advanced: v8 has no Local tab; v7 keeps main's tab (fix(site-editor): v7 Advanced → Local behaves as on main #7874).
local-url-submit.tsand the v8 Local form are deleted.Known limits
Tests
localhost-row.test.tsx:localhostStatusmaps backend × permission to each state.onSelect), connecting, connected (Stop callsonTurnOff), not running (command plus Copy), needs permission, and a problem (out of date).tsc --noEmitforapps/web, oxlint, biome format and knip are clean. 193 test files undersections-editor,thread,main-panel-tabs,hooks,routes,i18n,libandchat/pillspass, one process per file, including the site-editor copy (jargon) test.BranchPickerrender test (it needs releases, members and branches mocked) and the manual run on the local spike (starting and stoppingdeco serve).Stack
v8 Fast Preview track: previous: #7874 · next: #7876 (copy the site id; top of the stack)
Review fixes (94691da)
useLocalPreviewUrlreturns no tunnel for a v8 project. A tunnel saved earlier no longer replaces the preview or the editor. v7 is unchanged./site-editorkey from here any more.V8LocalhostRow, so the v7 picker runs none of them.useDecoServeConnection(per user and project, kept endpoint, v7 reads none, nothing written before the session loads), anduseLocalPreviewUrlon v7 vs v8.Fixes after the PO's run (d5ff0e0..f46bfc4, plus 7fabb89 in #7872)
deco serveanswered before the app (vite dev) was listening, or the app restarted, the frame stayed on Chrome's error page until a save or a reload. Now the preview checks the app from the browser with ano-corsHEAD and backoff (1 s up to 5 s while down, every 10 s while up). Until the app answers, it shows a "Waiting for your app" guide: "Your app atlocalhost:3000isn't answering yet…" and "The preview loads on its own as soon as your app answers." Then it loads the app. If the app goes away (2 failed checks in a row), the guide comes back, and the frame loads again on its own when the app returns./site-editoruses the same tab, so it gets this too.deco servestopped. Now the latest probe wins: one failed probe replaces an earlier problem straight away. A connected site gets a short grace period. A faileddescribepoll on a connected site probes again, so a stop is noticed without waiting for a save.deco serve(2496e10). It stays neutral with a pulsing dot, and turns red only when something answered but can't be used: out of date, another program, or an error.useLocalStoragewrites its default on every read, so…:<userId>:keys holdingnullwere written before the project id was known. The Localhost connection now uses a scoped store with these rules:Tests added:
use-local-app-reachable.test.tsx: the backoff and grace rules; it waits, then reports the app up on its own; a new URL starts over.preview-tab.test.tsx: the guide while the app isn't answering or isn't checked yet; the frame once it answers; the guide when it goes away, then the frame when it's back; nothing is checked without Localhost.use-content-backend.test.ts(localServeBackend):deco serveconnects (no site check).deco-serve-chip.test.ts: the badge is pending while connecting or waiting, and red only for real problems.use-deco-serve-connection.test.tsx: nothing written before the session loads or without a project id; a read stores nothing; a choice is stored only under:<userId>:<vmcpId>.preview-settings-rows.test.tsx(feat(site-editor): Blocks v8 sites always use Fast Preview #7872): the v8 hint doesn't mention Fast Preview, and v7 keeps it.Every changed test file passes (one process per file).
tsc --noEmitforapps/web, oxlint and biome format are clean.The manual run on the spike was not done. The stack plus a test browser peaks at about 2.9 GB, over the 2 GB per-agent memory limit.
d7a3e8957: on a v8 site with no sandbox, the editor no longer spins on "Starting your preview" before the first edit. Nothing starts there, and there is no draft until the first edit, so it shows the published site with no spinner, then the draft as before.hostedDraftSession(v8 marker plus the GitHub backend) is the input; v7 and sandbox sessions are unchanged. Tests:preview-display.test.ts(hosted draft: no spinner before an edit, the draft after, v7 unchanged, Localhost/suspended still win) andcontent-backend.test.ts(hostedDraftSession).8517d30de:/site-editorand a project's Localhost Preview render ONE empty state,LocalServeEmptyState(local-serve-empty-state.tsx), with the same copy from one place (decoServe.waiting.*): "Waiting for your computer", the same intro, the same two steps, the Site editor guide / deco serve options / Troubleshooting links, and the moving dot./site-editorno longer has the Preview-tab/--previewparagraph, the older-site note, the Quickstart link, or the separate "Looking for deco serve…" screen. Problem states (out of date, another program, error) and the Chrome-blocked state look the same in both places. The "Look for deco serve on this computer" button stays, in the same spot, only while Chrome still needs a click before it asks for local-network permission. Choosing Localhost in a project already counts as that click. Tests:site-editor-guide.test.tsxchecks that both places render the same markup for "nothing answering" and for "another program on the port".preview-tab.test.tsxwas updated.origin/feat/blocks-v8-hostedwas updated by a normal merge (23410da), and its tree matches split/49 (f81747205).🤖 Generated with Claude Code
https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig