Skip to content

Flatten product emails on phones like the welcome email - #205

Merged
devhims merged 1 commit into
mainfrom
fix/product-email-mobile-layout
Oct 16, 2026
Merged

devhims merged 1 commit into
mainfrom
fix/product-email-mobile-layout

Conversation

@devhims

@devhims devhims commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Summary

#204 flattened the welcome email on phones, but every other email still nested the text inside a page inset and a bordered card. Monitor alerts, digests, the email alert confirmation, sign-in links and Scale inquiries all use the shared shell in email-templates.tsx, which had no mobile rules.

Below 620px the shell now matches the welcome email:

  • page padding 0, and the card has no border or radius
  • card padding drops from 34px to 24px 18px
  • logo row spacing drops from 36px to 28px

Desktop is unchanged. The rules use class selectors only, because Gmail drops a whole <style> block if any rule in it is unsupported.

PaddedCell moves from welcome-email.tsx into email-padded-cell.tsx so both templates can use it. react-email's Container puts padding on an inner cell that a class can't reach, so the shell needs a cell that carries both.

Testing

  • Rendered a monitor alert at 390px (one full-width surface) and 900px (unchanged card).
  • npx vitest run test/welcome-email.test.ts test/notification-email.test.ts test/auth-config.test.ts: 23 passed.

Monitor alerts, digests, the email alert confirmation, sign-in links and
Scale inquiries share one shell that kept the page inset and card border on
phones. Below 620px the card now fills the width with no border or radius,
its padding drops from 34px to 24px 18px, and the logo row sits closer to
the content.

PaddedCell moves to its own module so both templates use it, since
react-email's Container keeps the class off the cell that holds padding.
@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
video2ctx-web Ready Ready Preview Oct 16, 2026 5:23am UTC

devhims commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Review of head 29247343b185cd9b7614ff5c5e32e0cd6617e07b against 79841cb1585e5700f8e25f1262c8d5b6a72018c6.

Verdict: changes-needed before reviewer approval — validation is blocked, rather than a confirmed material code defect. I found no material correctness or security regression in the full three-file diff, complete templates/helper, five shared-shell callers, and relevant test files. The PaddedCell extraction is unchanged; message content, links, escaping, CID logo and plain-text rendering path remain intact. Mobile rules now target the cell that actually holds padding.

Nonblocking observations:

  • Low, platform/src/lib/email-templates.tsx:199–203: maxWidth remains 560px, so the borderless card can retain side gutters at viewport widths 561–620px. The description's full-width claim is therefore slightly broader than the CSS; ordinary narrower phones are unaffected.
  • Low, responsive regression coverage: no tests were added for the shared mobile classes/padding placement, breakpoint behavior or unchanged welcome output. Existing email tests cover content, links, logo and escaping.

Verification:

  • Passed in CI: Verify run 38855538699, associated with this head, completed successfully. Vercel preview is ready.
  • Blocked independent checks: creating a separate coding task and resuming the existing email-review task repeatedly returned an AppServerBackendRequestError before admitting a new turn. Consequently I could not independently run the focused tests or compare rendered base/head layouts. The author's reported 23 passing tests and render checks are not my independent test results.
  • Actual Gmail/Outlook and CID delivery were not tested.

Remaining validation before I give approval: independently render the shared email types at phone/breakpoint/desktop widths, verify stylesheet-free fallback and unchanged welcome output, and run the focused email suites. No implementation change is requested solely because the reviewer execution service is unavailable.

@devhims
devhims merged commit f858c53 into main Oct 16, 2026
10 checks passed
@devhims
devhims deleted the fix/product-email-mobile-layout branch October 16, 2026 05:29

This branch was successfully deployed

1 active deployment
Preview — 29247343 Deployed Oct 16, 2026 by vercel[bot]
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.

1 participant