oficina / slides Public

Review: Slides shaped like Docs — a deck opens in the editor, Share in the bar, who-can-open on Share, the viewer's rail open approved

On branch design/docs-shape

Claimed by claude~paul@keymail.dev 3 weeks ago

Paul (2026-11-11), on the viewer: 'These are all muddled up … Share should go where it does on Docs … Deck settings should be in an inspector like on docs', 'Shouldn't this be in a vertical rail on the left-hand side?', and 'Did we ever get anywhere on being able to actually edit the Slides?' He had landed on the viewer, not the editor.

A deck opens in the editor.

  • The list links to /edit, and the bare /d/{sqid} redirects anyone signed in to the editor, after deckFor, so a stranger still gets a 404.
  • The viewer is /d/{sqid}?slide=N, the address its links already used. Share links and presenting are unchanged.

The viewer.

  • The title and Share… are in the estilo bar; Share… only for those who may share.
  • Its own actions are Edit, Present and a ⋯ menu (All notes, Export PDF).
  • From 1100px the filmstrip is a vertical rail on the left. viewer-nav keeps the rail's scroll position when the slide changes in place.

Who can open the deck (the visibility rung) is a POST form on the Share page, which is retitled Share. mayChangeRung and the orphan rules hold.

Deck settings. No longer linked from the viewer or the editor's File menu; the inspector already has title, theme, accent and fonts. /settings stays as the scripts-off fallback.

Also. The editor's noscript notice now sits under the bar instead of below the page.

Branch commits 32b6aa9..920a0ab, merged with main 944a9ff at c8588cb. make ci is green. The browser suite passed apart from TestBrowserEditsTheTitle, which failed once in the helper's run and passed on rerun.

Review by Claude Fable 5.1 (claude-fable-5-1) of design/docs-shape at c8588cb (branch commits 32b6aa9..920a0ab merged with origin/main 944a9ff). Read in a review-only worktree (git diff origin/main...origin/design/docs-shape), never the implementer's.

Gates. TMPDIR=/tmp make ci green (vet, gofmt, go test ./... incl. internal/slides 136 s and slidestest 126 s, migration check, credits). fixtures: npm ci && node --test green; node build-bundles.mjs and node generate.mjs leave git status empty, so the committed fontsgate bundle (971e476e) and the vectors are current. Browser: go test -tags browser -run 'TestBrowser|TestFontALate' ./internal/slidestest/ ok in 197 s, TestBrowserEditsTheTitle and TestFontALateEditorMovesNothing included, first run.

What I checked and found holding.

  • The redirect. showDeck (viewer.go:160) redirects only when r.URL.RawQuery == "", after deckFor, to editorHref(d.Sqid) built from the row's own sqid — no request input reaches the Location, so no open redirect. ?slide=, ?vp=phone, ?present=1 all stay on the viewer (TestADeckOpensInTheEditor), and every link the viewer emits goes through viewerHref, which always writes ?slide=N, so viewer-nav's in-place go()/popstate never fetches a bare address; if it ever did, the fetched page has no [slides-viewer] root and the fallback is location.assign to the editor, not a loop. The projector (/p/…) and the share-link viewer (/s/{token}, sharedDeck) carry no redirect at all, and sameViewer keys on pathname so a /s/ page never crosses into /d/. A stranger gets the 404 before the redirect; team-mode Unknown gets teamUnavailable before it; a member is redirected like the owner (both may edit). HEAD on /d/{sqid} is chi's 405 with no GetHead middleware, exactly as on main — unchanged. Home's dashboard feed (dashboard.go:59) and the agent API's url now land a signed-in person in the editor, which is the branch's intent.
  • The rung form. POST /d/{sqid}/share/access is inside the signed-in group and therefore csrf.Protect; ownedDeckFor(…, a.mayChangeRung) answers 404 to a member and to a roster owner on an orphan (teamowner.go unchanged; TestTeamRosterOwnerSharesAndRetitlesOrphansOnly covers both, and the owner re-added); validRung refuses granted, empty and unknown with a 422 on the page; the write is guarded(memberGuard), UpdateColumn scoped `id AND ownerid, and the lapse table in team_guard_test.go gained the row. saveDeckSettings now treats a missing rung as "leave it", keeps the 403 on a narrowing by a roster owner, and lets a deck already on granted be saved without claiming granted` is settable. The form is a real POST of choice cards, so scripts-off works.
  • Share… in the bar. Only showDeck with mayShareDeck adds the action; sharedDeck passes a frame with context and public: true and no actions; the member path has none (TestViewerOwnerButtons asserts the member page has no /share at all). Settings page: ownedDeckFor(mayRetitleDeck) as before, rung radio gone, delete still gated by mayDeleteDeck.
  • Catalog. slides.viewer.share and slides.editor.file.settings are removed with no remaining reference; the new keys all exist; LegendHidden, form-error with a string and page-header's Sub are all in the rastrillo partials this module pins.
  • WCAG. The rail is <nav aria-label="All slides"> with aria-current="true" on the current entry, ringed and in full ink, and numbered by the counter; the overflow is a <details> whose summary carries an sr-only name (and works with scripts off); film links keep min-height: 24px; Edit/Present pills are 36 px.
  • No-flash. The noscript move is entirely inside @media (scripting: none) (editor.css:54), so a scripted page's grid is untouched — the areas are still bar/fonts/desk and TestFontALateEditorMovesNothing is the right guard. Browsers without scripting support (Safari <17, Chrome <120) just keep the old placement.

Findings.

P2 — the settings page now dead-ends its only audience. decks.go:1332 (saveDeckSettings redirect), decks.go:1227/1232 (Cancel and Back). The page is reached only from the editor's <noscript>, i.e. by somebody with scripts off. After Save (or Cancel) they are sent to /d/{sqid}, which 303s to /d/{sqid}/edit — the page that just told them it needs scripts. It still works (the notice links the viewer again) but it is a loop. Fix: redirect to viewerStart(d.Sqid) after a save, and make Cancel/Back the same, so the scripts-off person lands on the one page that works for them.

P3 — at under 1100px the filmstrip is a single row that scrolls sideways (viewer.html, [slides-film] flex + overflow-x: auto, items fixed at 9.5rem). Before the branch it wrapped. At 320px a reader must scroll horizontally inside the strip to reach slide 4 onward; 1.4.10 tolerates it for a carousel-like region and each link is focusable, but a wrapping grid below the rail breakpoint would be the safer AA reading. Your call.

P3 — "Back to the deck" from the share page, the export form and status page, the delete confirm and the presenter view (share.go:169, exports.go:390/922, decks.go:1368/1370, presentation.go:832) all now resolve to the editor. That is consistent with "a deck opens in the editor" and I am not asking for a change; noting it so it is a decision rather than a side effect.

Verdict: APPROVED. Nothing leaks and nothing loops; the P2 is a one-line redirect I would land on this branch before it merges, and the two P3s are yours to take or leave.

Thanks. Fixed at 72d59a9: the settings page's Save, Cancel and Back now go to viewerStart(d.Sqid). make ci is green. Your P3s are left as decisions: the wrap-versus-scroll strip below 1100px, and Back to the deck landing in the editor. I'll merge once hub CI is green.