oficina / slides Public

Clone
git clone https://amadan.net/oficina/slides

Plain git — no account needed to clone.

Download

Download this file

1# 🤖 Slides: steps, core and full, and the presenter — design
2
3Design, 2026-11-18, **draft 2, approved by Paul the same day.** Draft 2 answers a builder's
4read of draft 1 (§11). Written by Claude
5Opus 5.5 on branch `design/presenter-window`, cut from `origin/main` at
6`86efe67`, from conversations with Paul on 16 to 18 November.
7
8The mockup is beside this file: `2026-11-17-presenter-mockup.html`.
9Paul of the mockup, 18 November: "Looks great." **The mockup shows the
10presenter window. Where this text and the mockup disagree, this text
11wins.**
12
13This replaces the presenter, steps and core/full parts of the unapproved
1411 November draft (`design/presenter-and-rehearsal`). Rehearsal, checks,
15layouts, offline and the agent verbs in that draft stay out (§9).
16
17---
18
19## 0. Intent
20
21The HalfStack Vienna talk ran on a custom deck because Slides could not
22give it three things: slides that build press by press, a short and a
23long version of one talk, and a presenter window good enough to stand
24behind. This slice gives Slides those three.
25
26**Success** is that the Vienna talk's structure (105 slides in the talk,
2764 kept out of it, about 240 presses) can be built in Slides and given
28from this window, and that at no point during the talk does the speaker
29wonder what the last press did.
30
31That last clause is Paul's, from the day: "I was pressing advance, and
32the slide number wasn't going up ... I wasn't sure why."
33
34### 0.1 Goals
35
361. A box can arrive on a press, and a list one item per press.
372. A slide is in the talk, full only, or parked.
383. The presenter window is the HalfStack deck's, and never scrolls.
394. Every press visibly changes something beside the slide number.
405. A press always moves the window it was made in, even with no network.
41
42### 0.2 Non-goals
43
44- Steps that drive video or a scene, anything that plays by itself, exit
45 steps, motion paths, per-box timing. Scenes and video are the next
46 slice.
47- Both windows staying together with no network. Wanted, and next after
48 this in spirit, but it belongs with offline, which may be a Mac app.
49- Rehearsal, requests, checks, the storyboard, layouts as data.
50
51### 0.3 Anti-goals (failure even if it works)
52
53- **A press with no visible answer.** The fault Paul hit.
54- **A window that scrolls.** Paul, 18 November: it "shouldn't happen in
55 the live version".
56- **A busier editor.** The editor has just been made quiet. Steps must
57 not add standing chrome to it.
58- **A press lost or repeated.** A clicker pressed twice moves twice; a
59 slow network neither drops a press nor replays one.
60- **Readers seeing the talk's unfinished parts.** A parked slide reaches
61 nobody but people who can open the deck in the editor. Slides has no
62 read-only role among a deck's members, so that is everyone with
63 access to the deck, and nobody holding only a share or follow link.
64
65---
66
67## 1. Decisions
68
69Paul's are marked. The rest are this design's, listed so they can be
70reversed in one place.
71
72| # | Decision | Whose |
73|---|---|---|
74| S1 | A box appears with the slide or on a press; a list can arrive one item per press. | Paul |
75| S2 | A box that has not arrived keeps its space. | Paul (from the deck) |
76| S3 | Back undoes one press. Arriving on a slide from the one after it lands fully built. | Paul (from the deck) |
77| S4 | The editor's stage always shows the finished slide, never dimmed. | Paul (approved the review's form) |
78| S5 | How things arrive (appear, fade, rise) is one setting for the deck. | Paul (same) |
79| S6 | A slide is **in the talk, full only, or parked**. Parked slides stay in place in the strip as a slim bar. | Paul |
80| S7 | The window you press in always moves at once; other windows follow through the server. | Paul |
81| S8 | The presenter window is the HalfStack deck's, copied, with one added menu. | Paul |
82| S9 | Its layout can be rearranged; notes fit or scroll with their own text size; any slide can be jumped to. | Paul |
83| S10 | The window never scrolls. | Paul |
84| S11 | The step count sits beside the slide number. | Paul |
85| S12 | Present opens the slide; P opens the presenter window. | Paul (accepted) |
86| S13 | A position is absolute: this slide, this step, this mode. | This design, so a Mac app can use it later |
87| S14 | Presses are worked out from the boxes, never stored. | This design |
88| S15 | The audience's follow link shows steps as they are revealed. | This design |
89| S16 | A press is numbered by the order of its boxes' `step` values, and two boxes sharing a value arrive together. | This design |
90| S17 | The window loads the whole talk into memory before the first press, so a press needs no network. | This design, following S7 |
91| S18 | While connected the server orders presses, so two that cross both count. After a split the laptop's presses win. | This design |
92| S19 | The signed-in presenter may always drive their own talk. Pressing Present again no longer cuts off a paired phone. | This design |
93| S20 | Moving through the talk and seeing steps work with scripts off. Arranging and Fit are enhancements. | House rule |
94
95---
96
97## 2. The document
98
99Three additions, all optional, so every existing deck is unchanged.
100
101- **Block `step`**: a number above 0. Absent means the box arrives with
102 the slide. Boxes with the same value arrive on the same press.
103- **Block `items`**: `together` (absent) or `each`, on lists only. `each`
104 gives every item its own press, in order.
105- **Slide `talk`**: `full` or `parked`. Absent means in the talk.
106- **Deck meta `arrive`**: `appear` (absent), `fade` or `rise`.
107
108They travel on the existing ops: `set_block`, `set_slide` and `set_meta`.
109No new op. Each lands in `core/src/schema.rs` and `ops.rs`, the fixtures
110and `internal/slides/deck` together, with vectors, as the fixtures rule
111requires.
112
113**Presses are derived** by one function, `deck.Presses(slide)`, with
114vectors shared by Go and the JS bundle. Distinct `step` values in order
115are the presses; an `each` list expands to one press per item; a press
116that reveals nothing visible (an empty list, a box hidden by its
117container) is dropped. Press 0 is the slide as it arrives. Because
118values are only compared, placing a box between two others writes the
119midpoint, and nothing is renumbered.
120
121**The talk's order** is the slides in deck order, less parked slides,
122less full-only slides in core mode.
123
124---
125
126## 3. What each surface shows
127
128| Surface | Steps | Full only | Parked |
129|---|---|---|---|
130| Presenter and slide windows, remote | Press by press | Skipped in core | Never |
131| Audience follow link | As revealed | Follows the presenter | Never |
132| Viewer and share link | Fully built | Shown | **Never** |
133| PDF | Fully built, one page a slide | Included | **Never** |
134| Editor strip and stage | Fully built | Dashed edge | Slim bar, in place |
135| API | Fully described | Described | Described, to those with access to the deck |
136
137A box waiting for its press is hidden from sight and from assistive
138technology, keeps its space, and cannot be focused. With reduced motion,
139every arrival is `appear`.
140
141---
142
143## 4. In the editor
144
145Steps add nothing to the screen until a slide has them.
146
147- **Appears**: one row in the box's card, in the Style group's place at
148 the head of the card: *With the slide*, *On a press*, and for a list
149 *Item by item*. The same choice is a row in the box's menu.
150- **Order of presses**: small muted numerals in the box's margin, shown
151 only while a box on that slide is selected. Choosing *After…* in the
152 row places the box after another press.
153- **Seeing it**: on a slide with steps, a small "3 presses" control sits
154 in the slide's bottom end corner. It plays the slide through on the
155 stage, one press per click, and Esc returns to the finished slide.
156- **The strip**: a slide with steps carries a small count in its corner.
157 A full-only slide has a dashed edge. A parked slide collapses to a slim
158 bar with its title.
159- **In the talk**: two rows in each slide's menu in the strip and in the
160 Slide menu, *Skip in the short version* and *Park*, each a toggle.
161- **Deck settings** gains *How things arrive*.
162
163---
164
165## 5. The presenter window
166
167The mockup is the layout. From top to bottom:
168
169- **The header**: position (`31 / 105`), the **step count** beside it,
170 the mode, the BLACK flag when the screen is black, the timer large, the
171 clock, and the ⋯ menu.
172- **The step count** is a track of one segment per step and the words
173 "step 2 of 4". It flashes on every press. On a slide with no steps it
174 is not drawn, so its appearance says the slide has steps.
175- **Now**: the current slide, live, at its step.
176- **Next**: labelled *Next step*, *Next slide* or *End*, at half size.
177- **Notes**: in their panel.
178
179### 5.1 It never scrolls
180
181The window is exactly as tall and wide as the browser window. The slides
182scale to the room left, keeping 16:9, and the notes fit their panel.
183Only the notes and the slide picker ever scroll, and only inside
184themselves (§5.2). The window holds to this down to 320×568, which is
185also a laptop at 400% zoom: there the panels stack.
186
187### 5.2 The notes
188
189Icon controls for **Fit** (the default: the text shrinks until it fits,
190down to a readable floor of 16px) and **Scroll**, and for smaller and
191larger text. Notes too long to fit at the floor are never cut off: the
192panel scrolls inside itself, keeps the current press in view, and fades
193at its edge to show there is more. The
194choice is remembered per person, in a cookie the server reads.
195
196### 5.3 Jumping
197
198Clicking the position opens the picker: every slide in the talk as a
199small picture with its number and title, opening on the current slide,
200narrowed by typing a number or words. Enter goes to the first match. In
201the window with nothing open, typing a number then Enter jumps straight
202there. Parked slides are not listed. Full-only slides are listed and
203marked; choosing one in core mode switches to full.
204
205### 5.4 Arranging
206
207*Arrange this window…* in the ⋯ menu makes the three panels movable and
208resizable on a grid, clamped so that nothing leaves the window. Reset
209returns to the default. The arrangement is remembered per person, in the
210same cookie, so the first paint is final.
211
212### 5.5 Keys
213
214| Key | Does |
215|---|---|
216| → Space PageDown, clicker | Next press |
217| ← PageUp, clicker | Back one press |
218| Home, End | First and last slide of the talk |
219| A number, then Enter | Go to that slide |
220| B or . | Black screen |
221| O | Core or full |
222| P | Open the presenter window |
223| R, or click the timer | Reset the timer |
224| Esc | Close what is open; leave a field |
225
226PageUp and PageDown move the talk even from inside a field, because a
227clicker sends them. The timer starts at the first press, not when the
228window opens. Any press lifts the black screen.
229
230### 5.6 The ⋯ menu
231
232Pair a phone as a remote; Open the slide window; Core or full; Arrange
233this window; Back to the deck; End presenting.
234
235---
236
237## 6. Moving through the talk
238
239**Getting ready.** When the presenter or slide window opens, it loads the
240whole talk into memory: each slide's HTML, its pictures decoded, its
241fonts ready, its notes. The header shows the progress and then says
242nothing. A press made before a slide has loaded leaves the current slide
243on screen until the next is complete; the screen is never blank. The
244talk lives in memory only: a window reloaded with no network does not
245recover. That is the offline slice's job.
246
247**A position** is `{slide, step, mode, black}`, absolute.
248
249**Pressing.** The window moves **at once**, from what it holds. It then
250tells the server what was pressed (next, back or go to), where that took
251it, and a press id, so that a press sent twice counts once.
252
253**While connected, the server orders presses.** Each applies to the
254current position in the order it arrives, so if the laptop and the phone
255both press next from step 2, the talk reaches step 4. The server answers
256with the position, and any window that differs moves to it.
257
258**If the network drops,** the window you press in carries on and says so
259quietly in the header. The other windows hold still and say they are
260waiting. When it returns, **the laptop's presses win**: the room is
261watching the laptop's screen, so a position it reached offline replaces
262anything the phone did meanwhile. A laptop that pressed nothing while
263offline takes the server's position.
264
265**The phone remote** sends *next* and *back*, and the server resolves
266them, because a phone need not hold the talk.
267
268**Who may drive.** The signed-in presenter may always drive their own
269talk. Pressing Present again rejoins it and leaves a paired phone paired;
270today it replaces the phone's token. *Pair a phone* in the ⋯ menu makes a
271new token and replaces the old one, and ending the talk ends both.
272
273**A step change happens in place,** and a slide change swaps in the
274loaded slide in one task.
275
276**If the deck is edited during a talk,** the window loads the new version
277quietly and takes it at its next change of slide, landing by the slide's
278id. A press count that has shrunk clamps.
279
280**With scripts off,** each press is a form that posts and redirects, the
281address carries the slide and step (`?slide=N&step=k`), and the server
282renders that state. The picker is a page of links. The notes scroll and
283the layout is the default.
284
285**Sessions already running at deploy** keep their index-based position
286for their remaining hours; only new sessions use this.
287
288---
289
290## 7. Constraints and testing
291
292From `AGENTS.md`: the stage is not a second renderer; never a flash;
293every string a catalog key; every screen but the editor works with
294scripts off; 320px reflow; WCAG 2.2 AA; icons lucide. Also binding: new
295words go through Paul's copy review **before** they are written anywhere,
296and `editor.css` holds to the published sizes (its own test).
297
298The presenter window now shows live slides, not SVG pictures, so it takes
299the font gate. `AGENTS.md`'s description of the presenter view is updated
300with the change.
301
302Tests, each written before the code it holds:
303
304- Vectors for `deck.Presses`, shared by Go and JS, including ties, `each`
305 lists, empty lists and midpoints.
306- The talk's order for each mode; a parked slide absent from the viewer,
307 the share link, the PDF and the follow link, by request.
308- Forward and back through a slide, across slides, and landing fully
309 built when coming back.
310- **The step count changes on every press** of a slide with steps, and
311 the position changes on every press of a slide without them.
312- **The window never scrolls**, measured at ten window sizes from
313 2560×1440 to 320×568, at every step, with long notes; notes too long
314 for the floor scroll inside their panel and lose no text.
315- Two windows and a phone stay together; laptop and phone pressing at
316 once both count; a press sent twice counts once; a dropped network
317 keeps the pressing window moving across slides, and on return its
318 position wins over the phone's.
319- Pressing Present again leaves a paired phone working; a revoked token
320 drives nothing.
321- With scripts off: every press, every step, and the picker.
322- Notes split at "(Press.)" follow the presses, including when the parts
323 and the presses differ in number; notes without the line stay plain.
324- Picker with 105 slides: opens on the current slide, narrows, jumps.
325- Arranging: panels stay inside the window at every size, reset works,
326 first paint is final.
327- Existing decks render byte for byte as they do today.
328
329---
330
331## 8. Order of building
332
3331. The document: fields, ops, presses, vectors.
3342. Steps on the presenting surfaces, and the absolute position.
3353. Core, full and parked, everywhere in §3.
3364. The presenter window.
3375. The editor's controls.
338
339Each lands behind nothing: a deck with no steps behaves as today at
340every stage.
341
342## 9. Left for later
343
344Scenes and video; rehearsal and requests; checks, storyboard and the talk
345as prose; layouts as data; offline, with both windows staying together
346and perhaps a Mac app; on a phone.
347
348## 10. The notes follow the steps
349
350Paul, 18 November: yes. Notes split at any line reading exactly
351"(Press.)". The first part belongs to the slide's arrival, and each later
352part to the next press. The part for the current press is bright and the
353rest dimmed, and the "(Press.)" lines themselves are not shown in the
354presenter window. Notes with no such line stay plain. If the parts and
355the presses differ in number, the extra parts stay dimmed after the last
356press, and presses beyond the last part keep the last part bright. The
357viewer's notes, the notes page and the PDF show the notes as written.
358
359## 11. Review record
360
361- **Builder check, 2026-11-18** (a fresh agent, read-only, asked what it
362 would need before planning draft 1). Seven questions, six settled as
363 this design's calls and one answered by Paul:
364 1. *What must appear when the network is down and the slide changes?*
365 The whole talk is loaded first (S17, §6).
366 2. *Whose position wins?* The server orders presses; after a split the
367 laptop's win (S18, §6).
368 3. *Do steps work with scripts off?* Yes, by the house rule (S20, §6).
369 4. *Does Present again cut off a paired phone?* No longer (S19, §6).
370 5. *Who are "the deck's editors"?* Everyone with access to the deck;
371 there is no other role (§0.3, §3).
372 6. *Do the notes follow the steps?* Paul: yes (§10).
373 7. *What if notes will not fit at the floor?* The panel scrolls; no text
374 is lost (§5.2).
375 Two statements about today's code were corrected: the presenter view
376 and remote reload the page and show pictures today, and two rules
377 credited to `AGENTS.md` come from elsewhere.
378