Skip to content
Start

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.

  1. Empress:site_status — an open set is joined, not doubled.
  2. Empress:changeset_create — title is the person’s sentence.
  3. Empress:site_call — the copy: tool: "content_update", args with the item’s collection, id and the changed fields in data, and changeset. It stays a draft in the set.
  4. Empress:theme_stage — the theme change from its session (session), with changeset.
  5. Empress:site_call — the menu or settings write (menu_set_items, settings_update) with changeset: it is held, not applied, and the answer says what it would replace.
  6. Empress:site_call — a page’s blocks (“a tighter hero” when the hero is a block, not theme code): empress.composition_get for the addresses, then empress.composition_apply with ops by index and changeset. When composition_get names a composition (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.
  7. Empress:site_preview — the stage and the drafts, at three widths.
  8. 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.
  9. Empress:site_status — the set is one entry in the versions section.
  • 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_revert with to: "changeset:<id>" takes back the menu, the theme and each page’s blocks together; published content stays published and the answer names it.