Skip to content

docs(site): add the Deco Blocks docs site (Home, Docs, Under the hood, Roadmap) - #585

Closed
tlgimenes wants to merge 132 commits into
mainfrom
docs/blocks-site
Closed

tlgimenes wants to merge 132 commits into
mainfrom
docs/blocks-site

Conversation

@tlgimenes

@tlgimenes tlgimenes commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

What this is

The source of the Deco Blocks documentation site, under site/, plus a workflow that builds it and (after merge) publishes it to GitHub Pages.

The site is one self-contained HTML page with four hash-routed parts:

  • Home: what Deco Blocks is and how publishing works, with an interactive outage example.
  • Docs: the proposed API for the next major: quickstart, content model, schema, routing, preview, Studio compatibility, the Next.js and TanStack guides, and the API reference.
  • Under the hood: how the runtime resolves, routes and loads content, with a step-by-step walkthrough widget.
  • Roadmap: the to-do list that gets the next major to a release: ten release blockers, Studio support, work items (API, CLI, Studio, docs), migration plans for storefront-tanstack, blog-tanstack and a FastStore storefront, and a filterable table of 111 features with status and effort.

It also has ⌘K search, a light/dark theme toggle and a print layout. The only external requests are the Fontshare and Google Fonts stylesheets and the font files they load. No analytics and no third-party scripts.

Layout

  • site/build.py assembles site/dist/index.html (gitignored) from site/src/*. Python 3.9+, standard library only.
  • site/gen_roadmap.py renders the Roadmap from site/data/roadmap.json and checks it: ids, cross-links, counts, and links into the docs.
  • site/data/roadmap.json holds exactly what the Roadmap shows, nothing more.
  • site/src/ has the page shell, Home, the Docs/Under-the-hood content (with the MIT-licensed Prism bundle and its notice), CSS, JS and brand SVGs.
  • .github/workflows/pages.yml builds on PRs that touch site/ and deploys to Pages on pushes to main of this repository (and manual runs on main).

See site/README.md for the data format and the public-content policy.

Preview

Locally:

python3 site/build.py && open site/dist/index.html   # xdg-open on Linux

From this PR: open the "Docs site" workflow run under Checks, download the docs-site artifact, unzip it and open index.html.

Left out of the public build on purpose

  • The underlying analysis. The Roadmap comes from a code-level review of three sites. Only the conclusions are committed: feature statuses, effort, summaries and plans. The per-file evidence and working notes are not.
  • One of the three sites is private. It appears only as "the FastStore storefront", with platform-level facts (FastStore v4, Next.js Pages Router, VTEX Headless CMS). Details that could identify its codebase or owner were removed or generalized.
  • Issues in code that is deployed or released today are not described on the site. Where the next major needs a design change because of them, the Roadmap states only the design requirement for the unreleased API.
  • No local paths, personal data, internal URLs or customer names.

Before going public

  • Enable GitHub Pages with source GitHub Actions (Settings › Pages). Until then the deploy job on main fails; nothing else depends on it.
  • Review the anonymized FastStore storefront content (Roadmap › Site migrations › FastStore storefront, and the FastStore rows in the feature table).
  • Decide whether to announce the unreleased next major publicly. The Docs and Roadmap describe an API that isn't released yet.
  • Apply the docs corrections listed under Roadmap › Work items › Docs (the items that correct statements that are wrong today come first).
  • Optional: set up a custom domain for the Pages site.
  • Squash-merge with a docs(site): … title, so the change doesn't trigger a package release.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig


Summary by cubic

Adds the Deco Blocks docs site under docs/ plus a workflow that builds it on every PR touching docs/ (downloadable artifact) and deploys it to GitHub Pages from main. It documents the released framework (v7) and the next major's composition-based, Git-backed content model across Home, Docs, Under the hood, and Roadmap; the Roadmap tracks what isn't shipped yet.

Site

  • A standalone Bun package: TanStack Start prerenders each page to static HTML, content lives in MDX, Shiki highlights code at build time, and Pagefind backs the ⌘K search. The build checks every internal link, fails on a page over 48 KB gzipped, and renders the Roadmap as one page per section.
  • v7 is the default version with its own home at /; the next major lives under /next/ with a "v7 (current)" / "next" version select. The Roadmap tab shows only while the next-major version is selected.
  • Next-major content is JSON files in .deco/ (block map index.ts(x), saved blocks blocks/), edited by developers, agents and Studio; deco content turns them into .deco/blocks.gen.ts that createCMS reads with { blocks, content }. There's no type-level Content map, publishing is committing, a draft is another version your content loader fetches, and preview is your app rendering a draft.
  • Next-major pages describe the framework as it works and say "Deco"; the site chrome says "Deco CMS". Blocks is the syntax for serializing function calls as JSON, with Deco CMS as what's built on it, grouped Getting started → Blocks → Built on Blocks → Delivering content → Websites → Telemetry & analytics → Production → Reference → Hosted Deco CMS → Under the hood. Built-in blocks such as lazy, multivariate, page, redirect and telemetry are always present and overridable by declaring the same key. The CLI ships inside @decocms/blocks with --root on every command; deco check validates every saved block against schema.gen.json, runs in the build, and CI keeps the schema committed. deco serve hosts Studio locally.
  • A <Hosted> notice marks where the hosted product changes the experience. The v7 docs span 49 pages including Studio training videos; the Roadmap renders from docs/data/roadmap.json, validated at build time, and internal design notes moved from docs/ to notes/.

Rollout

  • Enable Pages with "GitHub Actions" as its source; until then the deploy job on main fails, with nothing else depending on it.
  • Squash-merge with a docs(site): title so no package release is triggered.

Written for commit befb394. Summary will update on new commits.

Review in cubic

tlgimenes and others added 30 commits October 3, 2026 03:11
…, Roadmap)

Adds the source of the Deco Blocks documentation site under site/ and a
workflow that builds it on pull requests (downloadable artifact) and, once
GitHub Pages is enabled, deploys it from main.

The site is one self-contained page built with the Python standard library
(python3 site/build.py -> site/dist/index.html). The Roadmap is rendered
from site/data/roadmap.json by site/gen_roadmap.py, which also checks ids,
counts and cross-links.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Prose, code blocks, tables, callouts and diagrams now share the same
720px column, so their left and right edges line up. This drops the
70ch cap on paragraphs, the wide-screen breakout of code and tables,
and the edge-to-edge code panels on phones. Code lines longer than the
column scroll inside their panel.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
The stability section no longer talks about CMS outages: no outage
switch, no "unreachable" status, and the points now speak to speed and
stability by design. The hosted-CMS section says changes go live in
seconds instead of about five minutes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Drops the preview badge and notes from the home hero, the home footer,
the docs sidebar, the docs footer and the top of "How it works".

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

createCMS's loader option is optional and defaults to "./.deco", so the
quickstart example drops it. "Loaders and deployment" gains a
"Configuring the loader" subsection: the default, a different root
directory, the hosted Deco CMS token (the site's API key, kept in an
environment variable), and both together.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
The hero's fourth step now shows the whole setup in one file:
createCMS({ blocks: { experiments } }) and the resolve call, instead of
importing a cms module the page never shows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
- Flatter, shorter example file names, one name per file everywhere:
  cms.index.ts -> blocks.ts, src/cms/cms.ts -> cms.ts, content/* and
  views/* moved to the root, the framework guides' src/cms/*,
  src/views/*, src/server/* -> src/*. Framework-mandated paths
  (app/.../page.tsx, src/routes/*, .deco/*) stay.
- The guides' base map, product block and block map merge into one
  src/blocks.ts(x) each.
- Options equal to their defaults and no-op lines are dropped
  (runtime = 'nodejs', a bare `enabled;`, needless variables, duplicate
  react imports).
- Correctness fixes found on the way: "get" references renamed to
  resolve, the multivariate map's missing imports, the alias snippet's
  imports, a stray </section>.
- The Experiments result is named `flags` instead of `enabled`.

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

- Blocks (#model) now teaches blocks as function composition stored as
  data: the composition in code, the same composition as JSON, saved
  entries as named compositions in a content map, and one page resolving
  step by step ("Resolving a page, step by step").
- Saved entries are no longer described as files in .deco/blocks. A new
  Core concepts section, "Content and loaders" (#content), explains where
  that map comes from: files by default, bundled JSON, the hosted Deco
  CMS or your own store, plus configuring the loader and writing one.
  Loaders and deployment keeps release and deployment behaviour.
- { resolve: false } moves out of the prose into one "Reading without
  running" callout; the Quickstart aside about it is gone.
- Troubleshooting now agrees with the registry rule (the function wins
  on a name clash), so that item leaves the Roadmap's contradictions list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Adds a TypeScript "Means" next to the JSON examples where it teaches
something: the quickstart's Experiments entry, HomeHero's variants, a
page holding blocks, ProductPage, two API reference rows and the
walkthrough caption, in the same layout the Blocks page uses.

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

- client.resolve(target, { run: false }) reads without running any
  function; client.list(type, { run: true }) runs each entry. The
  signatures, examples, troubleshooting and the walkthrough follow.
- A cohesion pass over every page brings the rest of the docs in line
  with blocks as function composition and the content map: pages tagged
  with a Content type are read, not resolved; publishing is scoped to
  the hosted CMS vs the next deploy; captions name saved entries rather
  than files; loader wording no longer assumes the filesystem; stale
  links and leftovers fixed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Six technical writers, a concept-order audit and a task-based newcomer
read the whole site as a developer who knows TypeScript and CS basics
but not Deco. About 75 edits followed, then a cold read and an accuracy
review:

- Deco terms defined at first use, with a short glossary; "section",
  "client", "release", "revision", "isolate" and the meanings of
  "loader" explained once and linked elsewhere.
- One revision rule everywhere, and pointers to the Roadmap where the
  client can't expose the revision yet.
- Rendering now comes before Routing; repetition trimmed ("one client
  per request", "section").
- Wrong statements corrected (page entries vs resolve, fallback while
  the API is down, route conflicts reaching production, satisfies and
  typing, RSC serialization).
- Block types are lowercase/kebab-case, entries capitalized.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
A block that returns JSX is just a block. The glossary entry,
definitions, "section" wording in guides and examples, the home page
block map comment and Roadmap titles now say "block" (or "a block that
returns JSX"). Kept: the page's `sections` field, described as a list
of blocks, and Studio's legacy names, labelled as such.

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

- createCMS({ blocks, content, token? }): content (a generated snapshot
  or any Loader) replaces the loader option; the SDK never touches the
  filesystem and runs in any JavaScript runtime. KV example included.
- CLI: deco schema and deco content (writes .deco/blocks.gen.ts, one
  import per JSON file, hot-reloaded by the framework), both with
  --watch and --root, run from predev/prebuild.
- page and redirect are built-in content types; override them in
  Content or opt out with never.
- remoteLoader checks for a release every minute (interval option,
  DECO_CONTENT_INTERVAL, 1-minute minimum, +/-10s jitter), at idle
  moments, inside waitUntil on Workers; instances are shared through
  globalThis.
- A block is either a function (code) or saved content (JSON).

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

- deco schema finds blocks.ts(x) in the root or src/; --entry overrides
  it. Flags listed once: deco schema [--entry] [--root] [--watch]
  [--check], deco content [--root] [--watch].
- Compatibility is a CI check, not a runtime rule: the claim that the
  Deco API holds back releases whose schema doesn't match is gone.
  "Keep the schema compatible" defines breaking vs non-breaking changes,
  explains backward vs forward compatibility (deploy code first), and
  ships a GitHub Actions workflow running deco schema --check (planned)
  against the base branch's schema.
- Workers guide: the bundled snapshot stays in memory as the fallback;
  large sites can pass a KV Loader as content instead, with the KV key
  seeded before the new Worker serves traffic.

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

- Studio builds its forms from whichever schema the user points it at,
  usually main's; the docs no longer say it is meant to read only the
  deployed schema. The Roadmap item becomes an option to follow the
  deployed schema.
- The home page's "Safe with the live code" point is gone (too technical
  for that page); the points row is three columns now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
site/ is now a standalone Bun package (its own package.json and
bun.lock; the monorepo lockfile is untouched):

- TanStack Start (Vite + React 19), file-based routes, every page
  prerendered to static HTML for GitHub Pages; BASE_PATH sets the base.
- Content in MDX (content/next/*.mdx, content/v7/*.mdx) with
  frontmatter-driven navigation, Shiki highlighting at build time,
  and the docs' components (callouts, flows, terms, the walkthrough).
- Versions: /next/<page> for the next major, a /v7/ stub, and a version
  select in the header. Home at /, Roadmap at /roadmap (React port of
  the old generator, its checks in scripts/check-roadmap.ts).
- Pagefind for the search dialog; the build checks every internal link
  and a size budget.
- Text and code of all 25 doc pages are identical to the previous
  single-page site; the Python build is removed, and the Pages workflow
  builds the new site with Bun.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
- legacy.css and roadmap.css are gone: design tokens live in the
  Tailwind theme (colors via light-dark() variables, fonts, type sizes,
  radii, shadows, easing), components use utilities, and what remains
  is tokens, a base layer, the MDX prose layer and a few scoped
  component rules (CSS 154 KB -> 46 KB of source). Pixel-identical to
  the previous build apart from the layout below.
- The docs shell is full width: sidebar on the left edge, "On this
  page" on the right, the centre column takes the rest; the article
  keeps a reading width (720px, up to 800px from 1920px wide) and the
  whole shell caps at 1920px on very large screens.
- The build fails if a page's HTML exceeds 48 KB gzipped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…s, writing pass

- v7 (current): 49 pages documenting the released framework and its
  companion apps (TanStack Start on Workers, Next.js, CLI, Studio and
  the admin protocol, Fast Deploy, caching, observability, upgrading),
  checked against the source. v7 is the default version and has its
  own home at /; the next-major home moves to /next/. The version
  select appears on both homes and switches between them.
- Next major: "Studio and the content protocol" (JSON-RPC: describe,
  schema.get, blocks.list, blocks.apply; polling; GitHub backend and
  `deco content serve`; what degrades), "Upstream API clients" (thin
  instrumented clients, a recipe, caching in the bindings; invoke and
  cachedLoader removed), telemetry with createCMS({ site, token }) and
  a Telemetry entry, and RUM as a post-release follow-up.
- Writing pass across both versions: correctness, cohesion and style
  reviews; examples centred on blocks that render React components
  (ProductCard, PromoBanner, product hero), shorter and e-commerce.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…h-off via Studio

- Every TS/TSX/JS code example now uses double quotes and semicolons
  (31 blocks; line breaks unchanged), plus inline code in prose and the
  Roadmap.
- Turning telemetry off is a Studio edit to the Telemetry entry,
  committed through Studio's GitHub integration and picked up with the
  next content check; no separate channel.
- deco schema --check is part of the first release.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
The Roadmap is about the next major, so the header and drawer list it
only while the next-major version is selected (next home, /next/ pages
and the Roadmap itself); v7 pages and the v7 home don't show it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
The version select drops "major": the options read "v7 (current)" and
"next". The v7 home's footer link reads "Next version".

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

- One story: content is JSON files in .deco/blocks in your repository,
  changed by developers, agents and Studio; deco content turns them into
  a module for createCMS; publishing is committing; the hosted Deco CMS
  makes published commits live without a deploy.
- Custom loaders stay in the API but leave the narrative: the
  "Where content comes from" table, the "Write your own loader"
  walkthrough and the KV setup are gone; one pointer remains, plus the
  Loader reference.
- "Your content in Git" (/next/content) opens with the files you
  already have, then how your app reads them, then publishing;
  resolve appears only where it's needed.
- Studio's role is stated consistently: saves are commits on a draft
  branch, publishing brings them to production.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Content brought into the v7 docs only, each piece checked against the
source and corrected where it differed:

- New "Going live after a migration" page: cutover checklist, parity
  checks with @decocms/parity, the CI workflows the migrator writes,
  and shifting traffic gradually with withABTesting.
- Additions to the Fresh migration, VTEX (sales channel, sign-in,
  autocomplete), routing (your own routes), variants (whole-page
  variants, scheduled campaigns), content (saved vs local sections,
  redirects incl. CSV import), loaders, TanStack (React Compiler,
  chunking), troubleshooting, observability, SEO (robots.txt),
  glossary, and public links to Cloudflare, VTEX, Resend, React,
  TanStack, Next.js, npm and the repo's examples and skills.

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

- v7 overview: the five Deco Studio training videos (Portuguese), each
  paired with the English page that covers the same ground.
- Next home: the "Swap any piece" card becomes "Publish by committing"
  (Git-based content, live in seconds with the hosted Deco CMS), and
  the "Content & loaders" labels become "Content".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
- page, redirect and telemetry are built-in blocks: createCMS spreads
  them under your block map, so they're always defined and your map
  can override them. Resolving a saved page returns it ready to render
  (seo and every block in sections resolved); UNKNOWN_BLOCK only means
  a name is in neither the block map nor the saved entries. Reading
  with { run: false } and resolving blocks one by one stays as an
  optional streaming technique.
- The content module: the SDK makes no filesystem calls so it runs in
  any JavaScript environment; content arrives as JSON imports that
  `deco content` generates.
- The deco publish note moves from the Content page to Design
  decisions (Under the hood).

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

- Core pages teach the framework on its own: content is files in Git,
  blocks upgrade through commits and your normal deploy, previews are
  branches or your own preview deploys, and Studio can edit your
  working tree through `deco content serve`. createCMS({ blocks,
  content }) without site/token.
- A new <Hosted> notice card marks the twelve places where the hosted
  product changes the experience (publishing without a deploy, drafts
  on your real site, Studio on GitHub, telemetry), each linking to the
  new "Hosted Deco CMS" section: overview and connecting a site,
  publishing, drafts, Studio, telemetry.
- Hosted details moved out of core pages; internals moved to Under the
  hood; check-content validates the cards' links.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…o serve`

- `deco serve` (not `deco content serve`) is the local server for
  Studio: it serves your content, your schema (read-only) and upload
  URLs. Uploads are written to .deco/assets/ (or --assets) and stored
  as /assets/<name>; the hosted Deco CMS stores them on a CDN.
- Editing a local checkout in Studio is planned to need no Deco
  account, through a play workspace.
- Telemetry is a hosted-only feature; for your own observability,
  instrument your code with OpenTelemetry. The instrument-hook plan is
  gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
- The internal design notes, runbooks and plans move from docs/ to
  notes/ (history kept); every link to them is updated (CLAUDE.md,
  READMEs, skills, plans, code comments and the migrator's workflow
  template).
- The docs site moves from site/ to docs/. The Pages workflow, the
  site's README and ARCHITECTURE notes follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
The worked example resolves the product card the page opens with
(SummerCard -> CurrentProduct), inside out; pages are compositions too.
Expert material (streaming, telemetry, revisions, content setup) leaves
the page; links that pointed at removed headings are updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
tlgimenes and others added 10 commits October 3, 2026 17:34
…ad recipes

- releases-and-drafts: "Preview a variant". A pointer can force
  variants (saved block + JSON path of the multivariate -> variant
  index); forDraft applies them, even over the content module, and
  forRelease never does. Stale addresses are ignored; variants are not
  access control.
- api-reference: DraftPointer.variants and the reserved `__variant`
  query parameter (`<block>@<path>=<index>`, URL-encoded), with an
  example; forDraft applies them and loads the draft without them.
- matchers-and-variants, studio-compatibility, content-protocol: the
  site editor's variant tabs use the pointer (local deco serve: a
  pointer to the serve endpoint; hosted: the draft pointer), v7 keeps
  x-deco-matchers-override.
- TanStack Start (descriptors + RSC): "Reload on content changes",
  the two template pieces local editing needs (cms.ts taking a new
  content module through import.meta.hot, and a Vite plugin that
  reloads pages when .deco/blocks.gen.ts changes). Next.js: why
  next dev needs neither.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
A server that renders a draft is a production server reading a draft
pointer, and its release checks don't depend on drafts. Who may preview
shows the one-host recipe (pointer and cookie gated by the app's rule).

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

schema: a tag on a type alias reaches every field of that type (the
color picker on a literal select). renames-and-migrations: v8 has no
async rendering; the migration replaces v7 Lazy/Deferred wrappers with
the sections they held.

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

The well-known saved block CMS (type cms-settings) holds preview, telemetry
and analytics sections; code keeps destinations, secrets and caps, including
the new createCMS preview.hosts. cms.settings() reads the release in memory.
cms.draftPointer/draftCookie ignore drafts on hosts outside the effective
list. Documents the host pattern rule, the site editor's Settings entry and
folding v7 and prerelease settings into CMS.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Remove the --token flag, DECO_SERVE_TOKEN and every mention of a
deco serve token. Explain how the local server is protected (origin and
Host checks) and that --host exposes it to the network without auth.
The printed link is studio.decocms.com/site-editor#endpoint=<rpc url>.

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

@hugo-ccabral hugo-ccabral left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: request changes. One blocker, two major, one minor. Reviewed at d04c444c.

The site itself is well built. I found no correctness bug in the build pipeline. The blocker is about what happens at merge, not about the code.

Severity Count Where
BLOCKER 1 .github/workflows/pages.yml:90: merging publishes the site right away
MAJOR 2 docs/promo/.gitignore:1 (+ the committed docs/promo/node_modules symlink); docs/src/lib/versions.ts:23 (next-major pages don't say the API is unreleased)
MINOR 1 PR description (below; it isn't a diff line)

MINOR: the description is stale, and it becomes the commit message on main

The repo squashes with squash_merge_commit_message=PR_BODY (see the comment at .github/workflows/release.yml:35-40), so this description is what lands on main for good. Today it describes a different PR:

  • 'What this is', 'Layout' and 'Preview' describe site/, build.py, gen_roadmap.py, site/data/roadmap.json, a Prism bundle and python3 site/build.py. None of these exist. The diff is docs/ (a Bun package: TanStack Start, MDX, Shiki, Pagefind), plus the move of the design notes from docs/ to notes/ (32 renames, with link updates in README, CLAUDE.md, the .cursor skills and comments in packages/*), plus docs/promo/, which the description doesn't mention.
  • 'Until then the deploy job on main fails' is no longer true (see the blocker).
  • It contains a claude.ai session link, which would then stay in main's history.

The cubic summary at the bottom roughly matches the diff. Please rewrite the human-written part from it before squashing.

Release safety: the title docs(site): ... maps to release: false in .releaserc.json. The description has no breaking-change marker or CI-skip token. The packages/* edits only change comments and docs paths. So merging won't publish any package. Keep it that way when you rewrite the description.

Checked, fine

  • Workflow: pull_request, not pull_request_target. Top-level contents: read, and pages/id-token: write only on the deploy job. persist-credentials: false. No dependency cache, so nothing to poison. Frozen bun install. The deploy guard checks main and the repo, and the github-pages environment only allows main. Concurrency is reasonable. The actions use tags rather than SHAs, as release.yml does, so I didn't flag it here. All five tags exist upstream.
  • Build: rehype-docs.ts registers explicit ids before generated ones, so a slug collision gets -2 and never takes a pinned id. postbuild.ts fails the build on broken internal links and anchors, the size budget, Pagefind errors and missing redirect targets. check (tsc, content, Roadmap) and build run on PRs and passed.
  • Search: Pagefind results are filtered by the selected version plus Roadmap and Home, so v7 readers don't get next-major results. useReveal cleans up its observer and listeners.
  • v7 docs vs the code: a script checked every import { ... } from "@decocms/..." in docs/content/v7/*.mdx against the package exports maps and their sources. All subpaths and names resolve. The withDeco rewrites and transpilePackages claims in v7/nextjs.mdx match packages/nextjs/src/config.cjs. The deco-* commands in v7/cli.mdx match the bin entries of @decocms/blocks-cli.
  • Confidentiality: I searched all of docs/ for secrets, tokens, internal hostnames, local paths, and FARM-family and other customer names. The notes/ files are renames of files that are already public in this repo. Apart from the symlink below, I found nothing. Every external URL is public (GitHub, YouTube links, vendor docs, example.com). docs/bun.lock has no private registry. The .cursor/skills edits only change docs/ paths to notes/. The dangerouslySetInnerHTML sinks only render committed content (SVG constants, Shiki output, roadmap.json), not user input.

Could not verify

  • Whether the anonymized FastStore content still identifies the storefront. That needs someone who knows it.
  • Whether some Roadmap summaries describe the released v7 code or only the next-major prototype. One example: docs/data/roadmap.json:3825, 'Draft caches are unbounded, input-keyed caches miss request state, and the site editor's bypass flag is ignored'. If any of them describe deployed code, they conflict with the description's policy on issues in deployed code. Please check them in the same pass as the FastStore content.

path: docs/dist/client

deploy:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && github.repository == 'decocms/blocks'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKER: merging publishes the site right away. Your 'Before going public' checklist doesn't gate anything.

The description and the header comment (lines 14-15) say the deploy job fails until Pages is enabled. Pages is already enabled. GET repos/decocms/blocks/pages returns build_type: workflow, public: true, html_url: https://decocms.github.io/blocks/. The github-pages environment allows main. The URL returns 404 today, so nothing has been published yet.

What happens: the squash-merge is a push to main that touches docs/**. That runs build, then this job, then deploy-pages. The whole site goes public on merge, including the next-major API and the FastStore storefront migration plan. Three items on your checklist are still unticked: reviewing the anonymized FastStore content, deciding whether to announce the unreleased next major, and applying the docs corrections.

Suggested fix, either of:

  1. Finish and tick those items before merging. Then the workflow can stay as it is.
  2. Gate the deploy so merging and publishing are separate steps. For example, add && vars.DOCS_PAGES_DEPLOY == 'true' to this if: and to the 'Upload the Pages artifact' step, and set the variable once the decisions are made. Also update the comment on lines 14-15 so it no longer says the job fails.

Comment thread docs/promo/.gitignore
@@ -0,0 +1,4 @@
node_modules/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR: docs/promo/node_modules is committed as a symlink to a local path.

git ls-files -s docs/promo/node_modules shows mode 120000 pointing at /tmp/deco-promo-tools/node_modules. It got committed because node_modules/ with a trailing slash only matches directories, and a symlink is not a directory. The root .gitignore:1 has the same pattern.

What breaks:

  • It publishes a path from the author's machine. scripts/check-content.ts:63 misses it because it only scans content/*.mdx, and it doesn't look for /tmp/.
  • On Linux and macOS, the link dangles on every clone. Following docs/promo/README.md (npm install) either fails with ENOENT or installs into a shared /tmp directory.
  • On Windows with core.symlinks=false, the link checks out as a one-line text file, and npm install fails because node_modules is a file.

Fix: run git rm --cached docs/promo/node_modules and use node_modules (no trailing slash) here and in docs/.gitignore.

Also, separately: docs/promo/ is a Playwright + Python generator for a promo video about the unreleased next major. The site doesn't need it, and the description doesn't mention it. Consider moving it to its own PR. That way it's reviewed with the decision on announcing the next major, not slipped into this one.

Comment thread docs/src/lib/versions.ts

export const VERSIONS: readonly DocsVersion[] = [
{ id: 'v7', label: 'v7 (current)', description: 'The current released version', home: '/' },
{ id: 'next', label: 'next', description: 'The proposed API for the next version (unreleased)', home: '/next/' },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR: 40 of the 42 next-major pages read as released documentation.

Only content/next/how-it-works.mdx and content/next/quickstart.mdx have the 'not released yet' callout. Commit d9421b2 removed the notices from the next home hero, the sidebar and the docs footer. The description here is only used as the version select's title (src/layout/Header.tsx:113), so most readers never see it.

Concrete case: someone opens a link to /next/cli. Lines 13-19 say the CLI 'ships inside @decocms/blocks, so there's nothing extra to install', and show npx @decocms/blocks schema. Today @decocms/blocks has no bin. The only packages with a bin are @decocms/blocks-cli (deco-*) and @decocms/eitri. So the command fails, and nothing on the page says why. The same goes for /next/api-reference, /next/schema, /next/checking and others.

Suggested fix (DRY, one place): in DocsShell, render a banner on every page of a version that isn't released. For example, add released: boolean to the version entries here and show the banner when it's false. Then drop the two per-page callouts, so the notice can't drift from page to page again.

tlgimenes and others added 6 commits October 5, 2026 11:46
…ases, migration hosts

- One instance per process: each createCMS call is a handle holding its own
  block map on the shared instance, so Next's proxy.ts can import the app's
  cms without replacing its map.
- cms.settings(): an update() keeps the previous release's settings until the
  next one loads; the settings are frozen.
- Host patterns: a URL with a username or password, or a hostname with an
  empty label, matches only "*".
- Migration: previewHosts trimmed and lowercased, invalid entries reported,
  and TanStack Start's <site>.deco.site / <site>.deco-cx.workers.dev added.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
deco serve no longer has an origin allowlist, --allow-origin or a Host
check. Say plainly that it has no authentication and answers any
website, so run it only while editing; --host also exposes it to the
network.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
deco serve prints and links http://localhost:<port>/rpc and listens on
127.0.0.1 and ::1 by default.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
Documents the schema.get result for a site without a generated schema,
what blocks.list/blocks.apply and the site editor do meanwhile, why
describe doesn't report it, and narrows NotFound to a missing .deco folder.
Adds a troubleshooting row for the plain-fields banner.

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

Copy link
Copy Markdown
Contributor Author

Moved to deco-sites/docs-tanstack#4, which imports these pages pinned to befb394 (this branch's latest commit), so nothing is lost. Closing here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants