Editor command vertical slice
The Morning Bell example now demonstrates the intended mutation path end to end for its local-development proof of concept:
- An editor selects an approved Hero or Content field, presentation variant, or structural action in the React overlay.
- The browser sends a schema-bounded patch plus a unique
Idempotency-Keyto the private API route. - The route validates the development session and builds a tenant/site-scoped identity.
executeCommandauthorizescontent.edit, performs the draft patch once, and records a succeeded or replayed audit event.- Publishing requires a browser confirmation and a separate explicit confirmation header before
content.publishis run. - The published page reads the published snapshot; preview/edit read the draft snapshot and remain
private, no-store.
The example now edits the approved layout variant (left, center, or split) and updates the server-rendered DOM immediately while persisting the typed variant through a guarded command. Preview opens the draft in a separate private tab.
The Content component proves that this is a registry, not a Hero-specific editor. It opts into movement, removal, and duplication with a six-instance limit. The overlay exposes only those actions, sends a bounded structural command, and reloads the server-rendered draft after success. Hero remains non-duplicable. Public, preview, and edit modes still use the same two Astro components.
This remains a local POC: the cookie identity, in-memory idempotency/audit stores, and repository are replaced in production by OAuth/OIDC, authoritative D1 memberships, Durable Object versions/audit storage, and cache invalidation. Its purpose is to prove that the overlay does not bypass the production-shaped command boundary.