# 🤖 Slides: steps, core and full, and the presenter — design

Design, 2026-11-18, **draft 2, approved by Paul the same day.** Draft 2 answers a builder's
read of draft 1 (§11). Written by Claude
Opus 5.5 on branch `design/presenter-window`, cut from `origin/main` at
`86efe67`, from conversations with Paul on 16 to 18 November.

The mockup is beside this file: `2026-11-17-presenter-mockup.html`.
Paul of the mockup, 18 November: "Looks great." **The mockup shows the
presenter window. Where this text and the mockup disagree, this text
wins.**

This replaces the presenter, steps and core/full parts of the unapproved
11 November draft (`design/presenter-and-rehearsal`). Rehearsal, checks,
layouts, offline and the agent verbs in that draft stay out (§9).

---

## 0. Intent

The HalfStack Vienna talk ran on a custom deck because Slides could not
give it three things: slides that build press by press, a short and a
long version of one talk, and a presenter window good enough to stand
behind. This slice gives Slides those three.

**Success** is that the Vienna talk's structure (105 slides in the talk,
64 kept out of it, about 240 presses) can be built in Slides and given
from this window, and that at no point during the talk does the speaker
wonder what the last press did.

That last clause is Paul's, from the day: "I was pressing advance, and
the slide number wasn't going up ... I wasn't sure why."

### 0.1 Goals

1. A box can arrive on a press, and a list one item per press.
2. A slide is in the talk, full only, or parked.
3. The presenter window is the HalfStack deck's, and never scrolls.
4. Every press visibly changes something beside the slide number.
5. A press always moves the window it was made in, even with no network.

### 0.2 Non-goals

- Steps that drive video or a scene, anything that plays by itself, exit
  steps, motion paths, per-box timing. Scenes and video are the next
  slice.
- Both windows staying together with no network. Wanted, and next after
  this in spirit, but it belongs with offline, which may be a Mac app.
- Rehearsal, requests, checks, the storyboard, layouts as data.

### 0.3 Anti-goals (failure even if it works)

- **A press with no visible answer.** The fault Paul hit.
- **A window that scrolls.** Paul, 18 November: it "shouldn't happen in
  the live version".
- **A busier editor.** The editor has just been made quiet. Steps must
  not add standing chrome to it.
- **A press lost or repeated.** A clicker pressed twice moves twice; a
  slow network neither drops a press nor replays one.
- **Readers seeing the talk's unfinished parts.** A parked slide reaches
  nobody but people who can open the deck in the editor. Slides has no
  read-only role among a deck's members, so that is everyone with
  access to the deck, and nobody holding only a share or follow link.

---

## 1. Decisions

Paul's are marked. The rest are this design's, listed so they can be
reversed in one place.

| # | Decision | Whose |
|---|---|---|
| S1 | A box appears with the slide or on a press; a list can arrive one item per press. | Paul |
| S2 | A box that has not arrived keeps its space. | Paul (from the deck) |
| S3 | Back undoes one press. Arriving on a slide from the one after it lands fully built. | Paul (from the deck) |
| S4 | The editor's stage always shows the finished slide, never dimmed. | Paul (approved the review's form) |
| S5 | How things arrive (appear, fade, rise) is one setting for the deck. | Paul (same) |
| S6 | A slide is **in the talk, full only, or parked**. Parked slides stay in place in the strip as a slim bar. | Paul |
| S7 | The window you press in always moves at once; other windows follow through the server. | Paul |
| S8 | The presenter window is the HalfStack deck's, copied, with one added menu. | Paul |
| S9 | Its layout can be rearranged; notes fit or scroll with their own text size; any slide can be jumped to. | Paul |
| S10 | The window never scrolls. | Paul |
| S11 | The step count sits beside the slide number. | Paul |
| S12 | Present opens the slide; P opens the presenter window. | Paul (accepted) |
| S13 | A position is absolute: this slide, this step, this mode. | This design, so a Mac app can use it later |
| S14 | Presses are worked out from the boxes, never stored. | This design |
| S15 | The audience's follow link shows steps as they are revealed. | This design |
| S16 | A press is numbered by the order of its boxes' `step` values, and two boxes sharing a value arrive together. | This design |
| S17 | The window loads the whole talk into memory before the first press, so a press needs no network. | This design, following S7 |
| S18 | While connected the server orders presses, so two that cross both count. After a split the laptop's presses win. | This design |
| S19 | The signed-in presenter may always drive their own talk. Pressing Present again no longer cuts off a paired phone. | This design |
| S20 | Moving through the talk and seeing steps work with scripts off. Arranging and Fit are enhancements. | House rule |

---

## 2. The document

Three additions, all optional, so every existing deck is unchanged.

- **Block `step`**: a number above 0. Absent means the box arrives with
  the slide. Boxes with the same value arrive on the same press.
- **Block `items`**: `together` (absent) or `each`, on lists only. `each`
  gives every item its own press, in order.
- **Slide `talk`**: `full` or `parked`. Absent means in the talk.
- **Deck meta `arrive`**: `appear` (absent), `fade` or `rise`.

They travel on the existing ops: `set_block`, `set_slide` and `set_meta`.
No new op. Each lands in `core/src/schema.rs` and `ops.rs`, the fixtures
and `internal/slides/deck` together, with vectors, as the fixtures rule
requires.

**Presses are derived** by one function, `deck.Presses(slide)`, with
vectors shared by Go and the JS bundle. Distinct `step` values in order
are the presses; an `each` list expands to one press per item; a press
that reveals nothing visible (an empty list, a box hidden by its
container) is dropped. Press 0 is the slide as it arrives. Because
values are only compared, placing a box between two others writes the
midpoint, and nothing is renumbered.

**The talk's order** is the slides in deck order, less parked slides,
less full-only slides in core mode.

---

## 3. What each surface shows

| Surface | Steps | Full only | Parked |
|---|---|---|---|
| Presenter and slide windows, remote | Press by press | Skipped in core | Never |
| Audience follow link | As revealed | Follows the presenter | Never |
| Viewer and share link | Fully built | Shown | **Never** |
| PDF | Fully built, one page a slide | Included | **Never** |
| Editor strip and stage | Fully built | Dashed edge | Slim bar, in place |
| API | Fully described | Described | Described, to those with access to the deck |

A box waiting for its press is hidden from sight and from assistive
technology, keeps its space, and cannot be focused. With reduced motion,
every arrival is `appear`.

---

## 4. In the editor

Steps add nothing to the screen until a slide has them.

- **Appears**: one row in the box's card, in the Style group's place at
  the head of the card: *With the slide*, *On a press*, and for a list
  *Item by item*. The same choice is a row in the box's menu.
- **Order of presses**: small muted numerals in the box's margin, shown
  only while a box on that slide is selected. Choosing *After…* in the
  row places the box after another press.
- **Seeing it**: on a slide with steps, a small "3 presses" control sits
  in the slide's bottom end corner. It plays the slide through on the
  stage, one press per click, and Esc returns to the finished slide.
- **The strip**: a slide with steps carries a small count in its corner.
  A full-only slide has a dashed edge. A parked slide collapses to a slim
  bar with its title.
- **In the talk**: two rows in each slide's menu in the strip and in the
  Slide menu, *Skip in the short version* and *Park*, each a toggle.
- **Deck settings** gains *How things arrive*.

---

## 5. The presenter window

The mockup is the layout. From top to bottom:

- **The header**: position (`31 / 105`), the **step count** beside it,
  the mode, the BLACK flag when the screen is black, the timer large, the
  clock, and the ⋯ menu.
- **The step count** is a track of one segment per step and the words
  "step 2 of 4". It flashes on every press. On a slide with no steps it
  is not drawn, so its appearance says the slide has steps.
- **Now**: the current slide, live, at its step.
- **Next**: labelled *Next step*, *Next slide* or *End*, at half size.
- **Notes**: in their panel.

### 5.1 It never scrolls

The window is exactly as tall and wide as the browser window. The slides
scale to the room left, keeping 16:9, and the notes fit their panel.
Only the notes and the slide picker ever scroll, and only inside
themselves (§5.2). The window holds to this down to 320×568, which is
also a laptop at 400% zoom: there the panels stack.

### 5.2 The notes

Icon controls for **Fit** (the default: the text shrinks until it fits,
down to a readable floor of 16px) and **Scroll**, and for smaller and
larger text. Notes too long to fit at the floor are never cut off: the
panel scrolls inside itself, keeps the current press in view, and fades
at its edge to show there is more. The
choice is remembered per person, in a cookie the server reads.

### 5.3 Jumping

Clicking the position opens the picker: every slide in the talk as a
small picture with its number and title, opening on the current slide,
narrowed by typing a number or words. Enter goes to the first match. In
the window with nothing open, typing a number then Enter jumps straight
there. Parked slides are not listed. Full-only slides are listed and
marked; choosing one in core mode switches to full.

### 5.4 Arranging

*Arrange this window…* in the ⋯ menu makes the three panels movable and
resizable on a grid, clamped so that nothing leaves the window. Reset
returns to the default. The arrangement is remembered per person, in the
same cookie, so the first paint is final.

### 5.5 Keys

| Key | Does |
|---|---|
| → Space PageDown, clicker | Next press |
| ← PageUp, clicker | Back one press |
| Home, End | First and last slide of the talk |
| A number, then Enter | Go to that slide |
| B or . | Black screen |
| O | Core or full |
| P | Open the presenter window |
| R, or click the timer | Reset the timer |
| Esc | Close what is open; leave a field |

PageUp and PageDown move the talk even from inside a field, because a
clicker sends them. The timer starts at the first press, not when the
window opens. Any press lifts the black screen.

### 5.6 The ⋯ menu

Pair a phone as a remote; Open the slide window; Core or full; Arrange
this window; Back to the deck; End presenting.

---

## 6. Moving through the talk

**Getting ready.** When the presenter or slide window opens, it loads the
whole talk into memory: each slide's HTML, its pictures decoded, its
fonts ready, its notes. The header shows the progress and then says
nothing. A press made before a slide has loaded leaves the current slide
on screen until the next is complete; the screen is never blank. The
talk lives in memory only: a window reloaded with no network does not
recover. That is the offline slice's job.

**A position** is `{slide, step, mode, black}`, absolute.

**Pressing.** The window moves **at once**, from what it holds. It then
tells the server what was pressed (next, back or go to), where that took
it, and a press id, so that a press sent twice counts once.

**While connected, the server orders presses.** Each applies to the
current position in the order it arrives, so if the laptop and the phone
both press next from step 2, the talk reaches step 4. The server answers
with the position, and any window that differs moves to it.

**If the network drops,** the window you press in carries on and says so
quietly in the header. The other windows hold still and say they are
waiting. When it returns, **the laptop's presses win**: the room is
watching the laptop's screen, so a position it reached offline replaces
anything the phone did meanwhile. A laptop that pressed nothing while
offline takes the server's position.

**The phone remote** sends *next* and *back*, and the server resolves
them, because a phone need not hold the talk.

**Who may drive.** The signed-in presenter may always drive their own
talk. Pressing Present again rejoins it and leaves a paired phone paired;
today it replaces the phone's token. *Pair a phone* in the ⋯ menu makes a
new token and replaces the old one, and ending the talk ends both.

**A step change happens in place,** and a slide change swaps in the
loaded slide in one task.

**If the deck is edited during a talk,** the window loads the new version
quietly and takes it at its next change of slide, landing by the slide's
id. A press count that has shrunk clamps.

**With scripts off,** each press is a form that posts and redirects, the
address carries the slide and step (`?slide=N&step=k`), and the server
renders that state. The picker is a page of links. The notes scroll and
the layout is the default.

**Sessions already running at deploy** keep their index-based position
for their remaining hours; only new sessions use this.

---

## 7. Constraints and testing

From `AGENTS.md`: the stage is not a second renderer; never a flash;
every string a catalog key; every screen but the editor works with
scripts off; 320px reflow; WCAG 2.2 AA; icons lucide. Also binding: new
words go through Paul's copy review **before** they are written anywhere,
and `editor.css` holds to the published sizes (its own test).

The presenter window now shows live slides, not SVG pictures, so it takes
the font gate. `AGENTS.md`'s description of the presenter view is updated
with the change.

Tests, each written before the code it holds:

- Vectors for `deck.Presses`, shared by Go and JS, including ties, `each`
  lists, empty lists and midpoints.
- The talk's order for each mode; a parked slide absent from the viewer,
  the share link, the PDF and the follow link, by request.
- Forward and back through a slide, across slides, and landing fully
  built when coming back.
- **The step count changes on every press** of a slide with steps, and
  the position changes on every press of a slide without them.
- **The window never scrolls**, measured at ten window sizes from
  2560×1440 to 320×568, at every step, with long notes; notes too long
  for the floor scroll inside their panel and lose no text.
- Two windows and a phone stay together; laptop and phone pressing at
  once both count; a press sent twice counts once; a dropped network
  keeps the pressing window moving across slides, and on return its
  position wins over the phone's.
- Pressing Present again leaves a paired phone working; a revoked token
  drives nothing.
- With scripts off: every press, every step, and the picker.
- Notes split at "(Press.)" follow the presses, including when the parts
  and the presses differ in number; notes without the line stay plain.
- Picker with 105 slides: opens on the current slide, narrows, jumps.
- Arranging: panels stay inside the window at every size, reset works,
  first paint is final.
- Existing decks render byte for byte as they do today.

---

## 8. Order of building

1. The document: fields, ops, presses, vectors.
2. Steps on the presenting surfaces, and the absolute position.
3. Core, full and parked, everywhere in §3.
4. The presenter window.
5. The editor's controls.

Each lands behind nothing: a deck with no steps behaves as today at
every stage.

## 9. Left for later

Scenes and video; rehearsal and requests; checks, storyboard and the talk
as prose; layouts as data; offline, with both windows staying together
and perhaps a Mac app; on a phone.

## 10. The notes follow the steps

Paul, 18 November: yes. Notes split at any line reading exactly
"(Press.)". The first part belongs to the slide's arrival, and each later
part to the next press. The part for the current press is bright and the
rest dimmed, and the "(Press.)" lines themselves are not shown in the
presenter window. Notes with no such line stay plain. If the parts and
the presses differ in number, the extra parts stay dimmed after the last
press, and presses beyond the last part keep the last part bright. The
viewer's notes, the notes page and the PDF show the notes as written.

## 11. Review record

- **Builder check, 2026-11-18** (a fresh agent, read-only, asked what it
  would need before planning draft 1). Seven questions, six settled as
  this design's calls and one answered by Paul:
  1. *What must appear when the network is down and the slide changes?*
     The whole talk is loaded first (S17, §6).
  2. *Whose position wins?* The server orders presses; after a split the
     laptop's win (S18, §6).
  3. *Do steps work with scripts off?* Yes, by the house rule (S20, §6).
  4. *Does Present again cut off a paired phone?* No longer (S19, §6).
  5. *Who are "the deck's editors"?* Everyone with access to the deck;
     there is no other role (§0.3, §3).
  6. *Do the notes follow the steps?* Paul: yes (§10).
  7. *What if notes will not fit at the floor?* The panel scrolls; no text
     is lost (§5.2).
  Two statements about today's code were corrected: the presenter view
  and remote reload the page and show pictures today, and two rules
  credited to `AGENTS.md` come from elsewhere.
