Make the onboarding email preview readable for chapter leads - #1137
Merged
RisingOrange merged 27 commits intoSep 18, 2026
Merged
RisingOrange merged 27 commits into
RisingOrange merged 27 commits into
Conversation
…iew the copy
The preview is about to be handed to chapter leads and organisers deciding
whether to write their own welcome email, so the page now explains the email
rather than the code that renders it.
- Plain-language intro: what the email is, when it is sent, that a chapter
block is appended to the shared copy and that some chapters replace it.
- Example chips for the cases worth seeing side by side: no chapter, a chapter
block, keeping informed, Spanish, and one per chapter that writes its own.
They carry the reader's own name and opt-in setting over.
- Controls read as questions about the signup ("Why they signed up") rather
than Airtable field names, each with a line on what it changes.
- The resolved panel becomes a sentence naming the chapter; the bucket/group
breakdown moves into a developer section with the module paths and the
compare-page link.
- Copy text / Copy HTML, so a chapter can take the current wording as a basis
for translating or rewriting, plus a phone-width preview.
- A section on what a chapter supplies versus the two lines always added for
them, since losing the confirmation line leaves the reader unconfirmed.
describeChapterOverride() now returns the chapter's name alongside its scope,
so the country picker can say who writes its own email rather than that
someone does.
✅ Deploy Preview for pauseai canceled.
|
- Drop the newsletter opt-in control: the sign-up form won't pass the answer through, so only the hedged wording is ever sent. - Drop the Update preview button; every control re-renders on change, and Enter in the name field still submits. - Label the intent field Intent with the Airtable values, as reviewers know them. - Point to pauseai.info/communities for where chapter links come from, and reword the message shown when the chapter list fails to load.
…d of offering example presets The presets mostly set one field the form already offers, and the one shared-copy example was just the alphabetically first chapter. What they did add, pointing reviewers at the chapters that write their own email, now sits in the intro, built from the same override data so it stays current.
…o link PauseAI Global - Say which render to copy as a base (their country, Volunteer / Lead) and that a chapter can write one email or one per group. - Ask chapters to point new volunteers to the global welcome calls and Discord, as PauseAI Sverige's email does. The links come from brand.ts through the load, so the advice can't drift from what the emails send. - Drop the line about self-service editing in the CRM.
…ne, not Volunteer A chapter's own email covers None and Act now as one version, and the shared copy for those two differs only in subject, first line and closing.
…bing a base email PauseAI UK's and Sverige's own emails aren't adaptations of the shared copy, so the page offers translating it or writing from scratch rather than naming an intent to start from. Where chapter links live is ours to decide; the chapter's part is to send them.
…djust it - Show it open under the intro rather than collapsed at the bottom, where it was easy to miss. - Ask chapters writing in another language to translate the confirmation line and newsletter note, instead of leaving them out. - Drop the pointer to the Swedish email as a model for the global line; readers elsewhere can't read it. - Say non-volunteers rather than everyone else.
…ntro names Past four the sentence names three and counts the rest; each is still marked in the country picker.
…for their own email The branded card is the default when an override sets no htmlStyle.
Fixes from a simplify pass and Codex/Fable reviews of the page for chapter leads. What the page says: - The summary sentence follows copy.ts: a volunteer's chapter part says the chapter will be in touch; a non-volunteer's is left out when the chapter has no links; a Spanish non-volunteer gets English with no chapter part, where it used to claim the country had no chapter. - The page opens on the shared email rather than PauseAI UK's own. - The Layout hint no longer says every chapter gets one or the other: the shared email is always the branded card. - The intent hint no longer says each intent gets its own wording. Behaviour: - Copy HTML copies the email as sent; the frame alone gets the preview's asset URLs, which stop resolving once the deploy preview is gone. - Copy is disabled while a re-render is in flight, when it would copy the previous email; its status is announced and clears when the email changes. - A country missing from the chapter list, or an unknown intent, keeps an option instead of leaving its select blank. An empty name falls back. - One column on phones; hints tied to controls; radio groups labelled. - "Show as text" instead of "Show plain text", next to the Plain note layout. Code: - fitFrame.ts replaces the frame-sizing code duplicated in the compare page, and re-measures on image load and width change instead of after 500ms. - The three Airtable-backed calls in the load run in parallel. - Lookup tables typed by their unions; Intl.DisplayNames for language names; one radio-group snippet; dead subscribed handling and CSS removed.
…king countries A signup from one of those countries gets Spanish whatever languages they listed, so previewing it in English showed an email nobody there receives. The English option is disabled for them; elsewhere the choice stays and stands in for having listed Spanish.
…w's language control Español stayed selected for a Spanish-speaking country's None and Act now signups, whose email is English: only the volunteer email has a Spanish version. The control now shows the language the email is in and is locked, with the reason, whenever the language isn't a choice: a chapter's own email, a non-volunteer, or a volunteer from a Spanish-speaking country.
"None and Act now only exists" read as "now only exists"; the Spain hint didn't say it is about volunteers or that listed languages don't change it.
- Route a non-volunteer outside the Spanish-speaking countries to English on the server. Their language control is locked, so it isn't submitted: a Spanish choice carried in from before (e.g. Volunteer + Español, then None) dropped the chapter part, and the next control change brought it back with nothing on screen saying why. - Show a locked language as text instead of greyed radios, which could not show Swedish at all and did not read as locked. - Trim the intent once, so a padded value shows the choice it renders. - fitFrame: skip measuring while a new srcdoc has no document element yet, which threw on every switch back from the text view. - Put the rendered HTML in the frame as is: the email images are on pauseai.info already, so the preview-origin rewrite, and the second copy of the HTML kept for Copy HTML, weren't needed. - Say "Spanish-speaking countries", not "Spain and Latin America" (Brazil gets English, Equatorial Guinea Spanish), and that US signups get no chapter part because PauseAI US welcomes its own members. - Array sort in place of toSorted, which would stop the page's script on browsers before 2023.
- Quote the confirmation line and both newsletter lines a chapter's own email carries, taken from FIXED_COPY so the guide can't drift from what is sent, instead of describing them. - Point to "the chapters named above" rather than naming two of them, which left out Canada and would go stale. - Say a chapter's email replaces the shared text, not that it does so "entirely": the fixed lines stay. - Move Copy HTML into the developer section; chapter leads want the text.
…letter line This line goes out in the live shared email to anyone who left the newsletter box unticked.
A chapter-written email now always carries the conditional "If you opted in, we'll keep you posted…" line, whatever the signup chose. English already used it for anyone who hadn't subscribed, while Spanish and Swedish spelled out "you didn't subscribe", against the comment that said they shouldn't; a subscriber got a third, definite line. The shared email still states the newsletter promise once the opt-in is known. This changes live copy: PauseAI Sverige's email and the English chapter emails lose their subscriber-specific lines. The preview guide now quotes the single line.
…line - Comments on `subscribed` said undefined keeps the hedged wording in general and cited an older preview link; it now only affects the shared email's line, and the preview pages never pass it. - Test the Swedish chapter line across opt-in values, as well as the UK's. - The preview guide quotes the chapter-email lines, so say it is chapter emails that carry them.
…mary The sentence is about which email this is; the name only shows up in it.
…mary instead of counting them
… not /communities The email's chapter links come from the National Groups table, which /national-groups shows; /communities is built from a JSON file in the repo with one link per chapter.
RisingOrange
marked this pull request as ready for review
September 18, 2026 18:15
…-preview-for-chapter-leads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrites
/onboarding-email-previewfor the people who will actually use it — Irina and chapter leads deciding whether to write their own welcome email — instead of for developers checking a render. The page now explains the email, tells chapters how to write or translate their own, and keeps the code detail in a collapsed "For developers" section. Same route and query-string state; the email rendering is untouched apart from two copy changes, noted below.What a chapter lead sees
FIXED_COPY, so they match what is sent), mention PauseAI Global's welcome calls and Discord, branded card unless you ask for the plain note, and send your text and social links to PauseAI Global.copy.ts: e.g. "This is the welcome email for people who want to volunteer, in English. It says PauseAI Germany will be in touch, and lists the chapter's links, the same ones as on pauseai.info/national-groups."Code changes worth a look
describeChapterOverride()returns{ name, scope }instead of a string; only the preview page calls it.fitFrame.ts: one Svelte action sizing the email iframe, now shared with/onboarding-email-compare, which had its own copy. It re-measures on image load and on width change instead of after a fixed 500 ms.Promise.all, drops thesubscribedhandling the page no longer exposes, and drops the preview-origin asset rewrite: the email images are already on pauseai.info. (The compare page keeps its own rewrite; untouched here.)Changes to live email copy
fixed.ts: the shared email's line for people who left the newsletter box unticked loses its em dash: "You didn't opt in to our newsletter, so we won't add you to it. We may still occasionally send you a critical alert."Checks
pnpm check0 errors, eslint / stylelint / prettier clean,onboardingEmailtests pass (19). Exercised against live National Groups data across countries, intents and languages, and reviewed by Codex (three rounds) and Fable (two rounds; the second also drove the page in headless Chrome).Review findings
From simplify, Codex (three rounds), Fable (two rounds) and our own checks.
fitFrame.ts, shared)toSortedwould break the page on pre-2023 browsers?intent=showed a different choice from the one renderedFIXED_COPYsubscribedcomments; no Swedish testLink to share
https://main--pauseai.netlify.app/onboarding-email-preview (the page 404s on pauseai.info by design).