oficina / slides Public

Smart door (Home step 6): Slides adopts rastrillo's one-way sign-in screen in estilo's door open

On branch feat/smart-door

Home spec 2026-11-19-smart-door.md step 6 for Slides (web only), following Sheets (66e5391, oficina/sheets #71) and Docs (2e21630, oficina/docs #139), with every Fable finding on those two built in up front, each with a test. Not for merge: it needs the highest-model review and copy review.

The bump (one change)

  • rastrillo v0.27.1 → v0.42.0; connect + handoff d82341c → Home main 98726fa; estilo c1773e0 → main 468fab1. go mod tidy (go line 1.25 → 1.26; go-sdk 1.8.0, go-json-experiment c27c302, x/sys, x/text, x/mod; chromedp v0.21 + cdproto v0.158.6; new indirect fiesta 1.5.0, tdewolff minify + parse, x/tools).

The door

  • SigninScreen + SigninOneWay, SigninPath = connect.SigninPath, ForgetPath = /signin/forget. Every state (door, chooser, Sent, Keymail continuation, RenderConfirm's confirm, refusal, removal) is estilo-signin-screen over auth.SigninState (signin.go); the tab title is rastrillo's for the state (Frame.Title).
  • With Home: /signin → SigninDoor, /signin/local → SigninLocal (under LocalGuard), /signin/oficina → SigninOficina, all behind admittedOnly. Standalone: /signin is standaloneSignin (email only); /signin/local, /signin/oficina and the choose page answer 404.
  • Admission probe (admission): Slides' real gate (requireSession(auth.RequireSession) then viewer/currentUser) on a probe GET /. Differs from Sheets in one way: any 5xx (not only 503) is "undecided" and not a refusal, which covers Sheets' open follow-up (a storage error read as a refusal) for Slides' currentUser.
  • Refusal: auth's Refused (403) and a refused session, in the app-problem slot with the email field, only on the plain door (?ways=/?way= stay reachable). A refused session's cookie is cleared on the door's own response, a remembered Oficina ID is forgotten, an email record is kept.
  • Removal: offboard still lands on /signin?err=removed; rastrillo reads an unknown err as its generic problem, so Slides puts its own sentence in the app-problem slot instead (plain door only).
  • Remembering: MintHomeSession → rememberOficina, strictly admitted sessions only (admittedAs), connect.MintedPerson address, no carry-over; none for a Home-only member.
  • Signed out: connect.PageFor("signedout") + .Forgetting; with Home chain=oficina → {issuer}/forget?return=<origin>/signed-out.
  • Return memory: Slides already had a sealed return cookie (__Host-slides_return, instance key), so it is reused rather than porting Sheets' Home-DEK one. beginSignin (both modes) takes return_to off Begin's form even on a parse error, remembers it (/ when absent, unsafe or /signed-out) and puts it back on Begin's redirect; /auth/landed (standalone) and homeLocalComplete (Home, replacing connect's landing /, LocalLandingPath) land there once. A plain /signin/local remembers nothing and carries the kept page. Forget and Sign out (both modes) clear it.
  • sameAnswer (Slides' rewrite of Begin's ?err= to Sent) now keeps a step-up's reauth=1 and return_to, so a step-up post with a bad address stays local-only.

API changes handled

  • connect since d82341c (the oldest pin): Routes.Signin removed → the three door routes; PageData now connect's struct (+ForgetAction); link step-up is /signin/local?reauth=1; Config.Admit must be set with HomeOnly/Unlinked (or connect.New refuses, which broke team mode at boot) → teamAdmit (as Sheets'), plus connect's member choice page mounted (/account/home/choose, drawn in home_link.html as Sheets does) and slides.home.choose_* keys; linkstore migration 0003 (choice proofs) applies at boot through homeSchema. OAuthContinuation/renderKeymailContinuation are gone (Keymail continues on the door). NativeExchange is not mounted (Slides has no native app), so IsHomeDerived changes are not needed.
  • rastrillo v0.27.1 → v0.42.0: the English locale pack (serving.go; v0.29 refuses to boot without it); flash.Set(w, r, …) (v0.30, exports.go); chromedp v0.21 port of all 20 browser test files (browser_steps_test.go helpers; evalInto keeps v0.14's null/undefined semantics exactly); rastrillo doctor --fix re-copied tokens.css (Fiesta 1.5.0), shell.css/js, select.js, datetime.js + calendar.js (the fiestaCalendar pair); the new library files (live, anchor, light, transition, copy, fiesta.js) are not linked by Slides' layout and are recorded as deliberately absent in vendoredIsMine; go run ./scripts/writeestilo (Calma theme from estilo 468fab1); v0.31 minified vendored assets (new test asks rastrillo.Assets what it serves); v0.38 Sent carries attempt= (tests compare it masked); v0.39 unknown-subject refusal (Slides sets no SubjectFor).
  • estilo 468fab1: door pills, estilo-signin-screen, .Forgetting, sky v3.

Colophon

Slides' credits (/help/open-source) are not driven by estilo's colophon catalog: scripts/credits.py builds them from estilo's oficina-notices over the Go binary plus npm/cargo inventories, with licence texts and no per-app "uses" notes. So no estilo branch was needed; python3 scripts/credits.py regenerated credits/notices.json (+ Fiesta 1.5.0, minify v2.24.19, parse v2.8.16; rastrillo, go-sdk, json, x/sys, x/text bumped) and assets.json (input hashes of the re-copied vendored JS; components unchanged, both wasm modules rebuilt and byte-identical). make credits-check passes.

Copy review

Changed

  • Refusal → Paul's approved wording: "That email can’t sign in to Slides. Use a different email, or ask whoever runs this team to add it." (was "That address can’t sign in to Slides. Use a different address, or ask whoever runs this team to add it."). Pinned by tests.

Added (reused, already approved)

  • "Oficina ID" (a name, not a key); rastrillo draws "Continue with Oficina ID".
  • Team mode's choose page, connect's English word for word (a test pins it): "Welcome to the team" / "Do you already have an account here that signs in with email? Connect it, and your Oficina ID will open it from now on. If you’re new here, continue with Oficina ID." / "Connect my existing account" / "I’m new here — continue with Oficina ID".
  • Signed out gains estilo's "Forget me on this device".

Kept: "Your access has been removed, so you’ve been signed out. Ask whoever runs this team if that’s wrong." (now in the app-problem slot).

Removed (rastrillo's approved copy covers them)

  • "Too many attempts. Wait a few minutes, then try again." · "That doesn’t look like an email address." · "That link has expired or was already used. Enter your email to get a new one." · "We couldn’t sign you in. Enter your email to get a new link." · confirm lede "Select Sign in to finish signing in." · Keymail card "Continue signing in" / "Taking you to Keymail to finish signing in." / "Continue to Keymail".

Now rastrillo's words where estilo's were: heading "Sign in" → "Sign in to Slides"; label "Email address" → "Email"; the "We’ll email you a link… 15 minutes." help line is gone; submit "Sign in" → "Continue"; Sent "If that address can sign in here, we’ve sent it a link…" → "We sent a link to your inbox. The link works once and expires soon."; "Use a different address" link → "Use a different email" button; continuation → "Taking you to Keymail" / "Taking you to Keymail to confirm it's you." / "Continue to Keymail".

Tab titles: "Sign in · Slides" → "Sign in to Slides"; "Check your email · Slides" → "Check your email to sign in to Slides"; new "Other ways to sign in to Slides", "Problem signing in to Slides", "Taking you to Keymail to sign in to Slides"; "Signed out · Slides" unchanged.

Tests

New in internal/slides: signin_door_{states,refusal,remember,return,contract,helpers}_test.go, two team tests in team_access_test.go, and signin_browser_test.go (-tags browser):

  • every route and state, with Home and standalone, titles included; no Oficina ID standalone; 404s;
  • the refusal: Paul's wording; plain door only (Other ways → chooser with Oficina ID); the refused session's cookie cleared on the real response; Oficina ID forgotten, email kept; no loop at /signin, /signin/local, /signin/oficina; the Refused hook's 403 in both modes; ?err=refused typed in shows nothing;
  • the 503 (team mode, identity storage failing): no refusal, session and record kept, nothing set on /signin, strict admission refuses (nothing remembered);
  • remembering: address of the resolved person, no carry-over, none on unknown, no address for a Home-only member, only for an admitted minted session (rememberOficina directly);
  • return memory: landing in both modes; /signin/local doesn't overwrite; a post without return_to resets; stripped on a parse error; /signed-out, //evil…, https://evil…, /\evil…, /signin, /auth/… read as /; tampered, expired, duplicated cookies land on /; Forget and Sign out (both modes) clear it;
  • step-up: a post keeps reauth=1 + return_to for a bad address and Sent; end to end stale → /signin/local?reauth=1 → email → /account/home;
  • confirm leaves the record alone; the chained Forget, cross-site refusal, standalone no chain;
  • the estilo contract ([estilo-signin-screen] > section holds only the door) over 9 states + refusal + confirm + standalone;
  • the member choice: choose page, "I'm new here", "connect" → email-only door, no proof → 403, a stranger gets no choice;
  • TestSmartDoorInABrowser: 16 states at 320px and 1280px (long remembered address, Keymail, confirm, the continuation in preview, the refusal, the removal, signed out): no sideways scroll, 24px targets, the glyph drawn, refusal/removal text present; forces light itself via Emulation.setEmulatedMedia.
  • Existing tests updated for the new door (front door, Keymail continuation, Sent's attempt=, confirm markup, the rate-limit identity test now compares two fresh instances post for post).
  • Each fix was seen to fail its test with the fix reverted (15 mutations).

Local: go vet (with and without -tags browser), gofmt, go test ./... (all green, including cmd/slides' TestStoppingWithAStreamOpenExitsAtOnce this time), make migration-check, make credits-check. Browser suite results in a follow-up.

LLM

Slides moves to the smart door, as Docs and Sheets did: rastrillo v0.42.0 + connect/handoff 98726fa + estilo 468fab1 in one bump; /signin is the door with Continue with Oficina ID, admission-probed; Oficina ID remembered for admitted sessions; Forget chained to id.*; team mode gains connect's Admit and member choice. Needs highest-model review + copy review; not for merge.

Hub CI on 49d5bcb passed in full (exit 0): rustfmt/clippy, wasm stamps, the JS half, make ci, credits-check.

Browser suites, headless Chrome for Testing forced to light (a RASTRILLO_CHROME wrapper adding --blink-settings=preferredColorScheme=1; the door test also forces light itself):

  • TestSmartDoorInABrowser (./internal/slides/, 16 states × 320/1280px) passes. Screenshots checked: first visit, refusal at 320px.
  • ./internal/slidestest/ -tags browser (the chromedp v0.21 port): everything passes except 12 tests. I ran those 12 on origin/main 0995aab (chromedp v0.14) in the same browser: 10 fail there identically (TestEditorSavedFadesAfterASave, TestTidyNotes, TestTidyNarrowAndShortWindows (flaky both sides), TestTidyCardFollowsSelection, TestTidyMarksInCard, TestTidyCoverIsCentred, TestTidyMarksActOnTheCardsBox, TestQuieterKeyboardOnlyShape, TestQuieterNotes, TestFontEnginesFirstRevealIsTheFinalLayout — the last is "editor later than the layout deadline" in Chromium on both). The other 2 (TestTidyDeleteAnotherSlideWithABoxSelected, TestQuieterLayoutPictures) pass on main and pass on the branch when run alone; they failed only inside the 28-minute full run. None of the 12 is a sign-in test.

Port notes worth a reviewer's eye: evalInto keeps v0.14's null/undefined semantics exactly (not Sheets' read-through-pointer); blockURLs sends cdproto's old urls field (v0.158 only has urlPatterns); since chromedp v0.18 a key with Ctrl/Alt/Meta no longer types a character, which the modifier key tests now get.

Push token revoked. Not merged.

Fable's fixes are in 601d992. Hub CI passed on it.

  1. The bump changes the look outside the door (Fable compared 12 pages before and after; screenshots at https://pauls-macbook-pro-2.tail76ffb7.ts.net:10006/slides-bump/, Paul is looking). This comes from the rastrillo v0.42 tokens.css (Fiesta 1.5.0) re-copied by doctor --fix, not from the door: - the editor strip's ⋮ and "+ New slide" icons draw larger and sit a few px off; - "Back to…" links are taller, so titles sit 11px lower on new deck, settings, delete, export, share, notes, agents and credits; - desktop buttons are slightly smaller (--rst-tap 44px → --rst-target 2rem); - the deck list, stage, inspector and menus are identical.
  2. rastrillo doctor exits 0. Done rather than documented: migrate-templates -write over the 21 templates is mechanical (the $L := localizer $ prelude, "L" $L in dicts, withL on the estilo bar and door), and the 10 {{template "estilo-icon-check"}} calls now pass their data. rastrillo generate wrote empty stubs nothing imports (gen/api.go, gen/router.go, api/v1.json with no operations) and gen/locales with the English pack, all committed. generate --check and doctor --probe are clean, and AGENTS.md says how to keep it so on the next upgrade.
  3. Team-mode door tests in team_access_test.go, each passing: - a removed member with a live session: /signin 303 / twice, / 200 (grants only), /decks/new 403, and the session is kept; - removed between the proof and the choice: "new" 403, no session; - "new" with an app session present: 403, and the local session untouched; - a stranger: 403 at the finish, no session, and /signin still draws.
  4. sameAnswer is deleted (with gateBegin; its comment moved to auth.go's note on POST /signin). Begin's own problems are answered as they are, the same for any address. New tests: - a mistyped address gets ?err=address and the door says so, with nothing mailed; - force=1 survives a Begin error after a failed Keymail; - the rate-limit identity test runs two fresh instances post for post: Sent ×5, then ?err=rate, alike, with the mailer at 5.

The step-up test (reauth=1 + return_to for a bad address and for Sent) still passes.

Also: TestStoppingWithAStreamOpenExitsAtOnce now puts its socket under /tmp, so it passes under macOS's default TMPDIR. It failed there before the change, past the 104-byte socket path limit.

Local results: vet (both tags), gofmt, go test ./..., the migration check and the credits check all pass.

Browser suites, forced to light: ./internal/slides passes, door test included. ./internal/slidestest fails 12 tests in the full run:

  • 8 are the same tests that fail on origin/main, as reported above;
  • the other 4 (TestQuieterBoxMenu, TestQuieterLayoutPictures, TestSavingContinuesWhileALinkIsLoading, TestEnginesUndoAndRedoWhileARefusalIsPendingEndAsSeen) all pass when run alone.

Not merged.

Review: Claude Fable (claude-fable-5-2). 49d5bcb: APPROVE AFTER FIXES (no security findings). 601d992: APPROVE (the 21-template rewrite renders identical HTML on 20 pages; the stubs are unreferenced; deleting sameAnswer reveals nothing about the allowlist). Copy: every string follows already-approved wording (rastrillo's door copy; the refusal pattern Paul approved for Docs and Sheets).