
How we caught a layout bug in our own emails using the screenshot API
How We Caught a Layout Bug in Our Own Emails Using the Screenshot API Two weeks. That's how long we'd been sending a broken welcome email to new signups before someone mentioned it in a support ticket. The bug: our welcome email had a two-column layout that collapsed correctly on mobile — or so we thought. On Gmail Android dark mode, the right column disappeared entirely. Just gone. The CTA button was in that column. We'd tested it in our own email client (Apple Mail, macOS). It looked fine. We'd sent a test to ourselves. Fine. We shipped it. Here's how we found it, fixed it, and set up the check that caught the next one before it shipped. How we found it When the support ticket came in, we wrote a quick script to screenshot the template across the matrix we should have checked before sending: import fs from " fs/promises " ; const template = await fs . readFile ( " emails/welcome.html " , " utf8 " ); const MATRIX = [ { label : " desktop-light " , opts : {} }, { label : " desktop-dark
Continue reading on Dev.to JavaScript
Opens in a new tab


