Skip to content

Offer Swedish on Your signups to organizers who probably want it - #934

Closed
richshaw wants to merge 8 commits into
claude/issue-639-post-save-promptsfrom
claude/issue-640-notice
Closed

richshaw wants to merge 8 commits into
claude/issue-639-post-save-promptsfrom
claude/issue-640-notice

Conversation

@richshaw

@richshaw richshaw commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Fixes #640.

Merge after #933 and #932.

The stack

PR 41 of the localization stack (#619). Based on #933 (claude/issue-639-post-save-prompts, head 2bb311d) with #932 (claude/issue-640-looks-swedish, head bae3503) merged in; review against #933's branch. #932's guess is in this PR's diff against that branch until #932 merges.

The problem

When Swedish ships (#639), signups made before it stay English, new hand-built ones follow the browser (many Swedes run theirs in English), and nothing tells an organizer. "Language for new signups" and each signup's "Signup language" are there, and #639's two questions appear only after one of those is saved. So the launch would reach only the organizers whose browser says Swedish and those who go looking.

The fix

  • A notice on Your signups (src/app/app/(chrome)/page.tsx, swedish-notice.tsx): "Your signups can be in Swedish now." with its Swedish twin right under it in the title (lang="sv"), a line on what the language is for, and Use Swedish / Keep English. It reuses src/components/banner.tsx, which gains a children slot (the buttons), a title that may be a node (for the twin), and an offer kind: the Preview banner's tint with darker text, text-brand-hover (#1658c4), 5.7:1 on the tint, so it meets WCAG AA. The other kinds are unchanged. It isn't a live region: it's part of the page from the start.
  • Who sees it (swedishNoticeReason): only while Swedish is in SHIPPED.participant, the organizer's organizers.locale is empty, and no DEFAULT_LOCALE is set; and then only when their browser's first language is Swedish, or their signups look Swedish (Guess whether an organizer's signups look Swedish from their titles #932's signupsLookWrittenIn over the titles the page already lists, or else the start of their descriptions, below). Nothing shows today: Swedish hasn't shipped.
  • Swedish only, not any language with a table entry. The notice exists for Swedish's launch, and its words are Swedish's: the title names Swedish and the second line is Swedish. A general version would need the language's name inside a sentence in that language (på svenska; Finnish would need it in a case), which a {language} placeholder can't give, so the next language needs words of its own anyway. Written for Swedish, the check names 'sv' three times; a loop over the shipped languages would be no shorter, and harder to read.
  • Both buttons save, so nothing dismisses it. Each is a plain form (answerSwedishNoticeAction, as 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's forms are), sending only locale. The new answerLanguageNotice service saves it through updateOrganizerLocale (Let an organizer save a language for new signups, hidden until a second language ships #904), with its refusals, and records which answer it was in the same transaction, only when the organizer had no saved language before it (their row is locked first), so a double click, a second tab or a stale form saves again but records nothing. The form names no organizer, so it can only change the signed-in organizer's own language.
  • Reading the signups. The browser and the titles cost nothing. When neither settles it, one statement reads the start of the workspace's newest descriptions (listDescriptionStarts: 20 at most, left(description, 300), live signups only, newest first, behind requireWorkspaceAccess). Descriptions only add evidence (descriptionsLookWrittenIn, new in written-in.ts): one with a word from Swedish's list says yes, one without says nothing, and they never enter the "at least half" count, as Guess whether an organizer's signups look Swedish from their titles #932's review and tophat asked. Letters and the words shared with English (till, med) don't count in a description, which is long enough to name a Swedish place in English beside "till".
  • Is the read worth it? Yes, I think, but it's the one cost here. It runs on every Your signups view of an organizer who hasn't chosen a language, on an instance without DEFAULT_LOCALE, whose browser isn't Swedish and whose titles say no: after the launch, that's nearly every English-speaking organizer, on every view, since they never see the notice to answer it. It's one small statement (the same filter and index as the list above it) on a page that sends three. What it buys: titles miss Swedish compounds with no listed word and no å, ä or ö ("Lussebak med scouterna", "Julpyssel", "Grillkväll i parken"), and those organizers, with an English browser, are exactly who Signups made before Swedish shipped stay in English, and nothing tells their organizers #640 is for, while a Swedish description almost always has a listed word (och, att, på, för…). The telemetry's reason will say how many organizers the read finds; if it's few, taking it out is a three-line change.
  • Statements on Your signups (Postgres's own log, dev server, sv shipped locally): an organizer who has chosen, and everyone while Swedish isn't shipped, 3 (session, organizer, list), as before; an undecided organizer whose browser and titles say no, 4 (the description read). Showing the notice adds no statement before the response.
  • More words for Swedish (from Guess whether an organizer's signups look Swedish from their titles #932's second review): the days in the plural and the definite form (måndagar…söndagar, måndagen…söndagen), and veckor, kvällar, for signups that recur. matcher (English) and helger (a surname) stay out. Each is pinned by a title that says no without it ("Simskola måndagar", "Fika fredagar"…); every English title in the tests still says no. The reviewer found 12 of 12 made-up recurring-day titles move to yes and none of 16 English titles change.
  • Telemetry (docs/telemetry.md, "Language notice"):
    • language_notice.shown { reason, device }, reason being browser, titles or descriptions. Following view-tracker.ts, it's written after the response, outside any transaction, and never fails the page; it isn't written on every load: recordOrganizerView gains once, which writes only when the organizer has no row of that event yet (one indexed read after the response on each view that shows the notice).
    • language_notice.answered { locale }: sv for Use Swedish, en for Keep English, in the save's transaction, since it describes the save; at most one per organizer (above).
    • Both have no signup or workspace: the language is the organizer's. Neither carries any of the signups' text.
  • Trust docs. Let an organizer save a language for new signups, hidden until a second language ships #904's privacy line said the language is chosen "in your account's Settings", which a choice made from the notice isn't, so it now names both places, and the activity-log paragraph says what the notice records (why it showed, never the signups' words, and the answer). "Last updated" is already today (14 November 2026). No cookie, no new stored field.
  • CHANGELOG: one line under Added. And, from Name a new signup's columns and the Build tab's defaults in its language #926's review, New signups get English column names ("What", "Date") whatever their language #634's entry now says a signup whose language changes later (on its Settings tab or with the open signups) keeps its column names, the organizer's text, while the Build tab's "Untitled" and "Option 1" follow the new language.
  • Bytes. Against a build of Add a button that switches an organizer's open signups to their language #933's first head (98657d1) in the same environment, every page moved by −12 to +7 bytes; Your signups −1 B. Merging Add a button that switches an organizer's open signups to their language #933's 2bb311d changed no page's bytes here; the offer kind's own colour moved the pages that show a banner by −4 to +5 B. The notice is server-rendered with plain forms, so the page gains no script; neither the notice's text nor the word list is in .next/static.

The Swedish line

The organizer app is English (#619's organizer phase hasn't started), so only the notice's first line has a Swedish twin, for the people it's for:

Key English Swedish
organizer.swedishNotice.title Your signups can be in Swedish now. Nu kan dina anmälningslistor vara på svenska.

Translated with the translate skill (glossary: anmälningslista, du), marked with mark-translated.mjs. Both lines come from that one key (the English through the English translator, the Swedish through the Swedish one), so changing the English marks the Swedish stale. Because the catalog check fails a stale message only for an audience the language has shipped to, and organizer text won't ship in Swedish with this, a test on the page checks that this key's Swedish is recorded against today's English.

Independent translation review

Passed with no findings on the wording (a different model, read-only, against the glossary and the tophat's screenshots): #934 (comment). Its two layout nits are taken: the Swedish line now sits in the title as its twin rather than below the explanation, and at 320 px it wraps onto two lines cleanly (as does the English title).

Where #640 is out of date

Follow-ups, not in this PR

  • The Preview and AI draft banners fail contrast on main too: the same text-brand on the same tint, 4.07:1. This PR fixes only its own offer kind and leaves those exactly as they are (the tophat's 17 banner screenshots stay pixel-identical); they want their own fix.
  • For the launch PR (Signups can't be in Swedish yet #639's last part): with sv shipped, 2 tests in organizer.spec.ts fail, both on getByRole('button', { name: 'Save' }) finding two buttons on a signup's Settings tab (the sign-up form's and Add a Signup language control to the Settings tab, hidden while one language ships #899's "Signup language" form's). That comes from Add a Signup language control to the Settings tab, hidden while one language ships #899, not this PR. The e2e organizer also owns the Swedish seed signups, so it will see this notice once Swedish ships, and help screenshots retaken then would show it unless the seed saves a language.
  • For the owner: Keep English gives no confirmation beyond the notice going away.
  • Optional, left: the once read uses activity_by_event and filters on actor_id, so it walks the language_notice.shown rows (one per organizer ever shown) after the response; fine at today's sizes.

Not done

Tests

  • src/app/app/(chrome)/page.test.tsx (jsdom, Swedish shipped in the test with ship()):
    • shows for a browser whose first language is Swedish, and for Swedish-looking titles, neither reading descriptions;
    • when titles don't settle it, reads descriptions once (with the actor and workspace) and shows for a Swedish one;
    • doesn't show for English titles and descriptions, or a browser that ranks Swedish second;
    • descriptions never count against titles that look Swedish (they aren't even read);
    • an empty workspace reads nothing;
    • doesn't show once a language is saved (en, sv, even an unknown one), or with DEFAULT_LOCALE set (en or sv), or while Swedish isn't shipped, and then reads nothing and records nothing;
    • the Swedish line has lang="sv" and sits in the title, ahead of the explanation; each button's form sends only its language; no live region;
    • telemetry is asked for once per render that shows it, with once: true and the reason;
    • the Swedish line is recorded as translated from today's English.
  • src/app/app/(chrome)/actions.db.test.ts: Use Swedish saves sv, writes one language_notice.answered row and lands on /app/settings?saved=language; Keep English saves en and lands on /app; after Use Swedish, the read account Settings makes (openSignupsToSwitch) finds the open signup and not the draft, and its Yes (setOpenSignupsLocaleAction) puts it in Swedish; a second answer, or a stale form answered the other way, saves again but records nothing; two answers sent at once record one; an answer waits for one already being saved (a held row lock) and then records nothing; an organizer who had chosen a language already records nothing; a forged form naming another organizer changes only the signed-in one's; sv while unshipped, xx, de, an empty value and none are refused with nothing saved or recorded; a non-organizer is refused before any write.
  • src/services/description-starts.db.test.ts: one statement (counted with a debug hook) returns the 20 newest descriptions' first 300 characters, leaving out empty, deleted and other workspaces' signups and keeping drafts and archived ones; a workspace the actor isn't in is refused before any query.
  • src/lib/view-tracker.db.test.ts: with once, three views write one row per organizer; without it, every view writes.
  • src/i18n/written-in.test.ts: descriptionsLookWrittenIn (a listed word says yes; English descriptions with Swedish names, "till" and "med" say no; letters alone say nothing; empty lists and English's missing entry; case and NFC); the 16 recurring-day titles.
  • src/components/banner.test.tsx: children go under the body.
  • I broke each piece in turn and a test failed every time: each of the four conditions, the browser, titles and description steps, the empty-workspace short cut, the button values, the Swedish line's translator and lang, once, the answered row, the read's empty filter, limit and workspace filter, and (this round) the "no language before" condition and the row lock.
  • In the running app (dev server on its own database, sv added to SHIPPED.participant locally and not committed; synthetic organizers and titles), at 1280 and 390 px: the notice showed for a Swedish browser (browser), a Swedish title (titles) and an English title with a Swedish description (descriptions), and not for an English organizer. Use Swedish saved sv and landed on account Settings with "Saved" and "Use Svenska for your open signups too?"; Yes put the open signup in sv and left the draft. Keep English saved en and the notice was gone. Each organizer got one shown row however many times they loaded the page, and one answered row. The only console message was a hydration warning that Playwright's own screenshot caret-hiding causes in dev (gone with caret: 'initial'). This round: axe (WCAG 2.1 A/AA) finds nothing on Your signups with the notice showing at 1280, 390 and 320 px; a double click on Keep English sent two POSTs and wrote one answered row.

Run and passed on 664fa20:

  • pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test (215 files, 3,173 tests)
  • pnpm test:db (46 files, 866 tests)
  • pnpm build && pnpm budgets: every page under budget; byte changes above. No budget changes.
  • e2e on the production build: organizer.spec.ts and the four help walkthroughs in tests/e2e/help (each visits Your signups), container Chromium: 39 passed. Nothing in them reaches the notice, since Swedish isn't shipped there.
  • axe on Your signups with the notice showing (sv shipped locally, not committed): no violations at 1280, 390 and 320 px.

🤖 Generated with Claude Code

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt

A pure function for the notice on Your signups (#640): given the rows the
page already loads, it says whether the titles look written in a language.
One title with a word from the language's short list settles it; titles
spelled only with its letters (å, ä, ö for Swedish) count when they make up
at least half the list, since names and the neighbouring languages write
those letters too. A word with a letter the language never writes (æ, ø, ü,
ß) is never evidence. The markers are a table per language, so the next one
adds an entry and no code. Server-only, beside the other i18n helpers; its
only caller so far is its test, and the notice that uses it comes later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The word list left out every word Danish or Norwegian share with Swedish,
so the commonest words in Swedish titles (på, som, det, efter, fredag,
kaffe) said nothing and a lone Swedish title was found less than half the
time. A listed word now only has to be one English doesn't have, and the
list gains small words, days and seasons and signup words. A second table
field, sharedWithEnglish, holds till and med, which English has too: one
counts only in a title that also has a word spelled with å, ä or ö, so
"Kör till bortamatchen" says yes and "Open till noon" no.

The tests pin the cost: Danish and Norwegian titles with på or hos now say
yes, and so do "Open till late in Malmö" and "Med kit for Åre trip", the
one way an ordinary English title can. Every word left out because English
has it is pinned by an English title that stays no.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Once Swedish ships to participants, Your signups shows "Your signups can be
in Swedish now.", with the same line in Swedish, to an organizer who hasn't
saved a language, on an instance with no DEFAULT_LOCALE, when their browser
asks for Swedish first or their signups look Swedish: from the titles the
page already lists, or else from the start of the workspace's newest
descriptions, read in one bounded statement. Descriptions only add evidence.

Use Swedish saves sv as the organizer's language for new signups and goes on
to account Settings, whose saved=language flash asks about their open
signups (#639). Keep English saves en. Either answer saves a language, so the
notice needs no dismissal of its own.

Telemetry: language_notice.shown, once per organizer after the response
(recordOrganizerView's new `once`), and language_notice.answered, in the
save's transaction. Documented in docs/telemetry.md; privacy page updated.
The Banner takes children for the Swedish line and the buttons.

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
Signups that recur name their day in the plural (måndagar, "on Mondays") or
the definite form (måndagen, "the Monday"), and their weeks and evenings in
the plural (veckor, kvällar), so these join Swedish's words. Matcher (an
English word) and helger (a surname) stay out. Each new word is pinned by a
title that says no without it; every English title in the tests stays no.
From #932's second review.

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 pipeline:tophat pipeline:ux Changes what a person using OpenSignup sees or does pipeline:working A session is working on it right now labels Nov 14, 2026 — with Claude
@richshaw
richshaw requested a balanced review from Copilot November 14, 2026 15:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

richshaw commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner Author

Tophat: failed

Ran 259ca3f locally on production builds (next build + next start), Postgres 16, Chromium at 1280×900 and 390×844 (phone with an iPhone user agent). Three builds: #933's head 2bb311d (the base), this head as committed, and this head with 'sv' added to SHIPPED.participant locally (not committed; reverted). Made-up organizers with seeded sessions; the browser language sent as Accept-Language.

Check Result What I saw
Nothing shows as committed ✅ Swedish browser, Swedish titles, empty workspace: no notice, 3 statements, no rows.
Who sees it (Swedish shipped) ✅ Swedish browser (sv-SE,sv;q=0.9,en;q=0.8) with English titles: shows, reason: browser. English browser with "Fika efter gudstjänsten" and "Städdag på förskolan": shows, titles. English browser and titles, Swedish descriptions only: shows, descriptions (one read of the descriptions). All English, and Swedish ranked second (en-GB,en;q=0.9,sv;q=0.8): none. Saved en or sv (Swedish browser and titles): none. No signups: Swedish browser shows; English browser none, nothing read. Same at both widths.
DEFAULT_LOCALE ✅ Server restarted with en, then sv: none for any of those organizers, 3 statements, nothing read or recorded.
Use Swedish ✅ Phone: saves sv, lands on /app/settings?saved=language with "Saved" and "Use Svenska for your open signups too?" in view (Yes at 572–606 of 844 px), Yes focused. Enter → "Saved. Your open signups now use Svenska."; both open signups store sv, the draft nothing. Desktop, another organizer: No → back to the choice, signups left as they were. The notice never came back (reloads).
Keep English ✅ Saves en, back on Your signups with the notice gone; still gone after two reloads and in a second session (desktop and phone). Signups untouched.
Telemetry ✅ One language_notice.shown per organizer over as many as 8 loads at both widths, with the right reason and device (phone/computer); one answered per answer with the saved locale; no signup or workspace on either. After deciding: 3 statements a load, no read, no row. One optional point below (double-click).
Refused and forged answers ✅ xx, de, empty → /app/settings?error=invalid_input ("Some values weren't accepted."), nothing saved or recorded. An extra organizerId naming another organizer changed only the signed-in one. Signed out → /login?callbackUrl=%2Fapp.
Banner unchanged elsewhere ✅ Preview (organizer preview), AI draft (Build ?aiDraft=1), Closed on the public page and on the change-your-spot page, the Signup closed box after Close signup, and Your signups for two organizers without the notice: 17 screenshots, base vs head (committed), pixel-identical.
Statements on Your signups ✅ Postgres's log, one GET /app, 3 runs each. Base: 3 for every organizer. Head, Swedish not shipped: 3. Shipped: undecided English organizer 4 (left(description, 300) … limit 20); decided (en or sv) 3, same as base; empty workspace 3; an organizer shown the notice 3 before the response, plus the once read after it (and the insert the first time).
Accessibility ❌ lang="sv" on the Swedish line (page is en); not a live region; buttons named "Use Swedish" / "Keep English" (113×34, 112×34 px); Tab order header → New signup → Use Swedish → Keep English → the list; focus ring visible. axe (WCAG 2.1 A/AA) fails color-contrast on all three text lines of the notice. Your signups is axe-clean without it (base and head).
Trust docs ✅ /privacy shows the new choice line, the activity-log sentence, and "Last updated: 14 November 2026".
e2e ✅ organizer.spec.ts + tests/e2e/help on the committed build: 39 passed.
Console and server logs ✅ No errors.

Failure: the notice's text fails WCAG AA contrast

To reproduce: add 'sv' to SHIPPED.participant, build, sign in as an organizer with no saved language whose browser asks for Swedish, open /app and run axe with wcag2a, wcag2aa, wcag21a, wcag21aa. color-contrast fails on the title (p.text-base), the body and p[lang="sv"]: #1f6feb on the bg-brand/10 tint (#e9f1fd) is 4.07:1, and AA needs 4.5:1 (axe counts the 16 px semibold title as normal text).

It should pass. The offer kind copies the Preview banner's bg-brand/10 text-brand. Giving offer its own text colour fixes it and leaves the other kinds byte-identical: text-brand-hover (#1658c4) is 5.72:1 on that tint, text-ink 16.5:1. The Preview and AI draft banners have the same 4.07:1 today. That's older than this PR, so it's a follow-up, not part of this fix.

Optional

  • A double-click writes two answers. Double-clicking Keep English sent two POSTs and wrote two language_notice.answered rows from one tab. docs/telemetry.md says an organizer has more than one only "if they answer from two tabs". Either record answered only when the organizer had no language before the save, or say "count distinct actor_ids" there as for shown. Also, a stale or hand-made POST from an organizer never shown the notice records an answered with no shown (harmless: it saves only their own language).
  • The once read is served by activity_by_event (on event_type) and then filters on actor_id. So each view that shows the notice walks the language_notice.shown rows until it finds the organizer's, which is one row per organizer ever shown, read after the response. That's fine at today's sizes. An index that includes actor_id would make it one row.
  • For the owner: Keep English gives no confirmation. The notice disappears and focus lands on the page body. And the Swedish line comes after the English explanation, so a Swedish reader meets it third.
  • For the launch PR (Signups can't be in Swedish yet #639's last part): the e2e organizer owns the Swedish seed signups, so with Swedish shipped it sees the notice (titles), and help screenshots retaken then would show it unless the seed saves a language. Running this PR's e2e specs on the shipped build gave 37 passed and 2 failed in organizer.spec.ts, both on getByRole('button', { name: 'Save' }) finding two buttons on the Settings tab (the sign-up form's and Add a Signup language control to the Settings tab, hidden while one language ships #899's Language form's). That comes from Add a Signup language control to the Settings tab, hidden while one language ships #899, not this PR.

UX, for the owner

Once Swedish ships, an organizer who hasn't chosen a language, on an instance without DEFAULT_LOCALE, sees a blue notice at the top of Your signups when their browser asks for Swedish first or their signups look Swedish. It says "Your signups can be in Swedish now.", explains the choice, repeats the title in Swedish ("Nu kan dina anmälningslistor vara på svenska.") and offers Use Swedish and Keep English. Use Swedish goes on to account Settings, where #933 asks about the open signups. Keep English just removes the notice. Either answer removes it for good. Screenshots of the notice at both widths, the question after Use Swedish at 390 px, its result, and Your signups after Keep English are in https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt.


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

Independent translation review

This is the translate skill's step 3, for the one Swedish line this PR adds. The orchestrator ran it, read-only, on 259ca3f. The reviewer ran on Fable; the translation came from this session's default model (Opus). It read the line against its English, the glossary in docs/translating.md, and the tophat's screenshots of the notice at 390 and 1280 px and of the question after "Use Swedish".

Line: organizer.swedishNotice.title

  • English: "Your signups can be in Swedish now."
  • Swedish: "Nu kan dina anmälningslistor vara på svenska."

Verdict: correct, natural and true to the glossary. Ship it as it is.

  • Meaning: exact; nothing added or dropped.
  • Glossary: anmälningslistor, with dina for the du tone.
  • Naturalness: this is how a Swedish app would say it. "Vara på svenska" is right: a list that's in Swedish is understood as what the people who open it see. "Nu finns … på svenska" would be worse, because it suggests the lists already are in Swedish.
  • Beside the English and the buttons: it reads correctly, and nothing in it conflicts with the follow-up "Use Svenska for your open signups too?".

Two nits, neither about the wording:

Where Kind Note Decision
934-notice-390, 934-notice-1280 layout The Swedish line translates the title but sits below the English explanation in body weight, so it reads as an afterthought rather than the title's twin. Taken in the fix round: the builder will place it with the title.
934-notice-390 fit At 390 px it fits on one line with a few pixels to spare, so it will wrap at 360 or 320 px. The wrap is harmless. Noted; the fix round checks 320 px.

The fix round also takes the tophat's failure (the notice's contrast, 4.07:1) and its optional point (a double click writes two answered rows).

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


Generated by Claude Code

…r row

- The offer banner's text is brand-hover (#1658c4), 5.7:1 on its tint, where
  the Preview banner's brand blue is 4.07:1 and fails WCAG AA. Only the offer
  kind changes. A banner title may now be a node.
- The Swedish line moves into the title, under the English, as its twin,
  ahead of the explanation, still with lang="sv".
- language_notice.answered is recorded only when the organizer had no saved
  language before the answer, with their row locked first, so a double
  click, a second tab or a stale form saves again but records nothing.

From #934's tophat and its independent translation review.

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

Copy link
Copy Markdown
Owner Author

Address round: tophat failure, its optional point, and the translation review's nit

Fixed in 664fa20, pushed once.

  • Contrast (the tophat's failure). The offer kind now has its own text colour, text-brand-hover (#1658c4): 5.7:1 on the tint (#e9f1fd), up from 4.06:1 with text-brand. The Preview, AI draft and Closed kinds are byte-for-byte as they were. axe (WCAG 2.1 A/AA) on Your signups with the notice showing (sv shipped locally, not committed) finds nothing at 1280, 390 and 320 px. The Preview and AI draft banners' own 4.07:1 on main is listed in the body as a follow-up.
  • Double click (optional, taken). language_notice.answered is now recorded only when the organizer had no saved language before the answer, with their row locked first (select … for update), so a second click, a second tab or a stale form saves again but records nothing. New db tests: two answers in a row, two at once, one waiting behind a held row lock, and an organizer who had already chosen; taking the condition out fails three of them, and taking the lock out fails the waiting one. In the running app a double click on Keep English sent two POSTs and wrote one row. docs/telemetry.md says so.
  • Swedish line placement (translation review nit, taken). It now sits in the title, right under the English as its twin, ahead of the explanation, still lang="sv". A banner's title may now be a node for this; no other banner passes one. At 320 px both title lines wrap onto two lines each, cleanly.
  • Left as is: the once read's index (fine at today's sizes) and Keep English's lack of a confirmation (for the owner); both are in the body. The launch PR's two organizer.spec.ts failures with sv shipped come from Add a Signup language control to the Settings tab, hidden while one language ships #899 and are listed in the body.

Checks on 664fa20: pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test (3,173 tests), pnpm test:db (866), pnpm build && pnpm budgets (all under; −4 to +5 B against 259ca3f), e2e organizer.spec.ts + tests/e2e/help (39 passed).

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

Closing without merging, at the owner's decision: there'll be no on-screen notice when a language launches. Swedish will be announced in the CHANGELOG and release notes, and organizers can change their language in account Settings. #640 is closed as not planned.

Two findings from this PR's tophat still stand, outside it:

  • The Preview and AI draft banners on main measure about 4.07:1 contrast, under WCAG AA's 4.5:1.
  • With sv shipped, two organizer.spec.ts tests fail on the Settings tab's Save buttons. The launch PR will fix that.

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


Generated by Claude Code

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