oficina / meet Public

Smart door (Home step 6): Calls 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 Calls (web only), following Calendar (b9042ea, #48), Slides (d2e830f, #49), Sheets (66e5391, #71) and Docs (2e21630, #139), with every fix those reviews asked for built in up front, each with a test. native/, callscore/ and everything the native apps call are untouched. Not for merge: it needs the highest-model review and copy review. Calls merges with merge commits.

The bump (one change)

  • rastrillo v0.27.1 → v0.42.0; connect 14c83d7 + handoff ff16bf5 → Home main 150d94e; estilo 260f98c → main 468fab1. go mod tidy: go-sdk 1.8.0, go-json-experiment c27c302, new indirect fiesta 1.5.0, tdewolff minify v2.24.19 + parse v2.8.16, x/tools. (Calls has no chromedp, so no port.)

The door

  • SigninScreen + SigninOneWay, SigninPath = connect.SigninPath, ForgetPath = /signin/forget. Every state is estilo-signin-screen over auth.SigninState (signin.go); the tab title is rastrillo's (Frame.WholeTitle). Every door is drawn signed out.
  • With Home: /signin → SigninDoor, /signin/local → SigninLocal (under LocalGuard), /signin/oficina → SigninOficina, each under Home's session middleware (clears a definitively stale cookie, as the old /signin wrapper did; connect's Start refuses one) and then admittedOnly. Choose page mounted. Standalone: /signin is email only; /signin/local, /signin/oficina and choose answer 404.
  • Admission probe (signin_admission.go) replaces signin/teamSignin: rastrillo RequireSession + requirePerson (identity, Home link, membership, or the roster) on a probe GET /. Any 5xx is undecided. Calls-specific: - Outside team mode a Home storage failure answered 404 (errHomeIdentity), which the probe would read as a refusal. It is now errHomeUnavailable → a no-store 503 from requirePerson (team mode already answered 503). This changes that page answer (404 → 503). - endRemovedSession skips its sign-out under the probe (probing), so the strict probe in rememberOficina never ends the session it was asked about. - requireMember is deliberately not in the probe: a signed-in non-member is a participant here (/welcome), not a refusal.
  • Refusal / removal: refused session → Paul's refusal; a session requirePerson ends as removed → Calls' existing removal sentence (both modes, as before). App-problem slot, plain door only; cookie cleared on the door's response; Oficina ID forgotten, email way kept. ?err=refused typed in shows nothing.
  • Remembering: MintHomeSession → rememberOficina, strict admission of the minted session (admittedAs), connect.MintedPerson address, none for a Home-only member, no carry-over.
  • Return memory: Calls' existing sealed cookie (__Host-calls_return, Slides' shape) with every protection: beginSignin (both modes) takes return_to off Begin's form even on a parse error, remembers it (forgets on a post without one), puts it back on Begin's redirect; a plain /signin forgets, a plain /signin/local carries the kept page; /signed-out is never kept; Forget and Sign out clear it. Landing stays /continue (SignedInPath standalone, LocalLandingPath with Home), so a pending meeting join still comes first.
  • Signed out: connect.PageFor("signedout") + .Forgetting; with Home chain=oficina → {issuer}/forget?return=<origin>/signed-out.
  • sameAnswer deleted, as on Slides (Fable, #49): it rewrote Begin's problems to ?sent=1, dropping force, reauth, return_to and Sent's attempt. Begin's answers don't depend on membership here (Authorize runs in the mail worker). gateBegin's syntax check now answers in Begin's shape (?err=address, force/reauth kept).

Guests, the join cookie, native

  • Guests (Paul: join by name by default, Oficina ID only on explicit choice): /j/{token} and POST /j/{token}/guest untouched. A guest session is never judged by the probe (methods judged: magiclink, keymail, home-assertion), so it is never refused, remembered or ended at the door; it is drawn the door (connect's SigninDoor already reads guest as signed out).
  • Join cookie: /signin with a live join cookie is the door with no Oficina ID (the old branch called localSignin, email only); the outsider's emailed sign-in lands in the meeting via /continue's pending join.
  • Native: Calls' native sessions are their own rows (native_auth.go mints a copy) and callscore never follows a redirect, so they never reach the door; the door ends only the session the browser presented.

API changes handled

  • connect: Routes.Signin removed → three routes; PageData own struct + ForgetAction; link step-up /signin/local?reauth=1; Config.Admit required with HomeOnly/Unlinked (team mode would not boot) → teamAdmit + choose page rendered in connect's English (home.html); OAuthContinuation/renderKeymail/oauth.html gone (Keymail continues on the door at /signin?continue=).
  • rastrillo: English locale pack linked (serving.go); frameworkCSP gains the confirm page's style hash; v0.31 minified assets (no Calls test pinned served bytes); v0.29 RequireSession carries return_to (room.js's readRefusal reads "went elsewhere", unchanged); v0.38 Sent's attempt= (tests use sentAnswer).
  • rastrillo doctor: clean (doctor --probe exits 0). vendoredIsMine in vendored_test.go (estilo's shim, busy.js, theme, and the library files no layout links); tokens.css + select.js re-copied; writeestilo re-run; migrate-templates -write over 19 templates (rendered HTML of 11 pages byte-identical before/after apart from random ids); rastrillo generate stubs (gen/, api/v1.json). AGENTS.md updated.
  • Migrations: Home linkstore 0003_choice_proofs (additive, at boot with Home). auth, sessions and handoff migrations unchanged; none of Calls' own; migration check agrees.

Credits

Calls' /help/open-source is generated by estilo's oficina-notices over the production graph (make credits), no per-app "uses" notes, so no estilo branch. Regenerated: + Fiesta v1.5.0, minify v2.24.19, parse v2.8.16; rastrillo, go-sdk, json bumped.

Copy review

Changed: refusal → "That email can’t sign in to Calls. Use a different email, or ask whoever runs this team to add it." (was "That address … a different address …"). 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; Slides' same sentence). Added (already approved): "Oficina ID" (name; rastrillo draws "Continue with Oficina ID"); team choose page in connect's English ("Welcome to the team" / body / "Connect my existing account" / "I’m new here — continue with Oficina ID"); signed out "Forget me on this device". Removed (rastrillo's approved copy covers them): "That doesn’t look like an email address." · "Too many attempts. Wait a few minutes, then try again." · "That link has expired or was already used. Enter your email to get a new one." · "Your Keymail sign-in couldn’t be completed. Enter your email to get a link instead." · "We couldn’t sign you in. Enter your email to get a new link." · confirm lede "Select Sign in to finish signing in." · Keymail page "Taking you to Keymail to finish signing in." Now rastrillo's words: heading "Sign in" → "Sign in to Calls"; "Email address" → "Email"; help line gone; submit "Sign in" → "Continue"; Sent → "We sent a link to {address}/your inbox. The link works once and expires soon."; "Use a different address" → "Use a different email"; unknown err → "Something went wrong. Try again.". Tab titles: "Sign in · Calls" → "Sign in to Calls"; "Check your email · Calls" → "Check your email to sign in to Calls"; new "Other ways to sign in to Calls", "Problem signing in to Calls", "Taking you to Keymail to sign in to Calls"; "Signed out · Calls" unchanged. Nothing outside approved patterns.

Visual drift (main 13e3383 vs branch, headless Chromium forced light, 1280 and 390)

Pairs + metrics + every door state: https://pauls-macbook-pro-2.tail76ffb7.ts.net:10006/smart-door/calls-bump/ (polish-audit/smart-door/calls-bump/index.html). All from rastrillo v0.42's tokens.css (Fiesta 1.5.0) and the credits; no layout regression like Calendar's toolbar gap, so no CSS fix:

  • form-foot buttons 44 → 42.4px at 1280, 46.8 → 52.4px at 390 (list, join page, settings, lobby);
  • "← Meetings" back link is a 32px target at every width, so the lobby title sits 11px lower at 1280 (as Slides');
  • switch rows (settings, Studio audio) ~6–11px taller;
  • Open source gains Fiesta, minify, parse;
  • the agents empty state keeps its dashed box (Fiesta 1.5.0 still draws it; meet's open empty-state-no-box branch edits the old tokens.css and will need redoing over this bump).

Tests

New in internal/calls: signin_door_{states,refusal,remember,return,contract,calls,team,forget,helpers}_test.go, and signin_browser_test.go (-tags browser, test/browser/door.mjs, in make vet and make browser): every route and state both modes with titles; signed-in shortcut; refusal/removal plain door only, cookie cleared, Oficina forgotten, email kept, no loop, /signin/oficina restarts; standalone refusal; undecided (persons table gone → page 503, door no refusal/no cookies/session and record kept; strict probe refuses; team mode too); remembering (address, no carry-over, unknown, minted session judged, probe ends nothing, confirm leaves record); return memory (landing, Begin never sees it, reset, parse error, unsafe//signed-out//j/ values, tampered/expired/duplicated, Forget and Sign out); link step-up end to end; estilo contract over 10 states + refusal + join door + confirm + standalone; guest by name both modes, join-cookie email-only sign-in both modes, native session at the door; team choose new/connect, stranger, removed member, unlinked local account. 21 mutations, one per protection, each seen to fail its test. Existing tests updated (door copy, /signin/oficina to start exchanges, Sent's attempt, Keymail on the door, choose page in the team fixture, CSP hash).

Local: make ci passes (vet incl. browser tags, gofmt, go test ./... on the pinned go1.26.5, migration check). TestSmartDoorInABrowser passes (16 states × 320/1280: no sideways scroll, 24px targets, glyph drawn). make browser (the real-call gate) result follows.

LLM

Calls moves to the smart door, as Docs, Sheets, Slides and Calendar did: rastrillo v0.42.0 + connect/handoff 150d94e + estilo 468fab1 in one bump; /signin is the door with Continue with Oficina ID behind a probe of requirePerson; guests by name, the join cookie (email only) and native sessions untouched; Oficina ID remembered for admitted sessions; Forget chained to id.*; team mode gains Admit and the choose page. Needs highest-model review + copy review; not for merge.

Correction to the visual-drift link: the comparison is at https://pauls-macbook-pro-2.tail76ffb7.ts.net:10006/calls-bump/ (polish-audit/smart-door/calls-bump/index.html).

Hub CI passed on bf3b569 and on f59ed4a. Push tokens revoked. Not merged, not deployed.

Browser gate (make browser, sandbox off, TMPDIR=/tmp; the door test forces light itself):

  • First run on bf3b569: the node unit suites passed and so did every call scenario except 6 (guest, speaker, chat, removed, selfview, selfviewwebkit). All 6 failed in the same place, call.mjs's signInAsGuest, which posted the old door's form[rst-form] and waited for exactly /signin?sent=1.
  • f59ed4a fixes it. The script now posts form[rst-signin-form], reads Sent as sent=1 plus an attempt, and checks that the join cookie's door offers no Oficina ID. native-auth.mjs waits for Sent the same way. With that fix the 6 pass, and TestSmartDoorInABrowser passes.
  • Not run here: make native-browser, native-webkit and iphone-browser (they need the native builds). native-auth.mjs only changes how it waits for Sent.

Fable's fixes and Paul's ruling are in cfa7636. Hub CI passed. Push token revoked. Not merged.

Paul's ruling on finding 1 (2026-11-22): while a join cookie is live, email is the default, with Oficina ID under Other ways. Recorded in AGENTS.md; it replaces "email only while joining".

  • The door keeps the federated way and forces the plain door to the email way (st.Way = WayEmail), whatever the browser used last. A remembered Oficina ID shows "Continue as {address}". A step-up still offers no Oficina ID.
  • The chooser lists Oficina ID.
  • An Oficina ID sign-in started there lands on /continue, which follows the invitation, as an emailed link does: - oficinaJoinLanding sets return_to=/continue on /signin/oficina; - chooseJoinLanding turns the member choice's "I'm new here" landing at / into /continue; - continueInvitation follows the cookie's own link by its sealed hash, through followLink's signed-in path (enterThroughLink). No destination or token comes from the request, so there is no open redirect and the /j/ token is never copied into a URL.

Fixes

  1. followLink now answers a Home storage failure with the same no-store 503 as requirePerson (it was a 500). homeUnavailable gives that one answer in both places.
  2. The errHomeRemoved comment in home.go is corrected.
  3. Tests: - guests by name and the email sign-in through the join cookie now run with Home, standalone and in team mode; - the join-cookie door is email first (field, or "Continue as" with Oficina ID remembered), its chooser lists Oficina ID, and a step-up never offers it (Home and team); - an Oficina ID sign-in with a pending invitation lands on it (Home and team, the latter through "I'm new here"); - the 503 is asserted on a followed invitation and on /native/meetings/start, a deliberate change; - each new piece was seen to fail its test when removed (5 mutations).

Local: make ci passes. TestSmartDoorInABrowser passes, now with the join cookie's chooser as a state. The browser gate's guest and removed scenarios pass.

Fable's LOW fix is in acac9d8. Hub CI passed. Push token revoked. Not merged.

/continue used to forget the kept return page only after continueInvitation had written its redirect, so the clearing cookie was never sent. continueInvitation now calls forgetReturn as soon as it has decided to answer, before teamLinkHost or enterThroughLink write anything.

TestAnOficinaSigninFromTheJoinCookieLandsOnTheInvitation now starts with a page already kept. It asserts that /continue clears that cookie and that a second /continue lands on /. With the fix removed, the test fails. make ci passes.

Review: Claude Fable (claude-fable-5-2). f59ed4a: APPROVE AFTER FIXES (no security findings; browser gate 52/53 with a laterolls load flake). Paul ruled on finding 1 (2026-11-22): on an invitation the door defaults to email, Oficina ID sits under Other ways, and both return to the invitation. cfa7636: APPROVE AFTER FIXES (one LOW: /continue's return-forget ordering); fixed in acac9d8, with a test that fails without it. Copy follows approved patterns. CI passed at acac9d8.