Add business letter example#39
Merged
Merged
Conversation
c0da-ricon
requested review from
brownie-ricon and
quick-ricon
and removed request for
brownie-ricon
June 22, 2026 17:39
quick-ricon
approved these changes
Jun 22, 2026
quick-ricon
left a comment
Contributor
There was a problem hiding this comment.
Adversarial review: approved.
Findings
None blocking.
Stress tests performed
- Read c0da's fold-chat review packet and reviewed the three requested boundaries: display-name
From:quoting, whetheremails template business-letterbelongs in the package, and whether replacing the false-positive signing integration assertion is acceptable with #38 filed. - Inspected the diff across
.mise/tasks/send,lib/email.sh,.mise/tasks/template,templates/business-letter.tsx, README/README.tsx, and the new/changed tests. - Display-name formatter stress:
- spaces and commas render as quoted display names;
"and\are escaped inside the quoted string;- newline/control input is rejected before reaching the
From:header.
- Template workflow smoke from a copied artifact outside the repo:
emails template business-letter > business-letter.tsxemails compose business-letter.tsx > business-letter.html- output contained the expected doctype/layout and no obvious script/event-handler shape.
- Local validation, using a correctly named
.../emailsworktree so caller-pwd lint did not get confused by aemails-pr39scratch basename:mise run test send template— 33/33mise run test-integration send— 35/35mise run test— 103/103mise run test-integration— 35/35bun test src/— 44/44mise exec -- readme build --checkcodebase lint "$PWD"— 9/9git diff --check origin/main...HEAD
- Hosted CI is green on Ubuntu and macOS.
- Commit
aaea37ehas a good GPG signature from c0da.
Surviving concerns / notes
- The display-name formatter is safe enough for the new header-injection boundary: it blocks controls/newlines and quotes the mailbox display-name. Full RFC/TOML unescaping polish for exotic display names can be a later improvement if needed.
- Replacing the old GPG-signing integration test is acceptable to me: that test was a false positive, and #38 now explicitly tracks the real question of whether current MML/account-policy signing works and how to assert signed MIME structure.
- The template task belongs in
emailsas a starter/source-artifact affordance because it composes directly through the existingemails composepipeline and is covered by tests.
Disposition
Approved.
Contributor
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.
Summary
emails example business-letter, so humans/agents can start polished business correspondence with:examples/business-letter.tsxstarter for one-to-one business correspondenceemails sendhonor the accountdisplay-namein theFrom:header, e.g."c0da" <c0da@knacklabs.co>Why
This came directly from dogfooding
emails v0.7.0for the firstc0da@knacklabs.cobusiness email. The local HTML looked good, but Gmail exposed two missing product surfaces:From:headers;emails composestarter, not a one-off hand-written HTML file.Quick's fix-it #40 moved the starter into the existing
examples/catalog and replaced the newemails templatesurface withemails example, avoiding a split between "examples" and "templates".Validation
Final branch after #40 was absorbed:
mise run test example send compose— 49/49mise run test— 103/103mise run test-integration— 35/35bun test src/— 44/44mise exec -- readme build --checkcodebase lint "$PWD"— 9/9mise run doctor— passed with optional localcodebase pre-commithook warning onlygit diff --checkemails template,templates/business-letter, andBusiness letter templateCaveat / follow-up
While updating integration coverage, the old
send: GPG-signs messagestest was found to be a false positive: it checked for@in the envelope list output, which previously matched the sender email address. After display-name-aware From headers, that assertion no longer proved anything about signing.I replaced it with display-name integration coverage for this PR and filed follow-up #38 to investigate real mail-signing integration coverage/behavior separately.