Two Reproducible Issues with GitHub Notification Emails in Apple Mail #199746
Unanswered
btrazzini
asked this question in
Other Feature Feedback, Questions, & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Product Feedback
💬 Feature/Topic Area
Other
Body
I would like to report two reproducible issues I have been experiencing with GitHub notification emails when viewed in Apple Mail. I have analyzed the raw email sources and can provide specific technical evidence for both.
1. Thread Ordering: Identical Timestamps Cause Messages to Appear Out of Order
When a Pull Request is opened and a review is requested simultaneously, GitHub dispatches both notifications in parallel — from different SMTP nodes — within the same second. Both messages end up with the exact same value in the
Dateheader.Here is a representative example:
Email 1 (PR opened):
Date: Fri, 19 Jun 2026 12:04:45 -0700Message-ID: <org/repository/pull/NNN@github.com>Email 2 (review requested):
Date: Fri, 19 Jun 2026 12:04:45 -0700Message-ID: <org/repository/pull/NNN/issue_event/XXXXXXXXX@github.com>In-Reply-To: <org/repository/pull/NNN@github.com>Even though Email 2 correctly declares
In-Reply-Topointing to Email 1, Apple Mail uses theDateheader as the primary sort key within a thread. When two messages share the same timestamp down to the second, the tiebreaker is undefined and Apple Mail ends up displaying the reply before the original message.The
X-Receivedheader from Gmail shows the actual arrival difference was only ~256 milliseconds, which is invisible at theDateheader's one-second resolution.A simple fix would be to ensure that related but distinct notifications dispatched in the same event batch carry
Datevalues that differ by at least one second, so that mail clients can establish a reliable sort order.2. Dark Mode: Inline Flexbox Layout Disables Apple Mail's Automatic Inversion
GitHub uses two different HTML templates for different notification types, and only one of them renders correctly in Apple Mail's Dark Mode.
Template A — system events (e.g., "review requested"):
This renders correctly in Dark Mode. Apple Mail applies its automatic color inversion to the entire message.
Template B — user comments (e.g., a comment left on a PR):
This fails in Dark Mode. The comment body appears with light-mode colors on a dark background, making it difficult to read.
The root cause is Apple Mail's Dark Mode heuristic: when it encounters a container with complex inline layout styles (
display: flexcombined withwhite-space: pre-wrapandalign-items), it treats the block as a manually controlled UI component and disables automatic color inversion for that block and its siblings in the same context.Additionally, the footer paragraph present in all GitHub notification emails contains a hardcoded inline color:
The
#666value is legible on white backgrounds but becomes low-contrast on dark backgrounds, since inline styles are not overridden by Apple Mail's inversion engine.The two changes that would resolve this:
display: flexwith a class-based or table-based layout, which Apple Mail's Dark Mode engine handles gracefully.<style>block with a@media (prefers-color-scheme: dark)rule to adjust text colors for dark environments, instead of relying solely on inline color values.I understand that supporting every email client's quirks is a significant engineering effort, and I genuinely appreciate the quality of GitHub's notification system overall. I am sharing these findings because I have the raw headers and HTML to back them up, and I hope they are useful for your team.
Thank you for your time.
Beta Was this translation helpful? Give feedback.
All reactions