Composing a change set
The person says: “New hero copy, a tighter hero, and add Events to the nav.”
That sentence crosses three planes: content, the theme, and a menu. As one change set it is one preview, one promote and one undo; as three separate calls the menu goes live the moment it is written.
The loop
Section titled “The loop”Empress:site_status— an open set is joined, not doubled.Empress:changeset_create—titleis the person’s sentence.Empress:site_call— the copy:tool: "content_update",argswith the item’scollection,idand the changed fields indata, andchangeset. It stays a draft in the set.Empress:theme_stage— the theme change from its session (session), withchangeset.Empress:site_call— the menu or settings write (menu_set_items,settings_update) withchangeset: it is held, not applied, and the answer says what it would replace.Empress:site_call— a page’s blocks (“a tighter hero” when the hero is a block, not theme code):empress.composition_getfor the addresses, thenempress.composition_applywith ops by index andchangeset. Whencomposition_getnames acomposition(the theme declares the page’s slots, the home page’s hero and body), address a section by its slot instead:{ op: "setSection", slot: "hero", content: [blocks] }replaces it wherever it sits, the same op on every site; a slot the page does not declare is refused with the ones it does. It drafts, never goes live, and answers with a picture of the draft; no build.Empress:site_preview— the stage and the drafts, at three widths.Empress:changeset_promote— once the person agreed;confirm: true. Members go live in order: content, then page compositions, then the theme, then the held writes.Empress:site_status— the set is one entry in the versions section.
Judgment
Section titled “Judgment”- What a set cannot hold, it refuses. A delete or a publish-now write inside a set is refused with what to do instead; do it outside the set only if the person wants it live at once.
- A promote that stops halfway says where. Promote again to carry on from there; what already went live is named.
- The undo is the set.
Empress:version_revertwithto: "changeset:<id>"takes back the menu, the theme and each page’s blocks together; published content stays published and the answer names it.