Speak the suite's sign-in door copy in Slides
The door's button reads 'Sign in'; sent and signed-out pages and titles come from estilo; the email subject is 'Sign in to Slides'. Reviewed by GPT-6-Astra via Codex (#18). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from chore/door-copy into main.
6 files changed,
+77
−69
go.mod+1 −1go.sum+2 −14internal/slides/auth.go+14 −30internal/slides/home_test.go+6 −1internal/slides/locales/en.toml+6 −23internal/slidestest/signin_door_test.go+48 −0
CI passed — run details
diff --git a/go.mod b/go.mod| index 031a7ea..cb506be 100644 |
| --- a/go.mod |
| +++ b/go.mod |
| @@ -5,7 +5,7 @@ go 1.25.0 |
| toolchain go1.26.5 |
| require ( |
| - amadan.net/oficina/estilo.git v0.0.0-20260929185827-41201439fd22 |
| + amadan.net/oficina/estilo.git v0.0.0-20261001084202-0b4d92c3dc16 |
| amadan.net/oficina/home/connect v0.0.0-20260923190447-01166fcfc0a9 |
| amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489 |
| amadan.net/rastrillo/rastrillo v0.26.1-0.20260908075707-29e4491631bd |
diff --git a/go.sum b/go.sum| index 17bb1ce..b322140 100644 |
| --- a/go.sum |
| +++ b/go.sum |
| @@ -1,17 +1,5 @@ |
| -amadan.net/oficina/estilo.git v0.0.0-20260924071126-894afdcb71a9 h1:vHOkWeJ7mRwLjPbMihf0f7aqz4CLSe0/NseQsHcJUYQ= |
| -amadan.net/oficina/estilo.git v0.0.0-20260924071126-894afdcb71a9/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929070530-5b2ce835e773 h1:9DIAhG3TaGG+LE2+8LvU73ZEhfK+oNn2y2p4kFjAAi0= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929070530-5b2ce835e773/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929095046-d0664ee49914 h1:V0AyxXYCxqGZClOLqvppw+cCTXsn3b9NmRQ8CV5ZlXY= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929095046-d0664ee49914/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929095838-0994675f496e h1:LTSmIWUS8RjPb6m94Ynf7moyFYeBXr08rdOr3nmNqvg= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929095838-0994675f496e/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929165053-846b39772f3c h1:YYocIz3r3b4oIA0K/58JkSsmyTOCzMT/2GaW/MFbbPo= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929165053-846b39772f3c/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929183653-cc2c1e56fb4b h1:UOxYBKsOSRHcHHYNKt0i6cB1Z4yT2soywOTWURYvBWo= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929183653-cc2c1e56fb4b/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929185827-41201439fd22 h1:RR9qP85FU1cZdn788v1zSLgZbKMGBmSk6Q7Rezj5JYI= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929185827-41201439fd22/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| +amadan.net/oficina/estilo.git v0.0.0-20261001084202-0b4d92c3dc16 h1:F5v3x25dEj1rJNnBm71G7shN+fM+T2actUlaGPvoeH8= |
| +amadan.net/oficina/estilo.git v0.0.0-20261001084202-0b4d92c3dc16/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| amadan.net/oficina/home/connect v0.0.0-20260923190447-01166fcfc0a9 h1:K/PaOVdQqRMwifPD6ipiwLeGR5nbFSxm9FxjrDJlZcg= |
| amadan.net/oficina/home/connect v0.0.0-20260923190447-01166fcfc0a9/go.mod h1:YroavXe43Wietec+po8mtSk4a9Bir2h31Q3iAf4MWxI= |
| amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489 h1:RPKtyry/71i06o8L+gjAaUyexbmG56kO1YPs601URAM= |
diff --git a/internal/slides/auth.go b/internal/slides/auth.go| index 94a1cd5..884fea1 100644 |
| --- a/internal/slides/auth.go |
| +++ b/internal/slides/auth.go |
| @@ -278,6 +278,7 @@ func newAuthPlugin(cfg Config, writer *sql.DB, list allowlist) (*rauth.Auth, err |
| Origin: cfg.Origin, |
| InstanceKey: cfg.InstanceKey, |
| Mailer: cfg.Mailer, |
| + Subject: chrome.EmailSubject("Slides"), |
| Authorize: list.allows, |
| SigninPath: signinPath, |
| Logger: cfg.Logger, |
| @@ -608,30 +609,20 @@ func (a *app) signin(w http.ResponseWriter, r *http.Request) { |
| if remembered, ok := a.rememberedReturn(r); ok { |
| again += "?return_to=" + url.QueryEscape(remembered) |
| } |
| + sent := chrome.SignInNotice{Icon: brand.Path("slides"), App: "Slides", Sky: sky.For(r.Host)}.Sent(again) |
| render(w, "signin", signinView{ |
| - shell: a.publicShell(r, frame{parts: []string{rastrillo.T(r, "slides.signin.sent.title")}, signinPage: true}), |
| - Sent: &chrome.SignInNotice{ |
| - Icon: brand.Path("slides"), |
| - App: "Slides", |
| - Sky: sky.For(r.Host), |
| - Heading: rastrillo.T(r, "slides.signin.sent.title"), |
| - Body: rastrillo.T(r, "slides.signin.sent"), |
| - Link: &chrome.Link{Href: again, Label: rastrillo.T(r, "slides.signin.again")}, |
| - }, |
| + shell: a.publicShell(r, frame{parts: []string{sent.Page()}, signinPage: true}), |
| + Sent: &sent, |
| }) |
| return |
| } |
| form := chrome.SignIn{ |
| - Icon: brand.Path("slides"), |
| - App: "Slides", |
| - Sky: sky.For(r.Host), |
| - Heading: rastrillo.T(r, "slides.signin.title"), |
| - Action: signinPath, |
| - Hidden: []chrome.Hidden{{Name: "force", Value: "1"}}, |
| - AddressLabel: rastrillo.T(r, "slides.signin.address.label"), |
| - Help: rastrillo.T(r, "slides.signin.help"), |
| - Submit: rastrillo.T(r, "slides.signin.submit"), |
| - OpenSource: &chrome.Link{Href: "/help/open-source", Label: rastrillo.T(r, "slides.credits.title")}, |
| + Icon: brand.Path("slides"), |
| + App: "Slides", |
| + Sky: sky.For(r.Host), |
| + Action: signinPath, |
| + Hidden: []chrome.Hidden{{Name: "force", Value: "1"}}, |
| + OpenSource: &chrome.Link{Href: "/help/open-source", Label: rastrillo.T(r, "slides.credits.title")}, |
| } |
| if hasReturn { |
| form.Return = ret |
| @@ -655,7 +646,7 @@ func (a *app) signin(w http.ResponseWriter, r *http.Request) { |
| form.Error = rastrillo.T(r, "slides.signin.error.unknown") |
| } |
| render(w, "signin", signinView{ |
| - shell: a.publicShell(r, frame{parts: []string{form.Heading}, signinPage: true}), |
| + shell: a.publicShell(r, frame{parts: []string{form.Page()}, signinPage: true}), |
| SignIn: form, |
| }) |
| } |
| @@ -871,18 +862,11 @@ type signedOutView struct { |
| // renderSignedOut is where Sign out lands, standalone and with Home |
| // alike: "You're signed out", and a primary Sign in. |
| func (a *app) renderSignedOut(w http.ResponseWriter, r *http.Request, status int) { |
| - title := rastrillo.T(r, "slides.signedout.title") |
| + notice := chrome.SignInNotice{Icon: brand.Path("slides"), App: "Slides", Sky: sky.For(r.Host)}.SignedOut(signinPath) |
| var buf strings.Builder |
| err := pages["signed_out"].ExecuteTemplate(&buf, "layout", signedOutView{ |
| - shell: a.publicShell(r, frame{parts: []string{title}, signinPage: true}), |
| - Notice: chrome.SignInNotice{ |
| - Icon: brand.Path("slides"), |
| - App: "Slides", |
| - Sky: sky.For(r.Host), |
| - Heading: rastrillo.T(r, "slides.signedout.heading"), |
| - Body: rastrillo.T(r, "slides.signedout.body"), |
| - Link: &chrome.Link{Href: signinPath, Label: rastrillo.T(r, "slides.chrome.signin")}, |
| - }, |
| + shell: a.publicShell(r, frame{parts: []string{notice.Page()}, signinPage: true}), |
| + Notice: notice, |
| }) |
| if err != nil { |
| a.logger.Error("slides: render signed-out page", "err", err) |
diff --git a/internal/slides/home_test.go b/internal/slides/home_test.go| index 79b323d..b089805 100644 |
| --- a/internal/slides/home_test.go |
| +++ b/internal/slides/home_test.go |
| @@ -201,6 +201,11 @@ func TestHomeFrontDoorLocalRecoveryAndCallbackGuard(t *testing.T) { |
| if tc.path == "/signin/local" && !strings.Contains(w.Body.String(), "estilo-signin-form") { |
| t.Error("local form missing") |
| } |
| + // connect's "signedout" state draws the door's signed-out page, |
| + // never connect's own "Sign in with Home". |
| + if tc.path == "/signed-out" && (!strings.Contains(w.Body.String(), "You’re signed out") || strings.Contains(w.Body.String(), "with Home")) { |
| + t.Errorf("Home-mode signed-out page is not the door's:\n%s", w.Body.String()) |
| + } |
| } |
| r := httptest.NewRequest("GET", homeTestOrigin+"/signin/local", nil) |
| c := homeSession(t, a, "home-person", connect.HomeMethod) |
| @@ -258,7 +263,7 @@ func TestHomeDifferentAddressStaysInLocalRecovery(t *testing.T) { |
| if sentPage.Code != http.StatusOK { |
| t.Fatalf("sent page: %d", sentPage.Code) |
| } |
| - m := regexp.MustCompile(`href="([^"]+)">slides\.signin\.again`).FindStringSubmatch(sentPage.Body.String()) |
| + m := regexp.MustCompile(`href="([^"]+)">Use a different address`).FindStringSubmatch(sentPage.Body.String()) |
| if m == nil { |
| t.Fatal("sent page has no Use a different address link") |
| } |
diff --git a/internal/slides/locales/en.toml b/internal/slides/locales/en.toml| index da32d6e..334e5f6 100644 |
| --- a/internal/slides/locales/en.toml |
| +++ b/internal/slides/locales/en.toml |
| @@ -7,38 +7,24 @@ |
| # Adding a language means adding a file beside this one with the same |
| # keys; nothing else in the app has to change. |
| -# slides.signin.* — GET /signin (auth.go's signin handler), estilo's |
| -# sign-in pages with the suite's copy deck (shared chrome spec §9.2). The |
| -# page renders the form and, on the way back from rastrillo/auth, |
| -# whichever outcome it was redirected here with (?sent=1, or |
| -# ?err=rate|address|expired|keymail|removed|1). |
| +# slides.signin.* — GET /signin (auth.go's signin handler): the errors |
| +# estilo's sign-in door shows, on the way back from rastrillo/auth, for |
| +# whichever outcome it was redirected here with |
| +# (?err=rate|address|expired|keymail|removed|1). The door's own words |
| +# (form, check-your-email, signed out) are estilo's chrome.English, not |
| +# keys here, so no app can drift from the others (shared chrome spec §9.2). |
| # |
| # error.unknown covers both the keymail outcome and a bare failure: |
| # rastrillo/auth's Verify deliberately answers the same way for an |
| # unknown, a used and an expired token, so there is no finer |
| # distinction for this page to draw — and every outcome on this screen |
| # means one operational thing, "ask for a new link". |
| -# |
| -# sent says "that address", not the address: gateBegin answers every |
| -# POST with the same bare ?sent=1, so the page has no address to echo. |
| -slides.signin.title = "Sign in" |
| -slides.signin.address.label = "Email address" |
| -slides.signin.help = "We’ll email you a link that signs you in. It works once and expires in 15 minutes." |
| -slides.signin.submit = "Email me a link" |
| -slides.signin.sent.title = "Check your email" |
| -slides.signin.sent = "If that address can sign in here, we’ve sent it a link. It works once and expires in 15 minutes." |
| -slides.signin.again = "Use a different address" |
| slides.signin.error.rate = "Too many attempts. Wait a few minutes, then try again." |
| slides.signin.error.address = "That doesn’t look like an email address." |
| slides.signin.error.expired = "That link has expired or was already used. Enter your email to get a new one." |
| slides.signin.error.unknown = "We couldn’t sign you in. Enter your email to get a new link." |
| slides.signin.error.removed = "Your access has been removed, so you’ve been signed out. Ask whoever runs this team if that’s wrong." |
| -# slides.signedout.* — where Sign out lands, standalone and with Home. |
| -slides.signedout.title = "Signed out" |
| -slides.signedout.heading = "You’re signed out" |
| -slides.signedout.body = "You’ve signed out of Slides on this device." |
| - |
| # slides.chrome.* — estilo's shared bar and account menu (chrome.go). |
| slides.chrome.skip = "Skip to content" |
| slides.chrome.menu = "Menu" |
| @@ -604,9 +590,6 @@ slides.export.error.store = "The PDF was made but couldn't be stored. Try again. |
| # slides.home.* — connect's account-connection pages. The hub is never |
| # named: it is "your Oficina account", and the verb is Connect (Paul's |
| # answer 3 to the shared chrome spec's §13). |
| -slides.home.signedout_title = "Signed out" |
| -slides.home.signedout_body = "You’ve signed out of Slides on this device." |
| -slides.home.signedout_action = "Sign in" |
| slides.home.start_title = "Connect your Oficina account" |
| slides.home.start_body = "Use your Oficina account to sign in to this Slides account. Your decks and sharing settings stay as they are." |
| slides.home.start_action = "Continue" |
diff --git a/internal/slidestest/signin_door_test.go b/internal/slidestest/signin_door_test.go| index 8557cf0..52e88ce 100644 |
| --- a/internal/slidestest/signin_door_test.go |
| +++ b/internal/slidestest/signin_door_test.go |
| @@ -35,3 +35,51 @@ func TestSignInPageIsTheDoor(t *testing.T) { |
| t.Error("sign-in page does not link sky.css") |
| } |
| } |
| + |
| +// TestDoorCopyIsEstilos pins the door's words, which are estilo's, not |
| +// this app's: the submit reads "Sign in" and never "Email me a link" |
| +// (Paul, 2026-10-01), the hub is never named, and the three tab titles |
| +// are "<Page> · Slides". |
| +func TestDoorCopyIsEstilos(t *testing.T) { |
| + h := newApp(t) |
| + title := regexp.MustCompile(`<title>([^<]*)</title>`) |
| + for _, tc := range []struct { |
| + path, title string |
| + want []string |
| + }{ |
| + {"/signin", "Sign in · Slides", []string{ |
| + "Email address", |
| + "We’ll email you a link that signs you in. It works once and expires in 15 minutes.", |
| + ">Sign in</button>", |
| + }}, |
| + {"/signin?sent=1", "Check your email · Slides", []string{ |
| + "Check your email", |
| + "If that address can sign in here, we’ve sent it a link. It works once and expires in 15 minutes.", |
| + ">Use a different address</a>", |
| + }}, |
| + {"/signed-out", "Signed out · Slides", []string{ |
| + "You’re signed out", |
| + "You’ve signed out of Slides on this device.", |
| + `href="/signin"`, |
| + }}, |
| + } { |
| + rec := get(t, h, tc.path) |
| + body := rec.Body.String() |
| + if rec.Code != http.StatusOK { |
| + t.Fatalf("GET %s: %d", tc.path, rec.Code) |
| + } |
| + if m := title.FindStringSubmatch(body); m == nil || m[1] != tc.title { |
| + t.Errorf("GET %s: title %v, want %q", tc.path, m, tc.title) |
| + } |
| + for _, w := range tc.want { |
| + if !strings.Contains(body, w) { |
| + t.Errorf("GET %s lacks %q", tc.path, w) |
| + } |
| + } |
| + for _, bad := range []string{"Email me a link", "Home"} { |
| + if strings.Contains(body, bad) { |
| + t.Errorf("GET %s says %q", tc.path, bad) |
| + } |
| + } |
| + } |
| +} |