Repository navigation
feat(onboard): a welcome email per role - #43
Merged
Merged
Conversation
The single welcome email becomes named ones: an older store's becomes Default (edited, never deleted), and each role picks one, blank meaning Default. Preview names it and Run sends the one it held; bulk rows now snapshot their role's email at preview too (they read the store at run time). A role can't pick a missing email, one in use can't be deleted, and the role editor's picker follows a save without a reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A hire whose role's email is missing records a failed send instead of raising; a name differing only by case saves over the existing email; editing a role whose email vanished shows it as missing so the save errors rather than re-pointing it to Default; the editor says a new name adds a copy; the unread welcome_name key is gone. no-failure-log: review fixes on this unmerged branch; nothing shipped broken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What and why
Onboarding had one welcome email for every role. A role can now pick one of several named welcome emails ("Default", "Contractor", "Intern", …), so a contractor and an employee get different messages.
onboarding.jsonholdswelcomes: {name: {subject, body}}. An older file's singlewelcomebecomes Default on load, unchanged. Default can be edited, never deleted.welcomenames one (blank = Default).set_rolerefuses a name that doesn't exist;delete_welcomerefuses Default and any email a role still picks, naming the roles. A name differing only by case saves over the existing email.onboarding.jskeeps a half-edited role's choice across that swap.How it was verified
.venv/bin/python -m pytest -qpasses (1593 passed)make lintis clean (ruff + mypy)make a11ypasses (axe 0) anddocs/guide.mdsays what's newNew tests: the migration from a single welcome, a role's email sent and held across an edit (single and bulk), Default for a role without a choice, delete refusals, the case-insensitive save, a vanished email blocking the send, and a missing email recorded as a failed send. Clicked through in the mock preview at 1100×760: add "Contractor", give a role that email, add "Intern" mid-edit (the role kept "Contractor"), preview a hire.
/code-review high: 6 of 8 fixed (a JS-only check verified by hand; the store's silent reset on a corrupt file predates this and is tracked separately). A security review found nothing.If it builds or runs a
gamcommandsend_welcome_email→_run_write; only which subject/body it sends is chosen/onboard/welcome/deleteis local store only, classifiedLOCAL_ONLYintests/test_write_routes_guarded.pyLive status: Offline only. Sending the welcome email is confirmed live (2026-09-30); a role-specific one has not run live yet.
Nothing private
🤖 Generated with Claude Code