Skip to content

Show the AI assistant consent screen in the organizer's language - #966

Merged
richshaw merged 274 commits into
mainfrom
claude/issue-950-consent-text
Nov 16, 2026
Merged

richshaw merged 274 commits into
mainfrom
claude/issue-950-consent-text

Conversation

@richshaw

@richshaw richshaw commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Fixes #950.

Merge after #965.

The stack

Phase 2 of the localization stack (#619), track B. Based on #965 (claude/issue-949-sign-in-email); review against that branch.

The problem

The screen where an organizer lets an AI assistant into their account had its English written into it: the consent page and its two buttons, the permission lines (SCOPE_DESCRIPTIONS, also listed under each app on Connected apps), the page saying a request has expired, the decision route's replies, and the OAuth provider's own error page, a hand-written HTML string with <html lang="en">, used for every OAuth error a browser sees, the rate-limit page included. So none of it could follow a language.

The fix

31 messages, English byte for byte as it read: 21 in auth.consent, 4 in auth.scopes, 6 in auth.oauthErrors.

  • The consent page (src/app/oauth/consent/[uid]/page.tsx) is in the organizer's language, getOrganizerAppLocale(session), since they're signed in by then (owner, 15 November). That covers its tab title, the heading, the three ways of naming the app, the permissions, the amber note on participants' details, "It acts as you…" (one message with a select for "in every workspace you belong to"), the footer line and Sign in as someone else. CenteredPageFrame gets the language (Move the sign-in pages' text into the catalog #963 added its locale), so the page is marked with lang and its footer is in it. The expired page uses the same language.
    • The page now reads the session before the uid check, so a malformed uid's expired page is in the organizer's language too. generateMetadata already reads it in the same render, and React's cache shares it, so this costs no statement. Who gets redirected, and where, is unchanged.
  • The buttons (consent-form.tsx, a client component) get their four words as props, as Move account Settings and Connected apps text into the catalog #956, Move a signup's header, tabs and status labels into the catalog #957 and Move the sign-in pages' text into the catalog #963 do. No ClientMessages, so no messages or next-intl runtime reach the browser.
  • The permissions come from auth.scopes. SCOPE_DESCRIPTIONS (English strings) becomes SCOPE_MESSAGES (scope → catalog key), and describeScopes returns each row's key in place of its text. The consent page and Connected apps both translate it in the organizer's language. They're in auth.scopes, not inside auth.consent as the issue suggested, because both screens read them.
  • The decision route's replies (too many attempts, failed to record) are in the organizer's language, as the consent page is: the organizer is signed in there too. The route used to call requireActor(); it now does what that does in two steps (getOrganizerSession(), then toActor()), so the same session also gives the language without a second read. The plain-text Not found (404, bad uid) and Forbidden (403, cross-site POST) replies stay as they were: no person following the flow sees them.
  • The provider's error page (renderErrorPage in src/oauth/provider.ts) takes a language and sets <html lang> from it. Its own words are in that language; its home-page link is a tag in the sentence, and the whole sentence is HTML-escaped with the tags kept. The error code and the provider's own descriptions (oidc-provider's English, the same text a client reads) are shown as given. The provider uses the instance's language, signInLocale(), since it doesn't know who is signed in. It gets that language as ProviderDeps.errorPageLocale, which instance.ts sets when it builds the provider. The provider is built once per process and DEFAULT_LOCALE can't change while the process runs, and as a dep the provider's unit tests don't need an environment.
  • The rate-limit page (src/oauth/handler.ts) is in signInLocale() too, and so is its wait (waitInMinutes(…, locale)). The 429, its headers and the JSON reply clients get (too many requests) are unchanged.
  • What stays as it is: the app's name and domain as its metadata gives them, scope names, error codes, every JSON error_description, and docs/connect-ai-assistant.md.
  • Lint: src/app/oauth is in TRANSLATED, and no-hard-coded-text.test.ts lists the page and the form. The src/oauth/*.ts files have no JSX for the rules to check; tests pin their text.
  • Docs: docs/translating.md (namespace table, which language), CLAUDE.md's OAuth section (a "Languages" line), signInLocale's comment, the help article's .ui.ts comment (it pointed at SCOPE_DESCRIPTIONS), and a CHANGELOG line.

OAuth behaviour is unchanged

Only where the words come from changed. Here's how I checked:

  • The diff. Under src/oauth, only four files changed:
    • provider.ts: renderErrorPage's text, and the errorPageLocale dep passed to renderError;
    • handler.ts: the rate-limit page's text;
    • instance.ts: one dep line;
    • scopes.ts: the description table now holds catalog keys. ALL_SCOPES, RESOURCE_SCOPES, ADVERTISED_SCOPES, parseScopeString, and describeScopes' order, filter and sensitive flag are untouched.
    • Untouched: config.ts (TTLs, routes, cookies), consent.ts, grants.ts, node-shim.ts, adapter.ts, keys.ts, client-display.ts, static-clients.ts, all of src/auth, src/middleware.ts and src/app/api.
  • The tests. scopes.test.ts still pins the advertised set without commitments:read. Every flow test in provider.test.ts and flow.db.test.ts passes unchanged: the only edit there adds errorPageLocale: 'en' to the deps. handler.test.ts still pins query-string forwarding and the buckets, and route.test.ts the consent bucket.
  • e2e on a production build. oauth-consent covers:
    • approve: a code, a token, tools/list on the MCP route, then disconnect revokes the refresh;
    • deny: access_denied;
    • the amber call-out for participant data;
    • Sign in as someone else;
    • the signed-out redirect.
  • The amber flag is the same markup (text-warn, the ! mark, the note below), and still says participants' details are shared. The new e2e step checks its class in each language.

English is unchanged

  • Error page: a unit test pins the whole English page byte for byte against the old template, escaping included. I also ran the old and new renderErrorPage side by side on four inputs, the rate-limit and redirect-URI errors among them, and the output was identical.
  • Consent page: I rendered the old page and the new one side by side, both in jsdom and as react-dom/server static markup. That covered a named and an unnamed CIMD app, a named and an unnamed static client, one and several workspaces, all four scopes, and the expired page. The markup is identical except for the frame's new lang="en".
  • No expected English changed in any existing unit, db, e2e or help walkthrough spec. scopes.test.ts's description test now reads through the catalog, with the same expected text. In route.test.ts only the mocks changed (the session, and the translator).

Client JavaScript

Gzipped first load, base 1bf5963 (#965) against this head, both built in this container:

  • /oauth/consent/[uid]: 107,422 → 107,408 B (−14);
  • /app/settings/connected-apps: +1 B;
  • every other page within ±4 B (module ids).

No budget moves. Both pages fall under * (108 kB).

Gate: owner. It's OAuth (src/oauth/). Nothing people see changes yet: English is unchanged, and no language but English has shipped to organizers.

Tests

  • New:
    • src/app/oauth/consent/[uid]/page.test.tsx:
      • the page in English word for word (heading, label, intro, permissions with the amber note, "It acts as you…", both buttons and their loading labels, the footer line and its link, the tab title, lang="en");
      • the unnamed app, the static client with and without a name, several workspaces;
      • the expired page, for a request that ran out and for a malformed uid;
      • the signed-out redirect;
      • for each other catalog language: English while it hasn't shipped to organizers, then every message from auth.consent and auth.scopes in it, with lang.
    • provider.test.ts:
      • the English page byte for byte;
      • the fallback description;
      • a translation with & and < is escaped and keeps its link;
      • the provider renders the page in the language it was built with, English and each other language;
      • each other language's words from the catalog, with the code and description as given.
    • handler.test.ts:
      • the rate-limit page in English;
      • for each other language as DEFAULT_LOCALE: English until shipped, then from the catalog with lang;
      • the wait in that language;
      • the JSON still English.
    • decision/route.test.ts:
      • the failure reply in English;
      • for an organizer in each other language: English until shipped, then both replies from the catalog with lang, and the wait in it.
    • scopes.test.ts: each scope's English as before; describeScopes returns the keys.
    • connected-apps/page.test.tsx: the second permission in English; both from auth.scopes in each other language.
    • tests/e2e/organizer-language.spec.ts:
      • for an organizer with no language and one per other catalog language, the consent screen through the real authorize flow: the permissions heading, its lang, the tab title, the label, the static client's line, all three permissions (the amber one by its class), the participant note, "It acts as you…", both buttons, the footer line, then Don't allow back to the client;
      • Connected apps' permission lines.
  • Run in this session on 7c8af9f, all passing:
    • pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test: 3191 passed, 1 expected fail;
    • pnpm test:db: 838 passed;
    • pnpm build && pnpm budgets: every page within budget, no number changed;
    • e2e, chromium, production build, port 3200, the container config: oauth-consent, organizer-language and the help walkthrough connect-an-ai-assistant, 27 passed.
  • node .claude/skills/help-pages/scripts/affected-articles.mjs origin/claude/issue-949-sign-in-email lists connect-an-ai-assistant's names as moved: they're in en.json now, word for word, and its walkthrough passes. Nothing on screen changed, so no screenshots were retaken.

Overlaps

🤖 Generated with Claude Code

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt

The README, .env.example and CHANGELOG said a language "takes effect
only once OpenSignup ships it", with a Swedish school as the example,
which reads as "set sv now and it will start working later". In fact any
value but en stops the app: the worker exits at startup and every page
that needs the database fails with an "Invalid environment" error. They
now say that, tell operators to leave it unset for now, drop the
example, and put what an unset value means in the future tense, since
nothing reads an organizer's browser language yet. fly.example.toml
says the same in one line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
In a file of its own, the form was a second server module importing
AsyncSubmitButton, and webpack then added a few bytes to that button's
module on every page that loads it. Inline in page.tsx, every page's
first-load JavaScript is byte-identical to the base. The test now renders
the Settings tab itself, so it also checks the page shows the form, and
that "Saved" appears only by the form that saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
#896 merged, so main now holds this branch's base. The one conflict,
src/lib/slot-label.ts, is between #895 and #896 as squashed on main and
the same commits in this branch's history; main's copy equals #896's
head, so the branch's copy (with TIME_ZONE from its new module) stands.
The merged tree is identical to the branch's before the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…ettings-control

Takes #897's address round: TIME_ZONE out of config.ts, the lenient read of
a stored locale, and the docs on DEFAULT_LOCALE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
chooseOrganizerLocale takes the organizer's saved language, the instance's
DEFAULT_LOCALE and the browser's Accept-Language header (null where there is
no browser, as for MCP) and returns the first that has shipped to the
audience asked about, else English, with the step that chose it. Only the
browser's top-ranked range counts, so "sv,en;q=0.8" gives English until
Swedish ships rather than settling for the second choice.

It lives in its own file, away from server.ts (which the worker imports) and
from next/headers. The column, the session field and the request wrapper
come later.

Part of #626.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
getSignupRowBySlug reads the live signup at a slug in one statement,
skipping deleted rows and keeping drafts and archived ones, so the page can
still say which. getPublicSignup takes that row, or a slug as before for the
public API, and loadPublicSignup now gets its row from the new cached
loadSignupRowBySlug. A layout that reads the row too (a later part of #628)
then adds no statement to GET /s/[slug].

A unit test stands a per-request cache in for React's and checks the page's
read goes through loadSignupRowBySlug and hands getPublicSignup the row, not
the slug. The query-budget test says why it counts the page alone. Both page
budgets stay at 5 and 6.

Part of #628.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…text

Part of #626. Adds organizers.locale, a nullable text column (migration
0015, add-only), and reads it in the query loadOrganizerSessionById
already runs: one more selected column, no new statement. The raw saved
value, or null, travels on OrganizerSession, on the bearer seam's
resolution and into the MCP ToolContext, since tool handlers may not
query the database. It stays off Actor, so a cookie and a token for the
same organizer still give the same actor. Nothing sets the column or
follows it yet.

signups.claim_token_hash is out of the schema but still in the database
until a later release (#820), so drizzle-kit wanted to drop it too. The
migration was generated with that field put back in the schema for the
run, so its diff is only the new column and the snapshot still matches
the database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…nd ships

updateOrganizerLocale saves the acting organizer's own language, refusing
anything that hasn't shipped to participants, and anyone who isn't an
organizer. Account Settings gets "Language for new signups", a plain form
that renders only once SHIPPED.participant has two languages, showing the
saved language or the one getOrganizerLocale would pick. The privacy page
says the account holds that choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
A new signup made through POST /api/signups, the New signup form or Magic
Compose now takes a language: the one an API caller sent, else the
organizer's (saved, the instance's DEFAULT_LOCALE, the browser's top
language, English). The route decides and passes it into createSignup;
persistDraft takes it as an option. While only English has shipped to
participants nothing is stored unless the caller sent a language, so no
signup is pinned to one nobody chose.

signup.created records locale and localeSource for a signup created with
a language, documented in docs/telemetry.md and on the privacy page.

Part of #627.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The AI assistant's create_signup now gives a new signup a language the
same way the browser does (#905), finishing #627:

- An optional `locale` on the tool's input (added with .extend(), not on
  FullDraftSchema, which is also Magic Compose's output schema). It is
  stripped from the draft and passed through persistDraft's `locale`
  option with source `api`.
- Without one, the signup takes newSignupLocale with the organizer's
  saved language (ctx.locale) and no browser: an assistant's
  Accept-Language is its vendor's. While only English has shipped to
  participants that stores nothing, as before.
- A language that hasn't shipped is refused with invalid_input on
  `locale`, with the REST API's message and suggestion, before any quota
  is spent or anything created. createSignup's check is exported as
  checkSignupLocale, with the field name as a parameter, so both say the
  same thing.
- signup.created records locale and localeSource as for the browser,
  next to viaClientId.

The tool description says what locale does and which values it takes.
docs/connect-ai-assistant.md, docs/telemetry.md and the CHANGELOG say
the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The signup page, its draft and archived messages, its not-found message and
the organizer's Preview now take the signup's language from its row and pass
it down: to the slot date and time formatters (which were given 'en'), to
the state messages (as `lang`), and to og:locale in the page's openGraph.

One rule picks the language, `signupLocale` in src/i18n/config.ts: the
stored `settings.locale` once it has shipped to participants, else the
instance's language for participants. It replaces `resolveLocale`, which
nothing outside its tests called and which kept a stored language that has
a catalog but hasn't shipped, where the Settings tab's language form shows
the instance's. The form now calls `signupLocale` too, so the choice an
organizer sees is the one participants get.

The page reads the language from the same cached row as `loadPublicSignup`,
so both GET /s/[slug] budgets stay at 5 and 6. A draft's or archived
signup's row gives the page only its language.

While only English ships every signup reads as English, so nothing anyone
sees changes except og:locale (en_US) on a signup's link preview.

Also tests the `deletedAt` check in getPublicSignup on a row read some other
way, which nothing reached since the slug read skips deleted rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
A not-found page gets no params, so the not-found pages under /s/[slug]
couldn't tell which signup they were under. The middleware now also runs
on /s paths and copies the path alone (never the query, which on an edit
link is its token) into a header of its own, x-opensignup-signup-path,
with set, so a client can't supply it. It never touches the organizer
callback header, which stays /app only, so nothing on a public page can
choose where sign-in sends someone.

Both not-found pages read the slug from that header and take only the
language from the cached row (loadSignupRowBySlug, the signup page's own
read), through signupLocale; a path with no plausible slug gets the
instance's language without a lookup. The helper that does this for the
signup page's draft and archived messages moves into signup-locale.ts so
all three share it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Take locale out of the MCP tools' UNREAD_SETTINGS, so get_signup and the
results of create_signup and update_signup show the stored settings.locale,
and update_signup takes one. Its settings schema takes the language as
sent, not through the stored schema's lenient read, so updateSignup refuses
an unshipped one with the REST API's message and null clears it, rather
than a long string or a non-string quietly clearing the stored value.

GET /api/public/signups/[slug] gains settings.locale: the language the
signup's page is in (signupLocale), never a stored value no participant
gets.

Also: create_signup's locale gets a .describe(); SignupLocaleSource moves
to the pure organizer-locale.ts; signupLocale's comment no longer says
emails follow it; a telemetry.md wording fix; CLAUDE.md says a tool
handler may run a pure check of its input; docs and CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Fifteen test files each carried their own copy of a function that changes
SHIPPED to ship Swedish for a test, with an afterEach to put it back. The
shared helper in src/i18n/testing/ship.ts does both: it changes the list for
the test it's called in (or each test of a beforeEach), and restores every
audience's list once the test finishes, whether it passed or threw, through
vitest's onTestFinished. The test files now call it and drop their copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…rops

SiteFooter takes `locale` and asks for its text in that language. Help,
legal, sign-in and the landing page pass English; so does the participant
layout for now, since it sits above [slug] and has no signup to read. The
footer never works out a default itself, because static pages must not call
getEnv().

Banner's ✕ ("Dismiss") and BottomSheet's ✕ ("Close") were the last English
in those two components. Each now takes the name as a prop (dismissLabel,
required whenever there is a ✕, and closeLabel), never from a translation
hook: organizer pages use both components and have no messages provider.
The organizer callers are client components whose other text is still
English, so they pass "Dismiss" and "Close" as literals and keep the
catalogs out of their bundles; the sign-up dialog passes "Close" until its
own text moves to the catalog. Every name reads as before.

Lint: the hard-coded-text rules are on for banner.tsx and BottomSheet.tsx as
well as the footer, and leave test files out (which matters once a folder
is listed). The text props now include body, eyebrow and description, and
any prop whose name ends in Label, so text passed through a shared
component's props is caught too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The page, its signup view, the slot formatting and the state messages now
take their text from the `participant` namespace, in the signup's language.
Glued sentences are whole messages: the signed-up bar, the Closed banner's
"spot is / spots are", "N slots", and "(no {label})" with the label whole in
it. Counts use a `::group-off` skeleton, so English reads "1234 left" as
before rather than "1,234".

The organizer's text on these pages (the organizer strip, the Preview banner
and the disabled button's tip, the own-draft note) goes to the `organizer`
namespace, stays English, and is marked lang="en" where the element allows.

slot-format.ts takes a translator as an argument, typed with `import type`,
since the sign-up dialog imports it. The hard-coded-text lint rules are on
for the five files, and now also catch `detail`, props ending in Title, and
text keys of an object passed as a prop (`action={{ label }}`).

English is unchanged: the HTML differs from before only by the lang markers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
ClientMessages is a client component around next-intl's provider that
passes the language, the messages and the time zone itself, so it never
reads the request config. messagesFor, now exported from translator.ts,
gives a server component just one namespace's messages with English
under them, and a lint rule keeps every other file from importing the
provider. The live signup page mounts it around the view that renders
the dialog, and the edit page around its form.

The name box's label, "Your name", is the first text a client component
reads with useTranslations: the dialog and the edit form both show it,
so both pages carry the runtime they'll need, and the four pages whose
JavaScript includes it get their budgets raised by the measured amount.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The rest of the sign-up dialog's text and participant-fields.tsx read
their words with useTranslations, from the participant catalog the
page passes ClientMessages: participant.dialog, fields, slot (its
"N of M spots left" is the row's leftOf) and errors. messagesFor takes
a list of namespaces for that. The Sign up button's two messages move
from signupView to dialog, which the Preview and showcase stand-ins
read on the server.

The message helpers (capacity, closed, conflict, gone, name, rate
limit, participantErrorCopy) take a translator instead of returning
English, so the same code runs in the dialog, on the edit page, and on
the server. The not-found pages build their copy with gonePage(t), and
the e2e specs that read it build an English translator. Glued
sentences are whole messages: plurals for spot counts and the rate
limit's minutes, selects for the reminder clause and the calendar
sentence, and tags around the slot and the address.

Closing the sheet now gives the focus back to its Sign up button.

Lint is on for the dialog, its fields, the helpers and the signup's
not-found page. English is unchanged, and the four dialog pages' first
JavaScript is 223 to 416 bytes smaller, so their budgets come down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
src/messages/sv.json holds Swedish for every participant message and the
footer's common text, a first machine pass for #639's review to check. sv
joins CATALOG_LOCALES, not SHIPPED, so nobody can choose it and every page
stays English; DEFAULT_LOCALE=sv is now accepted and changes nothing until
Swedish ships, which the README, .env.example, fly.example.toml and the
CHANGELOG now say.

The e2e seed adds a published Swedish signup, created through createSignup
and given settings.locale 'sv' directly, since the service refuses a
language that hasn't shipped. The server Playwright starts gets
E2E_UNSHIPPED_LOCALES=sv, which lets signupLocale keep a stored language
that has a catalog though it hasn't shipped. It ships nothing on its own:
nothing in the app can store such a language.

precompiled-messages, a11y and slot-row-layout run on the Swedish signup
too, and a new spec checks the organizer strip and the Preview banner stay
English, marked lang="en", over it. Slot dates and times now take a
CatalogLocale rather than any string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
getOwnCommitment also selects the signup's settings->>'locale', in the
statement it already ran, and returns it as signupLocale: the stored string
or null, never the settings object. The unsubscribe preview does the same.
The edit page and the unsubscribe page read it through signupLocale(), as
the signup's own page does, pass it to the slot-name helpers in place of
'en', and mark their <main> with lang. Their words stay English for now.

GET /api/commitments/[id] keeps its answer as it was: nothing reads the
language from there, so the route leaves signupLocale out. A db test checks
the answer has exactly the commitment's fields, the participant's name and
email and the signup's slug, with no settings, on a signup whose settings
hold organizer-only keys and a language.

A broken or incomplete unsubscribe link takes the language of the signup
its path names, as a broken edit link's not-found page does, sharing that
page's cached read. No page or route sends another statement.

Part of #630.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The sign-up sheet's Spots box is 80px wide in every language, and the
Swedish "Antal platser" wrapped there, pushing its input below the Notes
input beside it at every width. It now says "Platser", the term list's
word for a spot. slot-row-layout.spec.ts checks the sheet's field labels
fit on one line, and that Notes and Spots line up, in English and
Swedish down to 320px, so a longer translation fails the test rather
than the page.

Three more fixes in sv.json from the tophat's reading: the success
screens said "din plats på {slot}", a preposition that doesn't take a
slot's name, and now say "din anmälan till {slot}", as the edit link
already did; and the draft page said the link works "när den är
publicerad", which reads as the link being published, and now says the
list.

The server logs one warning at startup when E2E_UNSHIPPED_LOCALES is
set (src/instrumentation.ts), so an operator who sets it by mistake
hears about it. The edge build drops the branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The participant's edit page (change or cancel a spot), its form, the
cancelled and moved messages, and the unsubscribe page now read their
words from the participant catalog in the signup's language, which #915
worked out. Their tab titles do too, from the read the not-found pages
already make, so no request sends another statement.

Sentences that were glued from pieces are whole messages: "You're
editing this as {name} ({email})." and the unsubscribe page's "for",
"at" and "sending" clauses each have a version with the address and one
without, and "You can have up to N spots on this slot" is a plural.
English reads exactly as before.

Swedish for every new message goes in sv.json, in #914's terms. The
hard-coded-text lint rules now cover the whole of src/app/s/[slug]
(tests left out), and TEXT_PROPS takes the unsubscribe page's `error`.
The Swedish e2e signup gains a cancelled sign-up and a participant who
turned reminders off, and swedish-signup.spec.ts checks every state of
the edit, cancelled, unsubscribe and broken-edit-link pages in Swedish.

The edit page's JavaScript is 183 bytes smaller, so its budget comes
down from 113.6 to 113.5 kB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The participant pages word an error by its code, but `invalid_input` covers
too much for that: a missing email, one that isn't an address, a blank or
long name, long notes and a quantity out of range all share it, and the
pages fall back on the server's English. Errors from signing up and from
the edit link now name their case in `details.reason`, from a closed set
(`ErrorReason`) that also takes in Magic Compose's `refusal` and
`asked_again`.

`fromZodError` takes a table of reasons by field path and Zod issue code
(`COMMITMENT_INPUT_REASONS`, beside the commitment schemas), and the
service adds `email_required` itself. An issue the table doesn't name, and
every other error, carries no reason. The rest of each error is unchanged:
`message` and `suggestion` stay English for API callers, and `details` is
added last.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Brings in #914's address round (Swedish "Platser" label, sheet label-fit e2e, startup warning for E2E_UNSHIPPED_LOCALES, three sv.json fixes) so this PR stays on top of #914.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Brings in #914's address round (via #915): the Swedish "Platser" label, the sheet's label-fit e2e, a startup warning for E2E_UNSHIPPED_LOCALES and three sv.json fixes, so this PR stays on top of #915.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
#914 changed participant.fields.spots in sv.json from "Antal platser" to "Platser" so it fits the sign-up sheet. The edit form shares that key, so its unit test now looks for "Platser" and the Swedish e2e reads the label from the catalog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Brings in #914's address round (via #915 and #916) and #916's test fix for the Swedish "Platser" label, so this PR stays on top of #916.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The sign-up sheet and the edit page now pick their text for an error by
its code and, for invalid_input, its details.reason, and never show the
server's message or suggestion, which stay English for API callers.

- input-message.ts (replacing name-message.ts) words each reason: a
  missing or bad email, a blank or long name, long notes, a number of
  spots out of range; an unknown reason, or none, gets the code's line.
- participantErrorCopy always answers: on the edit page it now words
  the rate limit, and a conflict or forbidden (a no-show, a link that no
  longer opens the sign-up); anything else says the sign-up, save or
  cancel didn't happen. It takes 'join', 'save' or 'cancel'.
- The client's own fallbacks ('save failed', 'cancel failed',
  'something went wrong', 'network error') are catalog messages too.
  The sheet tells a dropped connection from an answer that isn't the
  API's JSON, which both used to say "network error".
- English and Swedish for every new message; the edit form's
  saveUnreadable moves to participant.errors.failed, English unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…_whole's doc

The merge brought in "Platser" for the Swedish Spots label, so the new
rate-limit step in swedish-signup.spec.ts reads the label from the
catalog, as the step before it now does. quantity_not_whole also covers a
quantity that isn't a number at all, which its doc comment and the
CHANGELOG now say.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
docs/translating.md conflicted: #931 (through #977) turned the glossary's
open questions into a "Settled" list, and this branch had added a
question about the Build tab's drag refusals to the old list. Kept
#931's settled list and moved this branch's question, unchanged, under
"Open questions".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
docs/translating.md conflicted: #931 (through #981) turned the glossary's
open questions into a "Settled" list with an "Open questions" section
after it, and this branch had added two questions from #982's review to
the old list. Kept #931's settled list and added this branch's two
questions under "Open questions", beside #981's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
src/app/login/page.tsx conflicted in its imports: main (through #961)
added ipSubject to the rate-limit import, for the per-IP login code limit,
and this branch added the signInLocale and getServerTranslator imports
beside the same line. Kept both. The body merged on its own: the code
limit keys on ipSubject(...) as on main, and the page's text comes from
the catalog as on this branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
scripts/lib/email-samples.ts (the pnpm email:dev and test samples)
conflicted with #931 in two places, both kept:
- imports: this branch's formatDuration, and #931's formatSlotTime beside
  formatSlotDate;
- this branch's signIn(locale) sample, then #931's nineAm for the English
  confirmation's time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Base automatically changed from claude/issue-949-sign-in-email to main November 16, 2026 05:48
@richshaw richshaw added the pipeline:working A session is working on it right now label Nov 16, 2026 — with Claude

Copy link
Copy Markdown
Owner Author

Approved by the owner at 6c0f28c.

The owner approved merging the localization stack (#897 up to #999) in the orchestrating session on 16 November 2026: "Stop before launch: merge everything up to and including the simplification", with #999 added after it.

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


Generated by Claude Code

@richshaw richshaw added pipeline:merge and removed pipeline:owner Passed; waits for the owner (UX or high-risk) labels Nov 16, 2026 — with Claude
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt

Copy link
Copy Markdown
Owner Author

catch-up after #965: merges only, own diff unchanged (changed lines identical; the hash moved only with context), markers on 7c8af9f stand

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


Generated by Claude Code

@richshaw
richshaw merged commit fb7d2b5 into main Nov 16, 2026
5 checks passed
@richshaw
richshaw deleted the claude/issue-950-consent-text branch November 16, 2026 05:53
@richshaw richshaw removed pipeline:merge pipeline:ux Changes what a person using OpenSignup sees or does pipeline:working A session is working on it right now labels Nov 16, 2026 — with Claude
richshaw pushed a commit that referenced this pull request Nov 16, 2026
richshaw pushed a commit that referenced this pull request Nov 16, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The OAuth consent screen is English-only

3 participants