Skip to content

Leave the dashboard stylesheet out of the error email - #110

Merged
fractaledmind merged 1 commit into
fractaledmind:mainfrom
namolnad:mail-without-console-stylesheet
Oct 16, 2026
Merged

fractaledmind merged 1 commit into
fractaledmind:mainfrom
namolnad:mail-without-console-stylesheet

Conversation

@namolnad

Copy link
Copy Markdown
Contributor

The error email renders layouts/solid_errors/style, the dashboard's full Tailwind build, into its <head>. The email doesn't use it: since #94 it styles itself with its own inline <style> block, and none of its classes (email-header, error-message, backtrace, context-table, …) are in the Tailwind build.

The stylesheet is about 21KB in every error email. Gmail clips a message past about 102KB, so with a long backtrace and context it pushes the part people actually need (the backtrace, at the bottom) behind "View entire message".

This drops the one line and adds a mailer test that the HTML part doesn't include the stylesheet.

The only thing the build still did in the email was Tailwind's preflight reset of bare elements. The email's own block sets what it relies on, and we've sent it this way in production since early October without a visible difference.

The email styles itself with its own inline block and uses none of the
dashboard's Tailwind classes, but rendered the whole build into its head:
tens of kilobytes per message, and Gmail clips a message past about a
hundred.
@namolnad
namolnad force-pushed the mail-without-console-stylesheet branch from 54a09ae to a4fb80e Compare October 13, 2026 16:08
@namolnad
namolnad marked this pull request as ready for review October 13, 2026 16:12
@fractaledmind
fractaledmind merged commit 7949d84 into fractaledmind:main Oct 16, 2026
17 checks passed
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.

2 participants