Skip to content

Add a button that switches an organizer's open signups to their language - #933

Merged
richshaw merged 164 commits into
mainfrom
claude/issue-639-post-save-prompts
Nov 16, 2026
Merged

richshaw merged 164 commits into
mainfrom
claude/issue-639-post-save-prompts

Conversation

@richshaw

@richshaw richshaw commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Part of #639: switching an organizer's open signups to their language, as a plain button in account Settings. It replaces the issue's two after-save questions, at the owner's decision. The full Swedish translation (its own PR) and the launch (sv in SHIPPED.participant, help, README) are other parts.

Merge after #930.

The stack

PR 39 of the localization stack (#619). Based on #930 (claude/issue-637-stale-check); review against that branch. It doesn't touch src/messages/ or the translated-from record.

The problem

Once a second language ships, an organizer can change their own "Language for new signups" (account Settings, #904), but their signups that are already open keep the language they started in. To move them, the organizer has to open each signup's Settings tab and change "Signup language" (#899), one by one.

The fix

  • A button in account Settings (settings/page.tsx), under "Language for new signups": "Switch your 3 open signups to Svenska" ("signup" for one).
    • The language is the organizer's for new signups, the one the choice above it shows (getOrganizerLocale, as the page calls it today).
    • The button shows only while a second language has shipped to participants and some of the organizer's open signups are in another language (openSignupsToSwitch).
    • It's a plain form and a plain button, like the language's own Save, so the page still loads no script of its own.
  • Pressing it (switchOpenSignupsLocaleAction) calls setOpenSignupsLocale and comes back with ?switched=1, a flag. In the button's place the page then says how many of the organizer's open signups use the language, counted from what's stored: "Saved. Your 4 open signups now use Svenska." ("Your 1 open signup now uses" for one). It's in SavedNotice's style; SavedNotice now takes a longer line as children.
    • Nothing appears after the language's own Save, nothing scrolls, and nothing takes the focus.
  • setOpenSignupsLocale(db, actor, locale) in src/services/signups.ts returns { locale, signupIds }. openSignupsToSwitch(db, actor, locale) returns { open, toSwitch } from one statement: how many open signups the organizer has, for the confirmation, and the ids setOpenSignupsLocale would change, which the button counts.
    • The guard: requireOrganizerId, then requireWorkspaceWrite on each of the actor's workspaces to keep only those they can change. src/lib/policy.ts is untouched.
    • The rows: two new functions in src/services/locks.ts, readOrganizersSignups and lockOrganizersSignupsForWrite. They hold the deleted_at check and take for no key update in id order, like lockSignupForWrite. Postgres checks a row it waited for against the whole condition again, so a signup deleted or closed meanwhile is left out (tested for a delete).
    • Which signups change is decided by signupLocale, the rule the pages use.
    • The write: one lock statement, one update … set settings = settings || {locale} for all of them, and one insert of their signup.updated rows, all in one transaction. The rows are { changed: ['settings'] }, byte-for-byte the row a Settings-tab save writes (tested).
  • recordActivities(db, rows) in src/lib/activity.ts: recordActivity for many rows. It sends one insert (batches of 1,000, under Postgres's bind-parameter limit) and one last_active_at update per organizer. recordActivity now calls it with one row and sends the same two statements as before; pnpm test:db, query budgets included, passes.
  • CHANGELOG, under Added. No privacy-page change: a signup's language is among "the signups, slots, and settings you create", and the activity-log paragraph already covers editing signups.

Why not the questions #639 described

#639 asked for two questions, each shown right after the save that prompted it: "Make Svenska your language for new signups?" on a signup's Settings tab, and "Use Svenska for your open signups too?" in account Settings. Earlier rounds of this PR built them. Each tophat round then found a new way for a question that appears after a save to go wrong on a phone:

  • Round 1 and the review: the question opened under the Share bar or below the fold, where only "Saved" showed.
  • Round 2: bringing it into view by focusing Yes meant a second Enter, a held key or a double tap on Save pressed Yes, which in account Settings switched every open signup.
  • Round 3: focusing No instead scrolled the Settings tab so that Delete signup landed under the finger, and three taps on Save deleted the signup.

So the owner dropped both questions on 14 November 2026 for this button, which shows only when there's something to switch and moves nothing. The Settings tab is back to #930's version: "Signup language" saves and says "Saved". An organizer who changes one signup's language there isn't asked about their own; "Language for new signups" is one link away in account Settings.

Decisions

  • "Your open signups" is the narrowest reading of the words:
    • Status open only. The app calls a signup that's taking sign-ups "open", "published" and "live" #638 (Say "open" for a signup people can sign up on, not "live" #888) defines "open" as "people can sign up now". Drafts aren't open, and closed and archived signups aren't either. A draft's language is one Settings-tab save away.
    • The organizer's own signups (organizer_id), never another member's in a shared workspace: those are "theirs", not "yours".
    • Workspaces they can write to (requireWorkspaceWrite): not one where they're a viewer, and not one they've left.
    • A language set on purpose is switched too. The row can't tell a choice from a default: once a second language ships, New signups don't start in their organizer's language #627 stores the organizer's language on every new signup, so skipping signups with a stored language would skip nearly all of them. The button counts all of them, so the organizer sees how many will change before pressing it.
    • A signup already in the language, read by signupLocale, is left alone and not counted. That includes one with no language of its own that reads as Svenska through the instance's DEFAULT_LOCALE.
  • The form sends nothing. The action works out the language as the page does, and setOpenSignupsLocale takes only the signed-in organizer's own signups. So a forged form can't name another language or anyone else's signups (tested with locale, organizerId and signup ids in the form).
  • A double tap does what one tap does. The first press switches the signups and comes back with the flag, and the button is gone. A press that finds nothing left to switch (the second tap of a double tap, which waits for the first) changes nothing and doesn't redirect, so the first press's answer stays on the page.
  • The confirmation's count comes from what's stored; the address carries only a flag. The action comes back with ?switched=1, as the language's own Save comes back with ?saved=language. The page counts the organizer's open signups from the read it makes anyway. It shows the line only for that flag, only once none is left in another language, and only when there's at least one open signup. So a link can make the page say no more than "Saved." over a count that's true of what's stored, and nothing at all to an organizer with no open signups. (Round 4 took the number from the address; the round-2 review found that ?switched=9999 then said 9999 signups had changed.)
  • One read on each visit to account Settings, once a second language ships, to know whether to show the button and its count. None while one language has shipped. Account Settings is a page organizers rarely open, and the read is one bounded statement.
  • English in the page, not the catalog. Add a Signup language control to the Settings tab, hidden while one language ships #899 and Let an organizer save a language for new signups, hidden until a second language ships #904 wrote their Settings forms' text inline (organizer pages move to the catalogs in Epic: OpenSignup in Swedish, and other languages after it #619's organizer phase), so this follows.

Where #639 is out of date

Follow-ups, not in this PR

  • The Settings tab's ?error= shows whatever text the address carries (FormError renders it as is), so a link can put its own words on that tab. That's on main too. Let an organizer save a language for new signups, hidden until a second language ships #904 avoided it on account Settings by sending only codes; moving the tab to codes would close it.
  • In one probe script (which scrolls with window.scrollBy before Save), a Settings-tab Save went back to the top of the tab, on the base too. The round-2 tophat's runs kept their place. This PR no longer touches the tab.

Tests

  • src/services/open-signups-locale.db.test.ts:
    • It changes the organizer's open signups (none, en) and keeps their other settings, and each gets the same signup.updated row a Settings-tab save writes.
    • It leaves a draft, a closed, an archived and a deleted signup, another member's signup, and the organizer's own signups in a viewer-role workspace and in a workspace they've left.
    • It changes another member's signups only for that member.
    • With DEFAULT_LOCALE=sv, signups with no language or with xx count as Swedish already, and a second run changes nothing and writes nothing.
    • Unshipped and junk languages are invalid_input and change nothing; anonymous and participant actors are refused; a viewer-only organizer gets an empty result.
    • It waits behind a signup lock held by another transaction, and leaves that signup out once the other transaction has deleted it.
    • openSignupsToSwitch counts the organizer's open signups that the change would take (1 where only one of Pat's open signups is theirs to change, 4 with DEFAULT_LOCALE=sv, 0 for a viewer-only organizer) beside the ids it would switch.
  • src/lib/activity.db.test.ts: recordActivities writes 1,001 rows (across a batch boundary) and advances last_active_at; no rows write nothing.
  • settings/actions.db.test.ts, switchOpenSignupsLocaleAction:
    • It switches the organizer's two open signups (one en, one with none) to their language and comes back with ?switched=1. It leaves their draft, their closed signup and another member's open signup, revalidates the changed signups and Settings, and writes two signup.updated rows.
    • A second press changes nothing and stays put.
    • A form naming Swedish, another organizer and other signup ids still switches only the organizer's own open signup, to their own language (English).
    • A signed-out press is refused with ?error=unauthorized.
  • settings/page.test.tsx:
    • No button and no read while one language has shipped.
    • The button reads "Switch your 3 open signups to Svenska" (lang="sv" on the name) and "1 open signup" for one, with the read asked about the organizer's language. Its form has no fields, and nothing takes the focus.
    • No button when nothing is in another language; the language's own Save still says only "Saved".
    • "Saved. Your 4 open signups now use Svenska." and "Saved. Your 1 open signup now uses Svenska." show for switched=1 with the count from the read, only once none is left, with the button there instead while some are.
    • An organizer with no open signups gets nothing for switched=1.
    • A forged number (switched=9999, 3, 0) shows nothing, and nor do -1, abc, true, 1e3, a sentence or an empty value.
  • I checked that the tests catch mistakes by breaking the code one change at a time:
    • In the service: dropping each filter in the lock query (organizer, status, deleted_at), the write-access filter and the signupLocale comparison.
    • On the page: showing the button with nothing to switch, showing the confirmation with no open signups, and taking any switched value as the flag.
    • Each made a test fail.
  • In the running app on 6062c1e (round 4: production build, Swedish added to SHIPPED.participant locally, never committed), with the database checked after each run. Round 5 changed only where the confirmation's number comes from and its wording; the tophat checks it next.
    • Account Settings at 390×844, 390×568 and 1280×900 showed "Switch your 2 open signups to Svenska", or "1 open signup" with one left.
    • These all ended the same way: one tap; two taps 150 or 400 ms apart; three taps 200 ms apart; two clicks 120 ms apart; Enter twice 100 ms apart; Enter five times 33 ms apart. Each time the address was ?switched=2, the page said "Saved. 2 signups now use Svenska.", the button was gone and exactly 2 signup.updated rows were written. The focus stayed on the page body, and nothing scrolled.
    • The Settings tab at 390×568: three taps 250 ms apart on the language Save gave a plain "Saved", with no question and no delete confirmation, and nothing was deleted.
    • There were no console errors.

Run and passed on this head (45fb6a1):

  • pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test (213 files, 2,988 tests)
  • pnpm test:db (44 files, 798 tests, query-budget.db.test.ts included)
  • pnpm build && pnpm budgets: every page under budget, and within 28 B of a build of Catch translations whose English changed since they were made #930's head (1ece68b): the Build tab +28 B and the signup tabs +18 B, from SavedNotice taking children; /app/settings +4 B. No budget changes.
  • e2e on the production build (container Chromium): organizer.spec.ts (Settings tab, account link, signed-out Settings), async-submit-button.spec.ts (Settings tab Save), login-code.spec.ts (lands on account Settings): 35 passed. No e2e spec can reach the button until a second language ships.

🤖 Generated with Claude Code

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt

claude and others added 30 commits November 13, 2026 22:31
Part of #620: the core. next-intl and use-intl 4.14.9, pinned together
(icu-minify too, through an override), with next.config.mjs wrapped in
next-intl's plugin. src/messages/en.json is the English catalog, and
next-intl's AppConfig is typed from it, through the declaration the
plugin writes, so a missing key or a wrong argument fails typecheck.

src/i18n holds the pure locale config (CATALOG_LOCALES, SHIPPED), a
synchronous translator on use-intl/core with English filled in under
any other language, the server wrapper that logs what goes wrong, the
request config the plugin needs, and an English translator for tests
that throws.

The site footer's labels are the first text in the catalog, so the
translator is proven in a server component, on static and dynamic
pages. A new check runs it under the worker's toolchain. No page's
first-load JavaScript changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
A local ESLint plugin in eslint.config.mjs, with one rule so far:
opensignup/no-catalogs-in-client. In a file that opens with a 'use client'
directive, it reports any import of a catalog in src/messages, or of the
translators that load every catalog (src/i18n/translator.ts, server.ts and
testing/translator.ts), since either would put that text in the browser's
JavaScript. It reads the directive rather than matching paths, follows
@/ and relative paths, re-exports, import(), require() and import paths
built from a template, and lets type-only imports through, since those are
compiled away. The message says why and what to do instead.

The tests lint fixtures through the repo's own config, so they also prove
the rule is on for the app's files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
A unit test over src/messages/ checks every catalog against en.json:
completeness per namespace, enforced for each language in SHIPPED for the
namespaces its audience reads; every message compiles with icu-minify;
placeholders, tags and select branches match English, and each placeholder
takes the value English is passed; no key English lacks; and no English
message the app doesn't use.

Which keys the app uses comes from the type checker: a call whose signature
is use-intl's Translator, its namespace from the keys it accepts, its key
from the type of its argument, so helpers, props, aliases and typed tables
are all seen, and a key or namespace it can't read fails the check.

The audience namespaces move from a comment to AUDIENCE_NAMESPACES in
src/i18n/config.ts. src/types/next-intl.d.ts imports next-intl, because an
augmentation alone doesn't load its module: without it, code with no test
importing next-intl typed every message key as a plain string.

icu-minify is a devDependency at exactly 4.14.9, the version next-intl and
use-intl resolve, and the pnpm override now points at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Two rules, on only for the files and folders listed in TRANSLATED in
eslint.config.mjs, which so far is the site footer:

- react/jsx-no-literals with noStrings and ignoreProps, for JSX text;
- opensignup/no-literal-text-props, a local rule for a string on
  aria-label, aria-description, title, placeholder, alt or label.
  noAttributeStrings would also flag every className and href.

TRANSLATED takes paths as they are on disk. filesAt escapes them for
the config's globs, since an unescaped src/app/s/[slug]/** matches
src/app/s/s/ and not the [slug] folder, and stops lint when a path
doesn't exist. The footer's license line is exempt with a comment.

Also, from #891's review: no-catalogs-in-client follows a + chain that
starts with a string, as it does a template, and denies every module in
src/i18n/ to client files except those in CLIENT_SAFE_I18N (config),
rather than listing the modules that load catalogs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
A translation that kept a select's argument but dropped the select
(`Status: {status}` for English's `{status, select, open {Open} ...}`)
passed, and would show participants the code's value. The check now
reports `{status} isn't a select here, but is in English`.

From the same review:
- The check's program types translators against the en.json it just
  loaded, written over src/messages/en.d.json.ts, so a stale declaration
  no longer gives misleading lines. findUsedKeys now builds the program
  itself, and the fallback for a stale declaration is gone, with its edge
  case that could pick the wrong section. messages-declaration.test.ts
  still fails on a stale file.
- Code in any `testing` folder and in src/mcp/evals doesn't count as a use.
- `t?.('key')` is seen.
- A test for the dot-in-key check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Turn on next-intl's experimental message precompiling, so the first
client component with translated text ships a small formatter instead of
use-intl's ICU parser: measured here at 3,470 bytes gzipped against
12,353 without it.

Under precompile the plugin's loader compiles every catalog the Next
build imports, the server's too, and a message with an argument, plural
or tag becomes an array. withEnglishUnder treated every object as a
section and went into those arrays, so each such message would have
rendered as its key path in the web process while vitest and the worker,
which read the raw JSON, stayed green. A message is now a string or an
array, and only a section is merged into.

The footer's "{INSTANCE_NAME} · AGPL-3.0" line becomes a message with an
argument, the first the app has, and a production-build e2e checks it on
a prerendered page, a page rendered per request and the public signup
page. A unit test runs next-intl's own loader over every catalog and
checks each message formats the same precompiled as from the raw JSON.

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

Brings in #892's review fixes (a7a10ed) so this PR stays on top of #892's final state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
formatSlotDate and formatSlotTime now take the reader's language as a
required `locale`, and so does everything that prints a slot's values:
renderFieldValue, slotDetails, summarizeSlotValues, formatGroupLabel,
buildMetaSegments, prettyHeader, and the two commitment services that name a
slot for the edit and cancelled pages. Every caller passes 'en' for now, so
nothing anyone sees changes.

A date is built from its parts as a UTC moment and formatted in UTC, so no
zone can move it to another day. English keeps today's output exactly,
including the hand-written 12-hour clock with its no-break space before
AM/PM; other languages get Intl's own ("lör 3 maj", "18:30" in Swedish).

formatSlotDate now formats only a stored YYYY-MM-DD. It used to fall back to
`new Date()` for any other string, in the host's zone; no caller relied on
that, as both checked isRealDate first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
filesAt escaped the characters a glob reads specially but not the
backslash it escapes them with, so a listed folder named `a\b` became
the glob `a\b/**`, which matches `ab/` and not `a\b/`. The backslash is
now escaped in the same pass as the rest.

filesAt takes an optional root so a test can list a real folder with a
backslash in its name, made in a temporary directory, and check the glob
with ESLint's own matcher.

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

Brings in #893's later commits (#892's final code, main, and the filesAt escaping fix) so this PR stays on top of #893.

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

Keeps this PR on top of #894's current branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
main now holds #893 (7a9fada), whose final code this branch already had. The only conflict was the footer line #893 exempted from lint and this PR turns into a message; this branch's version is kept.

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

Keeps this PR on top of #894's current branch, which now has main (#893) merged in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Every formatter that named a language now takes the reader's as `locale`,
and every caller passes 'en' for now, so English reads exactly as before:

- format-duration: `formatDuration` and `waitInMinutes` write each amount
  with Intl (number, unit and plural), so "1 minute" and "2 timmar" both
  come out right. `locale` defaults to English, since some callers are
  sign-in and OAuth code that gets a language with its own text.
- fit-text: Magic Compose's cut-off warning writes its limit with
  Intl.NumberFormat.
- connected apps: the approval, last-use and expiry dates go through
  `formatGrantDate`, which keeps English in the day-first order the page
  has always shown.
- Magic Compose: `formatOneDay`, `appendAnswers` and `timeLength` take a
  locale, and `MagicComposeRoot` passes one down to Compose (the character
  count), Questions, Drafting and DraftingFrom. English times keep "9am";
  other languages get Intl's short time, as slot times do.

The participant rate-limit message now writes its plural in its own
sentence from `waitMinutes`, as Magic Compose's hourly-limit message does,
so the plural moves into the catalog with the sentence and Intl's unit
code stays out of the participant pages, which had 5 bytes of budget left.

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

Keeps this PR on top of #895's current branch, which now has main (#893, #894) merged in.

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

Part of #625. A signup can now hold a language in settings.locale, and an
operator can set DEFAULT_LOCALE. Nothing reads either yet, so pages, emails
and the AI connector's tools are unchanged.

- settings.locale is a lenient string, so a stored language that has left
  the list still parses. createSignup and updateSignup refuse a language the
  caller sends unless it has shipped to participants; updateSignup checks
  only a sent one, as it does for groupByFieldRefs, because it merges the
  stored settings under the patch before parsing.
- resolveLocale and defaultFor in src/i18n/config.ts, pure, with isShipped.
- DEFAULT_LOCALE in src/lib/env.ts, an optional enum of the catalog
  languages.
- locale joins UNREAD_SETTINGS, so update_signup refuses it and get_signup
  hides it until something reads it.
- .env.example, fly.example.toml, the README and the CHANGELOG say what it
  does, that it changes nothing until a second language ships, and where a
  runtime variable goes on each platform.

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

The Settings tab gets a "Signup language" form, a plain form like "Ask for
an email address" with no script of its own. It renders only once a second
language has shipped to participants, so nothing shows yet. Each language is
named in itself (English, Svenska), through Intl.DisplayNames. Saving sends
only `locale` through updateSignup, which refuses a language that hasn't
shipped; a refusal shows the tab's usual error.

A signup with no language of its own shows the instance's, so
instanceDefaultLocale() comes in here with its first caller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
TIME_ZONE moves from src/i18n/config.ts to its own src/i18n/time-zone.ts.
Browser code reaches it through src/lib/slot-label.ts (the Build tab's
time picker and Magic Compose), which made config.ts part of the code
those two share. Webpack counts a module's unused code when it decides
whether shared code gets a chunk of its own, so the language rules this
branch added to config.ts tipped it into making one. That chunk's entry
in the webpack runtime added 29 to 47 bytes to every page and pushed
/s/[slug]/c/[id] over its 110 kB budget. With config.ts out of the
browser's graph, every page's JavaScript is byte-for-byte the size it
was on the base branch.

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

A settings.locale longer than 35 characters (or not a string), written
straight into the database, failed the whole settings parse: the signup
asked for an email the organizer had turned off, and every settings save
failed on a field nobody sent. The schema now reads such a value as no
language (.catch(undefined)), so a stored value can never break the row,
and an unrelated save drops it.

createSignup and updateSignup check the raw value the caller sends
instead of the parsed one, so a too-long, non-string or unknown language
is still refused with invalid_input on settings.locale (now with the
service's own message, where a too-long one used to get zod's).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: 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
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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Base automatically changed from claude/issue-637-stale-check to main November 16, 2026 02:54

Copy link
Copy Markdown
Owner Author

Fixed in #999, in reply to this comment. #999 should merge together with this PR.

  • Text: "1 of your signups is open and isn't in English yet." / "1 av dina anmälningslistor är öppen och är inte på svenska ännu."
  • Button: "Switch it to English" ("Switch them" for more) / "Byt den till svenska" ("Byt dem").
  • Small print: your wording, plus a last sentence for people already signed up: "Only OpenSignup's own words change: buttons, messages, dates and emails. Titles, slots and column names you typed stay as they are. People who already signed up see the new language too." The Swedish is "Bara det som OpenSignup själv skriver byts: …", after the translation review.
  • Confirmation: "Saved. 3 of your signups are open, and they're all in English now."
  • Style: the button has a brand-blue outline, and Delete signup's first button has a full red one.
  • Language name: lower case in a Swedish sentence (A language's name is capitalized inside a sentence #979).

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


Generated by Claude Code

@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 45fb6a1.

The owner approved merging the localization stack (#897 up to #998) in the orchestrating session on 16 November 2026: "Stop before launch: merge everything up to and including the simplification". The walkthrough notes above are fixed in #999, which lands before the launch.

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 #930 (and #931, which came in through main with no conflicts): merges only, own diff unchanged, markers stand

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


Generated by Claude Code

@richshaw
richshaw merged commit fbd0277 into main Nov 16, 2026
5 checks passed
@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
richshaw deleted the claude/issue-639-post-save-prompts branch November 16, 2026 03:09
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.

3 participants