Skip to content

Word organizer refusals through one helper - #998

Merged
richshaw merged 319 commits into
mainfrom
claude/issue-619-one-refusal-helper
Nov 16, 2026
Merged

richshaw merged 319 commits into
mainfrom
claude/issue-619-one-refusal-helper

Conversation

@richshaw

@richshaw richshaw commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Part of #619: the second simplification after the join, one helper for wording an organizer's refusal (its server half).

Merge after #997.

The stack

Phase 2 of the localization stack (#619): the second of the two simplifications, after the join fixes. Based on #997 (claude/issue-619-one-locale-rule); review against that branch.

Summary

Every organizer screen rendered on the server now words a refusal through one chain, refusalText(t, error, own?), and passes only the lines that are its own. Before, Publish, Close and Reopen, Remove and Connected apps each wrote their own fallback chain, and each had to remember that a viewer's forbidden gets the line every screen gives. Getting that special case wrong is how a viewer's Publish came to be refused in English after the join (fixed in #996). Now no screen can get it wrong: forbidden reads the same everywhere, and a screen can't even pass a line for it (the type has no such key). Nothing anyone sees changes (evidence below).

What changed

  • refusalText(t, error, own?) (src/lib/organizer-errors.ts). A viewer's forbidden always gets the line for its code. Any other refusal gets the first of:

    1. the screen's line for the details.reason;
    2. the line every screen gives that reason (title_too_short);
    3. the screen's line for the code;
    4. the screen's other;
    5. the line for the code.

    Its two-argument calls (New signup) are unchanged. A reason that isn't one of the screen's own keys (toString and the like) is ignored.

  • refusalFromQuery(t, error, own?) takes the same lines and goes through refusalText. Anything in ?error= that isn't a code still shows nothing.

  • statusRefusal and removeRefusal keep their names and signatures. Each body is now just the screen's lines passed to refusalText. They stay functions because their caller is a 'use server' file, which can't export them for tests, and tests/e2e/responses.spec.ts imports removeRefusal.

  • disconnectRefusal is deleted, with its test. Connected apps now calls refusalFromQuery(errors, error, { internal: errors('disconnectFailed') }). Its test cases moved to organizer-errors.test.ts.

  • organizer-errors.ts says it's server-only in its header: it imports errors.ts, which imports zod.

  • Tests. organizer-errors.test.ts gains the rule:

    • each step beats the next;
    • a viewer gets the shared line whatever lines a screen passes, and a forbidden line doesn't compile (@ts-expect-error);
    • prototype keys are ignored as reasons;
    • a type-level check that no ErrorReason shares a name with an ErrorCode or other.

    Word every organizer refusal from the catalog, and check both halves launch together #996's stand-in test, which checks that every organizer refusal comes from the catalog, already covered every screen. Here it only points its Connected apps row at the page's new call.

  • CLAUDE.md (the errors.ts entry): the server-rendered organizer screens go through refusalText/refusalFromQuery, each passing only its own lines, and a viewer's forbidden reads the same on all of them.

No catalog changes (en.json, sv.json and en.d.json.ts are untouched), no client code, and no CHANGELOG entry, since nothing visible changes.

Helpers, before and after

Helper Runs Before After
refusalText server title_too_short, else the code's line The one chain, with the screen's own lines
refusalFromQuery server the code's line, or null Unchanged, but goes through refusalText with the screen's own lines
statusRefusal server its own chain: code first, then reason, then its general line The header's lines passed to refusalText
removeRefusal server its own chain by code The Responses tab's lines passed to refusalText
disconnectRefusal server its own chain over refusalFromQuery Deleted: one call on Connected apps
saveErrorMessage (Build tab) client Unchanged (see below)
explainDraftFailure (Magic Compose) client Unchanged
participantErrorCopy client Unchanged
codeRefusal (sign-in) server Unchanged

Nine helpers become eight. On the server, five separate fallback chains become one.

How I showed English is identical

  • Every refusal, old against new. A throwaway test (not committed) rendered each server screen at 3e2b590 and at this head, through the real English and Swedish catalogs:

    • the screens: New signup, Publish, Close, Reopen and Remove, plus the ?error= lines on account Settings, a signup's Settings tab and Connected apps;
    • for each code: no details, no reason, each of the 23 reasons, and six values that aren't reasons;
    • for the ?error= pages: every code, and 12 values that aren't codes.

    That's 1,594 lines per language. Identical:

    • every code without a reason, on every screen;
    • every ?error= value, on every page;
    • every reason with the code it comes with (ErrorReason's doc ties each to one code), on New signup, Remove and the ?error= pages;
    • on Publish, Close and Reopen, every refusal those three can receive: forbidden, not_found, and conflict with status_changed or no_slots.

    71 lines per language differ, and no service can send any of them:

    • 3: Publish, Close or Reopen given title_too_short. They now give the title line every screen gives, where before they said "Couldn't publish. Try again." Those actions send no title, and publishSignup, closeSignup, reopenSignup and getSignupForOrganizer never return it.
    • 65: a reason with a code it never comes with, such as not_found carrying status_changed. Publish, Close and Reopen used to look at the code first; now the reason comes first. This also covers New signup's forbidden with title_too_short, which now gets the viewer's line.
    • 3: other given as a reason, which isn't an ErrorReason.
  • Existing tests, unedited. These still pass without a single edit:

    • status-refusal.test.ts: every English line of Publish, Close and Reopen, a viewer's included;
    • remove-refusal.test.ts: all of Remove's;
    • the reasons table in organizer-reasons.test.ts: every reason's English on every screen.
  • Client JavaScript. I built 3e2b590 and this head in the same folder. Every file under .next/static is byte-identical: only the build id's folder name differs. The budgets table is identical line for line.

Size

9 files, +123 / −115, net +8:

Part Files Added Removed Net
Code 5 +72 −72 0
Tests 3 +50 −42 +8
Docs 1 +1 −1 0

Without comments and blank lines, the code goes from 181 lines to 172. The comments grow by the same 9, because the rule is written out once in refusalText's doc comment. statusRefusal halves (29 lines of code to 17), and disconnect-refusal.ts is gone.

Left out, and why

  • The client half. Two helpers stay as they are: the Build tab's saveErrorMessage and Magic Compose's explainDraftFailure. Routing them through a shared function was measured at +193 B and +149 B gzipped, on pages with 133 B and 41 B of budget left. A client helper can't import isErrorCode, since errors.ts brings zod, so the shared function needs its own copy of the codes. Both already follow reason, then code, then a general line, and both are covered by the reasons table and the stand-in test.
  • participantErrorCopy and codeRefusal. The first words participant copy (participant.errors, with its own shape and inputs) and stays separate on purpose. The second returns a reason for the sign-in form, not words.
  • A screen's own line for forbidden. A screen could have been allowed one, with the shared line only as a default. I made the shared line a rule instead: the check comes first, and the lines' type has no forbidden key. No screen used one.
  • Renaming edit-form.tsx's local refusalText. That's a client file, and this PR changes no client code.

Checks

On 3539282:

  • pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test: pass (239 files, 3,405 passed, 1 expected fail).
  • pnpm test:db: pass (47 files, 854 tests).
  • pnpm build && pnpm budgets: pass, and the table matches 3e2b590's line for line. No budget changes.
  • e2e on a production build (chromium): organizer-language.spec.ts and organizer-language-story.spec.ts, 31 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt

Brings in #918's two address commits (via #919, #920 and #921), so this PR stays on top of #921.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Brings in #918's two address commits (via #919, #920, #921 and #925), so this PR stays on top of #925.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The system prompt gains a LANGUAGE rule: the title, description, field
labels, choices, slot text and whatOptions are written in the language the
description is written in, unless it asks for another, with names, places
and titles kept exactly as written and refs kept to a-z and 0-9. The
"in the prompt's language" on the whatOptions lines folds into it.

A description too short or too mixed to tell is drafted in {{LANGUAGE}},
which the route fills with the organizer's language for participants
(getOrganizerLocale), named in English. buildMessages and the follow-up
builders take it in a required PromptContext, so a caller that leaves it
out fails the type check; every call the route makes, retries included,
passes it. languageName can now name a language in another one.

The golden prompt is pinned with English as the fallback. Four new eval
cases (ev_042 to ev_045) and two checks, language_must_be and
draft_must_contain_exactly, score the rule; a case can give the
organizer's language, and eval:mcp skips such a case. The evals have not
been run. The privacy page says the language's name goes to the AI
provider with the description.

Part of #635.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The draft now reports its language as a code. The route starts the new
signup in it when it has shipped to participants (localeSource: content),
else in the organizer's language as before, and in none while only English
has shipped. The model's value is read leniently, cut to a bare two- or
three-letter code, stripped before persistDraft and the response, and only
compared with SHIPPED. When it hasn't shipped, signup.created records it as
draftLanguage. The privacy page and docs/telemetry.md say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
With TRANSLATION_SCREENSHOTS=1, which the new `pnpm translation:screenshots`
sets, the Swedish e2e spec saves a screenshot of each participant screen and
state it checks, at desktop width and (in a Chromium phone project the flag
adds) at 390 pixels, and the email tests write each sample email's HTML and
plain text, in English and Swedish. Everything goes to the gitignored
translation-review/. Without the flag nothing is written, so CI is unchanged.

So the screenshots cover every participant screen, the Swedish spec now also
opens the sign-up sheet on a dated and an undated slot, walks every refusal
the sheet words (answers stood in for), signs up without an email, shows a
returning participant their spot, and visits a draft, an archived and a
closed Swedish signup, the closed one's edit page and a spot cancelled
before it closed. The seed gains the closed and archived signups.

The Swedish email samples take their dates from formatSlotDate, so they
print "lör 5 sep." as the app does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
docs/translating.md explains how the catalogs work, how to write ICU
plurals, selects and tags (with examples from the catalogs), what the
catalog check catches and what it misses, how CATALOG_LOCALES and SHIPPED
decide when a language can be offered, how to add a language, and how
translations are made and reviewed by machine. It ends with the Swedish
glossary the stack used, and the open questions for #639, including where
the Swedish disagrees with itself.

The translate skill follows #637's four steps: list missing and stale
messages (scripts/to-translate.mjs), translate, run the checks, have a
different model review the result from the screenshots and email HTML
(references/review.md), then fix and list every finding in the PR.

CLAUDE.md and CONTRIBUTING.md say to change English only in en.json and run
the skill for each shipped language in the same PR, and CLAUDE.md's test
layout notes E2E_UNSHIPPED_LOCALES for a reused pnpm dev.

Part of #637.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The reader kept the letters before the first - or _ of any text, so an
English draft reporting "eng" was recorded as an unshipped language, "swe"
wouldn't start a Swedish signup once Swedish ships, and a sentence starting
"sv-SE," or a title like "Tea-party helpers" reached the activity log.

Now the whole value must be a well-formed language tag (Intl.Locale), and
its language is kept only when it's two or three letters that CLDR names as
a language (Intl.DisplayNames with fallback 'none'), and isn't one of ISO
639's codes for no single language (und, mis, mul, zxx). Intl.Locale gives
the canonical code, so eng, swe and deu read as en, sv and de; zzz, the,
Swedish, x-klingon, 12 and sentences read as none.

createSignup also checks draftLanguage's shape (two or three letters a-z)
at the write, and leaves anything else out of signup.created, so a later
caller can't put other text in the log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Brings in #928's address round (the reported-language reader, the shape check at createSignup's write, and the draftLanguage wording in docs/telemetry.md and the CHANGELOG), so this PR stays on top of #928.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Each language now records the English each of its messages was translated
from, in src/i18n/translated-from/<language>.json, outside src/messages/
because next-intl reads every JSON file there as a language. The catalog
check compares it with en.json: a message whose English changed since
(stale), or one the record lacks, fails a language shipped to an audience
that reads it, as a missing message does, and is a warning otherwise. An
entry for a message English or the translation no longer has fails in
every language.

The translate skill's to-translate.mjs lists stale messages from the
record, with the English they were translated from, instead of comparing
with a git base, and mark-translated.mjs writes the record for messages a
translator has just translated or checked. The record for sv.json is
generated from today's en.json; none of its messages had English that
changed after the Swedish was written.

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
The translate skill's reviewer prompt said an email's subject is the first
line of the `.txt` that `TRANSLATION_SCREENSHOTS=1` writes. That line is the
"OpenSignup" header: the subject was only in the HTML's hidden preview.

- Each sample in scripts/lib/email-samples.ts now carries its subject,
  made with the same function from src/email/subjects.ts that the email's
  `send*` function uses, and the email test writes it as a `Subject:` line
  at the top of each `.txt`.
- An English `reminder-changed` sample, so the reviewer has the English to
  set beside `reminder-changed-sv`.
- The reviewer prompt says where the subject is, which English email goes
  with which, that the sign-in email has no translation on purpose, and
  names the messages that show only in a tab title, a link preview, a
  screen reader's name or a file or share sheet.
- The guide's "Adding a language" says typecheck points at the per-language
  test tables, and that `emails.test.tsx`'s list is Swedish only; three more
  open questions for #639 from the tophat; the skill says a separate review
  session has to get set up and make the screenshots first.

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
The first full pass over sv.json (#639): every note collected from the
stack's tophats and reviews is decided, and the glossary's open questions
are settled.

- "din anmälan" for the participant's own sign-up everywhere, so an email
  no longer shows "Visa eller ändra din plats" under an organizer's
  "Plats:" field; "plats" stays for a number of spots.
- No sentence ends on a slot's name, so a Swedish date like "tors 3 okt."
  no longer gives a double full stop (the signed-up bar, the sheet's
  saved line, the share text).
- "pass" left out where a sentence can do without it; the change emails
  say "Tiden har ändrats".
- Closed: "Anmälan är stängd" on the signup page, "Stängt för nya
  anmälningar" on the edit page, "Stängt" on a row.
- "(utan {label})", "Klart", "Välj"/"du valde", "Lägg till i kalendern",
  "Integritetspolicy", "Antal platser" in emails, "Använd knappen ovan",
  "Dela inte mejlet med någon", shorter unsubscribe buttons, and the
  unsubscribe page's sentences reworded.

English is unchanged, so the translated-from record is unchanged. Tests
that typed the old Swedish now type the new; the label-fit spec also
measures the closed Swedish signup with a remembered sign-up, so Stängt
and Ändra are covered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
docs/translating.md conflicted only in the glossary's open questions: the
two #929 added (the edit page's "Du är anmäld som", the draft page's
"listan") are settled here with the rest, so the settled list takes their
place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The closed Swedish signup has no sign-up sheet, so the test isn't
declared for it rather than declared and skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
From the in-context review of #931 (Fable):
- the invalid unsubscribe link says "Öppna länken", not "den", which read
  as the list;
- "högst", not the calque "upp till", for the edit page's spots line;
- "pass" left out of four more messages that can do without it;
- "dela inte länken med någon" for "keep it private";
- "Försök en gång till." after "igen";
- "För många försök på kort tid.", since "just nu" means "right now".
The glossary records each, keeps "Cookies" on purpose, and notes the
aria-label a noun-less "Stäng av dem" would want.

Tooling notes from #929's and #930's reviews:
- the catalog test's warning names the audiences, not shipping in general;
- to-translate.mjs leaves a space after "recorded:";
- the guide says a rename must name the new key to mark-translated.mjs;
- review.md puts the email's preview text just before <body>;
- the English confirmation sample prints 9:00 AM, as the app does.

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

Two flash questions for #639, each shown right after the save that prompts
it, from what's stored, so nothing records that it was asked:

- The Settings tab, after "Signup language" saves a language that isn't the
  organizer's: "Make Svenska your language for new signups?" Yes saves it
  with updateOrganizerLocale.
- Account Settings, after "Language for new signups" saves, when any of the
  organizer's open signups is in another language: "Use Svenska for your open
  signups too?" Yes puts them in it with the new setOpenSignupsLocale.

setOpenSignupsLocale takes the organizer's own open signups in workspaces
they can edit, locked through locks.ts, changes them in one update and writes
each the signup.updated row a Settings-tab save writes, through the new
recordActivities. Both questions render only once a second language has
shipped to participants, so neither is reachable yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The English says "No one new can sign up for this slot now." The
Swedish had lost "for this slot", so under the slot's name it read as
if the whole list had closed, and the line after it ("Ladda om sidan
...") seemed to contradict it. From the second independent review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
On a phone the question could open under the Share bar or below the screen,
where only "Saved" showed. Yes now takes the focus as the question appears
(autoFocus, no script), so the browser scrolls it into view above the bar,
with room for the box's edge. A fragment on the save's address can't do it:
Next drops it from a server action's redirect.

No now comes back to the form that asked, which the router focuses, rather
than to the top of the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
With Yes focused, a second Enter or Space after Save, a held key, or on a
short phone a double tap on Save, pressed Yes, which on account Settings
switches every open signup. No now comes first and takes the focus, as Close
signup's "Not yet" does, so those land on No. No is a button in a plain GET
form back to the language choices, since only a form control takes autoFocus;
it saves nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The owner decided a Magic Compose signup takes the organizer's
language, like any other new signup, rather than the language the AI
reports for its description. #928 is closed without merging; this
restores every file it changed to #927's version, so this branch can
sit on #927's directly. #927's prompt rule, which writes the draft's
own text in the description's language, stays.

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
Three tophat rounds found a new way for a question that appears after a save
to go wrong on a phone: out of sight, an accidental Yes, and finally Delete
signup under the finger. At the owner's decision both questions go.

The Settings tab's "Signup language" is back to a plain save and "Saved".
Account Settings gets a plain button under "Language for new signups",
"Switch your 3 open signups to Svenska", shown while some of the organizer's
open signups are in another language. It calls setOpenSignupsLocale with the
organizer's language, worked out on the server, so the form sends nothing a
forged one could change, and the page then says "Saved. 3 signups now use
Svenska." in its place. A second press finds nothing to switch and stays put.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
SavedNotice lays its icon and text out as flex items, so a sentence passed as
children, with the language's name in its own span, came apart with gaps
around the name. The text is now one item.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The organizer's language was worked out on every visit: their saved one,
else the instance's DEFAULT_LOCALE, else the top language their browser
asked for, else English. Now it's stored once, when Auth.js creates the
account: the top Accept-Language language of the callback request (the
magic link, the six-digit code or a sign-in provider), if it has shipped
to participants, else nothing. Nothing reads the browser again: new
signups, Magic Compose's fallback language and account Settings take the
stored language, else DEFAULT_LOCALE, else English.

- chooseOrganizerLocale, getOrganizerLocale and newSignupLocale lose the
  Accept-Language input, and `browser` leaves OrganizerLocaleSource and
  signup.created's localeSource.
- newOrganizerLocale (pure, beside the header parser it moved under) picks
  a new account's language; nothing while only one language has shipped.
- The adapter reads the header like the IP (request-context.ts), stores
  it on the new organizer and records it on workspace.created.
- Privacy page, telemetry doc, CHANGELOG, README, .env.example, CLAUDE.md
  and the AI-assistant and translating guides say what now happens.

While only English has shipped, nothing is stored, so nothing changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
?switched=9999 made account Settings say 9999 signups had changed, even to an
organizer with no open signups. The action now comes back with a fixed flag,
switched=1, and the page counts the organizer's open signups from the read it
already makes: "Saved. Your 4 open signups now use Svenska.", shown only once
none is left in another language and only when there is at least one.
openSignupsToSwitch says how many open signups there are as well as which to
switch, from the same statement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Conflicts:
- src/app/app/(chrome)/settings/page.tsx: kept #933's counts
  ({ open, toSwitch }, switched=1 as a flag) and this branch's removal of
  the browser step (no headers(), getOrganizerLocale(session, audience)).
- CHANGELOG.md: kept both: this branch's #627 lines and #933's reworded
  #639 line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The owner decided the open question on #936: at account creation, if the
instance sets DEFAULT_LOCALE, nothing is stored and the account follows
it. Otherwise the browser's top language is stored only if it has shipped
to participants and isn't English, the fallback anyway; in every other
case nothing is stored. So a stored language is always one the account
wouldn't otherwise get, and an operator who sets or changes the default
later moves every account with none.

- newOrganizerLocale takes the instance default; the adapter passes
  instanceDefaultLocale(). The "one language shipped" guard goes: with
  English never stored, nothing can be stored then anyway.
- docs/translating.md gains "An organizer's language", a table of every
  site default and browser, linked from the README. A test helper reads
  that table from the doc, and the unit and adapter db tests run every
  row, so the doc and the code can't drift apart.
- Tests for an existing account (kept through later sign-ins under every
  default and browser) and for a stored language that leaves SHIPPED.
- Privacy page, CHANGELOG, README, .env.example, CLAUDE.md, telemetry and
  AI-assistant docs say the new rule; "account's" takes a curly
  apostrophe.

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
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
docs/translating.md conflicted with #931 in two places, both kept:
- Style: this branch's "A channel takes via" bullet, then #931's new
  bullets on buttons, emails and leaving out pass.
- #931's "Settled" list replaces the old open questions; this branch's
  addition to the old item on "listan" (the organizer help's "listans"
  and the "Ny lista" button) is carried into settled item 10.

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 #976) replaced the
glossary's old open questions with a "Settled" list and an "Open
questions" section. This branch had added a question 10 ("Too many
sign-in requests") to the old list and #980 to its closing line. Kept
#931's list and moved this branch's question, word for word, 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 and the translate skill's references/review.md
conflicted where the earlier catch-ups placed #931's settled list and the
open questions. This branch already carries #931's text with the joined
stack's updates (the numbered open questions, the organizer's short
forms, the sign-in email's line in review.md), so every conflicting hunk
takes this branch's side; outside them both files are this branch's
already.

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
@richshaw richshaw added the pipeline:working A session is working on it right now label Nov 16, 2026 — with Claude
Base automatically changed from claude/issue-619-one-locale-rule to main November 16, 2026 06:30

Copy link
Copy Markdown
Owner Author

catch-up after #997: merges only, own diff unchanged, markers on 3539282 stand

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


Generated by Claude Code

@richshaw
richshaw merged commit e2de41c into main Nov 16, 2026
5 checks passed
@richshaw
richshaw deleted the claude/issue-619-one-refusal-helper branch November 16, 2026 06:36
@richshaw richshaw removed pipeline:merge 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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
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.

3 participants