oficina / slides Public

Review: the editor, tidied — Docs' desk, a floating card that follows the selection, floating notes closed

On branch editor-tidy

🤖 Posted by the Claude agent account (Claude Fable 5.2, coordinating; tasks implemented by Claude Opus 5.5 and Sonnet 5.5 subagents) for the session building the first slice of the Slides redesign. Reviewed by GPT-6 Astra: a review and fix round on each of the eleven tasks, then a whole-branch review ("ready to merge with fixes"), one fix wave, and a scoped re-review. Not merged; pushed for CI and Paul's approval, then squash-merge.

Spec: docs/superpowers/specs/2026-11-16-editor-tidy-design.md (approved by Paul 2026-11-16; the mockup is beside it). Plan: docs/superpowers/plans/2026-11-16-editor-tidy.md. This is the first slice of "the HalfStack Vienna talk could have been made in Slides" (spec §9); it ships alone.

No document state changes: no field, op, migration or Rust core change. The editor's chrome moves.

What changes

  • Desk and deck list: Docs' grey (--estilo-desk); the warm gradient on the deck list goes.
  • The page never scrolls from 1100px. The strip is its own surface and meets the bar; New slide is pinned to its foot as one pill joined with the layouts chevron.
  • View switch: three icon radios in one segmented pill (desktop, phone, both).
  • Phone view is a phone: a 390×844 screen, scaled to fit both ways (CSS zoom), scrolling inside. The editable stage in Phone view, the read-only preview in Both.
  • Notes float at the foot of the desk with an × and a resizable top edge; closed, a small icon in the corner with a dot when the slide has notes. Open/closed and height are cookies the server renders (slides-notes, slides-notes-height).
  • The inspector is Docs' floating card (<aside slides-inspector estilo-card estilo-inspector>, 248px), shown by a Format button in the bar; its state is a cookie the server renders (slides-inspector). Below 1100px it stays in the flow.
  • The card follows the selection ([slides-editor][data-inspect="box|notes|slide"], fixtures/inspect.mjs): a box's options; the notes' marks; nothing selected → the slide's options, then the deck's.
  • The card's fields are today's, regrouped (Style, Text, Alignment, Image, Description, Place, On a phone; This slide, Boxes, Deck). The text marks moved from the stage toolbar into the card. The slide's move/add/duplicate/delete buttons left the card (Slide menu and each slide's strip menu keep them); Delete slide still confirms in the card.
  • The bar: Format, Share and Present are estilo's pills; undo and redo are one joined pair.
  • Deck cover: the thumbnail of a title slide with one region drew its heading 83/1080 too high (layout.place() returned early). Fixed in the layout engine; no golden files changed. Thumbnails and PDF pages of such slides move accordingly.
  • estilo moves from 260f98c to c1773e0 (the desk part, oficina/estilo discussion 36).

New modules: fixtures/inspect.mjs, notes-card.mjs, phone-frame.mjs, each with tests; editor-entry.js stays wiring.

Tests

TestEditorTidy* in internal/slidestest/editor_tidy_test.go (in the gate), including TestEditorTidyNothingIsLost, whose inventory of fields and commands was written from origin/main's template before any regrouping. TestTidy* in browser_editor_tidy_test.go (-tags browser, outside the gate): no page scroll at 1280×720 and 1920×1080, New slide in view with 40 slides, view switch, phone frame and editing inside it, notes, the card's geometry, narrow and short windows, the card for each of the eleven box kinds, two-session cases, marks, keyboard-only box editing, delete confirmation, cover, bar pills, and the final review's regressions.

At b1b7340: ./.amadan/ci.d/10-gate → gate: ok; node --test 361 pass; go test -tags browser ./internal/slidestest/ → 12 failures, every one also failing by name on origin/main cb30df5:

  • Need Playwright browsers in fixtures/engines, not installed here (8): TestEnginesEveryChangeWhileARefusalIsPendingIsKept, TestEnginesUndoAndRedoWhileARefusalIsPendingEndAsSeen, TestFontEnginesFirstRevealIsTheFinalLayout, TestFontEnginesSlidesChangeWithoutAGap, TestFontEnginesAWaitKeepsThePage, TestFontEnginesAWaitingPasteSurvivesARefusedSave, TestLeavingAPageLetsGoOfItsStream, TestSavingContinuesWhileALinkIsLoading. That coverage was not exercised on either side.
  • Fail on main for their own reasons (4): TestBrowserModalOwnsTheKeyboard, TestBrowserStripDoesNotOverlapItself, TestAnUndoWhileARefusalIsPendingStaysUndone, TestFontEveryInputPathWaitsForItsFamily. TestFontALateEditorMovesNothing is flaky on both (1–2px of anti-aliasing).

What a person will notice beyond the design

  • The card is 248px (the inspector was 300px). At 1280×720 with the card and notes open the slide is 676×380 so that it fits above the notes.
  • Esc in a text box deselects in one press (a link prompt or an IME composition takes the first).
  • Focus in a box's text selects the box; the marks act only on the box the card shows.
  • The "Block · type" heading is gone; alignment and image fit are segmented buttons; the assistant toggle is a pill.
  • From the estilo bump: the account menu's Appearance is three icon segments switched in place (a cookie write, no post); the sign-in sky is v2; busy.js is Fiesta 1.3.0's (a POST form is still held 650ms; a GET form shows its busy state only after 500ms).
  • Still unlike Docs: undo/redo is an outlined pair (Docs' is filled); bold/italic/code are icons (Docs uses letters).

Rulings the coordinator made (where the plan was wrong or silent)

  1. Phone view keeps the one editable stage; the read-only preview shows only in Both. The plan's brief had this wrong.
  2. Corner radius is under Style, not Image (shapes have it too). Departs from spec §4.2's table.
  3. Share has no outline: Docs' Share is estilo's plain pill; the spec's "outlined, as in Docs" misread Docs.
  4. Notes open/closed and height are cookies, not localStorage. Departs from spec §5; "never a flash" outranks it. An old localStorage value is honoured once and moved.
  5. The cover test asserts "the picture matches the slide's own rendering" (0.5%) and "the picture is centred in the cover" (1px), not "within 2% of the frame's centre": a lone heading sits about 2% above the middle on the slide itself (see below).
  6. The marks keep main's behaviour in a code block (the plan's sentence about disabling them was wrong about main).
  7. Lucide is credited as a whole, as the repo already does; no per-icon inventory.
  8. Two viewer lengths became shared properties (--slides-page-bar-block-size, --slides-pill-block-size) so the phone frame reads them; the viewer's rendering was measured unchanged.
  9. Process fault: the new English strings were written into en.toml before Paul's copy review, which the copy-review rule forbids. He has since approved all 13 unedited; the file matches byte for byte.
  10. B1's commit carries a Fable Co-Authored-By though Opus wrote it; later commits carry their author's own line.

Parked (one minor, from the fix wave's re-review)

fixtures/notes-card.mjs:99 reparses the notes-height cookie differently from internal/slides/editor.go:305 for malformed values (0, 2e2, 220.5), so those mount a few px off what the server rendered. The app only writes whole pixels within bounds. Fix: initialise the client from the server-rendered height.

Found on the way, predating this branch, not fixed here

  • A phone box override on a canvas slide never shows: render.go writes the box's position inline, which beats the phone layer's rule. A drag in phone view saves the override; the box redraws where it was.
  • Switching view while a slide is loading reloads the previous slide (stage.mjs setViewport).
  • A collaborator's structural change refreshes the stage and drops the caret out of the notes.
  • A lone heading on a title slide sits about 2% above the middle (slides.css keeps the gap after the empty body row). Centring it is a rendering change.
  • At 320px the account avatar wraps onto its own line in the bar.

Open questions for Paul (spec §11; they decide the later phone slice, not this one)

  1. Letterboxing a flow slide on a phone, against "320px reflow, no exemptions".
  2. A hand-arranged tall phone page reverses ruling 2 of the main spec.
  3. Frames with their own settings (desktop and phone as artboards).

Screenshots

On docs-t1 at ~/.cache/editor-tidy-shots/ (not committed): 01–12 the editor's states and the deck list; 13-docs-card-{light,dark}.png and 14-slides-card-{light,dark}.png are the side-by-side spec §7 asks for (Docs at its origin/main b45b7b2).

🤖 Merged. Paul approved on 2026-11-17 (copy review of the 13 new strings approved unedited; then push, then merge). Hub CI passed at b1b7340; squash-merged through the gate as 07d2e96, tree identical to the reviewed tip. Not deployed. The parked minor (notes-height cookie parsing) and the pre-existing issues listed above remain open; the phone slice's three questions remain Paul's.

🤖 Deployed 2026-11-18 as part of 88c95bf (see #45).