Skip to content

feat(builder)!: drag and drop page editor, and no builder in lite mode - #148

Merged
zVapor-Dev merged 2 commits into
v3from
feat/page-builder-editor
Oct 30, 2026
Merged

zVapor-Dev merged 2 commits into
v3from
feat/page-builder-editor

Conversation

@zVapor-Dev

@zVapor-Dev zVapor-Dev commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

The page builder was a dead end: it advertised drag and drop and AI generation (with an "AI assisted" badge), but had no editor and no way to create a page, even with editor permissions. This adds the editor, and takes the builder out of lite mode, where pages only lived in memory.

Editor

  • New /builder/edit?slug=… page, built on @puckeditor/core 0.23 (the maintained successor of @measured/puck). It loads client side only, so the static export still works.
  • Header actions: Generate (prompt → page, only when an LLM is configured), Save draft, and Puck's Publish.
  • A slug with no page yet opens an empty editor, so "New page" just works.
  • People without edit access get a clear message instead of a broken editor.

Builder list

  • Editors get a "New page" form, see every page including drafts, and get "Draft" / "Unpublished changes" chips. Cards open the editor.
  • The "AI assisted" chip and the "generate from a prompt" copy only show when generation is actually available.

API

  • GET /api/builder/access → { enabled, canEdit, ai }. Never errors, so the UI can always ask.
  • GET /api/builder/pages (editors only) lists pages with their latest version, status and whether a published version is live.
  • GET /api/pages and GET /api/pages/:slug now serve the latest published version, so saving a newer draft no longer takes the public page down.

No builder in lite mode (breaking)

Lite mode kept builder pages in memory, so every restart lost them.

  • buildServer accepts pages: false. The page routes are then not registered, and /api/builder/access answers { enabled: false }.
  • createDashboard passes pages: false, and its pageEditors and ai options are removed.
  • The web app hides the builder when it is off: the sidebar entry, the landing page links and feature card. /builder says the builder is off.
  • The README and CHANGELOG say to run @acstane/core for the builder.

Builder package

  • toPuckData(page) and fromPuckData(data, fallbackTitle) convert between stored pages and Puck data. The page title is a root field.
  • The peer dependency moves from @measured/puck to @puckeditor/core ^0.23.0.

Checks

  • pnpm lint, pnpm typecheck, pnpm build and pnpm smoke:pack (22 packages) pass.
  • pnpm test passes: 295 tests, including new route, Puck conversion and lite mode tests.
  • Tried in Chromium against a mock API: the list, the New page form, the editor and Save draft. With the builder off, there are no builder links on the landing page or in the sidebar, and /builder says it's off.

Requested by zVapor

🤖 Generated with Claude Code

https://claude.ai/code/session_017JdKJpQQK3XuLZTBiZ4gns

…AI prompt

The page builder listed pages and advertised drag and drop and AI
generation, but had no editor or create button. This adds one.

- /builder/edit: a Puck editor (@puckeditor/core 0.23) for a page, with
  Generate, Save draft and Publish actions. A missing page starts empty.
- /builder: editors get a "New page" form and see drafts and unpublished
  changes. The "AI assisted" chip only shows when an LLM is configured.
- GET /api/builder/access and GET /api/builder/pages (editors only).
- GET /api/pages and /api/pages/:slug serve the latest published version,
  so saving a draft no longer takes the public page down.
- toPuckData / fromPuckData convert between stored pages and Puck data.
- The builder's peer dependency moves from @measured/puck to
  @puckeditor/core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017JdKJpQQK3XuLZTBiZ4gns
Lite mode kept builder pages in memory, so every restart lost them. It
now runs without the builder, and the web app hides it.

- buildServer takes pages: false. Page routes are not registered, and
  GET /api/builder/access answers { enabled: false } so the web app can
  hide the builder. With a page store the answer has enabled: true.
- createDashboard passes pages: false, and its pageEditors and ai
  options are removed.
- The web app hides the sidebar entry, landing links and builder feature
  card when the builder is off, and /builder explains that it is off.

BREAKING CHANGE: createDashboard no longer accepts pageEditors or ai, and
lite mode serves no /api/pages routes. Run @acstane/core for the builder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017JdKJpQQK3XuLZTBiZ4gns
@zVapor-Dev zVapor-Dev changed the title feat(builder): drag and drop page editor with drafts, publishing and AI prompt feat(builder)!: drag and drop page editor, and no builder in lite mode Oct 30, 2026
@zVapor-Dev
zVapor-Dev marked this pull request as ready for review October 30, 2026 04:07
@zVapor-Dev
zVapor-Dev merged commit 01bd1dd into v3 Oct 30, 2026
1 check passed
@zVapor-Dev
zVapor-Dev deleted the feat/page-builder-editor branch October 30, 2026 04:15
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