Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
1.7 KiB
1.7 KiB
Why
Marketing staff will edit pages that are already live and that printed QR codes point to. Today every Save on a published page changes it for visitors at once, so half-finished edits go live. Staff also start each event page from a blank form, though most event pages share one shape. This is change 2 of the page builder: docs/superpowers/specs/2026-12-03-page-builder-design.md.
What Changes
- Published pages keep a separate draft. Saving a published page stores the draft; visitors keep seeing the published version until staff press Publish changes. Discard changes drops the draft. Unpublishing and pages never published work as today.
- The staff preview and the editor show the draft when there is one. The pages list marks pages with unpublished changes.
- New page first offers a starting point: Blank, Event sign-up or Service showcase (starter templates built from the section types).
- Duplicate copies a page into a new draft of the same company.
- New labels in English and Chinese.
Capabilities
New Capabilities
None.
Modified Capabilities
landing-pages: draft and live content, starter templates, duplicate.
Impact
- DDL:
cms_page.draft(nullable JSON) insql/01-page-draft.sql; mirror inlocal/seed/. - services-counter: save writes the draft for a published page; new publish and discard endpoints;
findByIdreturns the draft; list rows carryhasDraft;findPublishedunchanged. - mobile-api: publish and discard admin endpoints, scoped like save.
- Portal: BFF routes, editor buttons and banner, list badge, preview, template picker, duplicate, labels.
- Rollback:
sql/99-rollback.sqldrops the column, which loses unpublished drafts; the previous release saves published pages directly again.