Compact the email HTML and fill the inbox preview line (1.6.0) #15

Merged
joeyr merged 1 commit from email-compact-preview into main 2026-10-05 23:56:05 -05:00
Owner

Summary

  • Compact HTML: each run of whitespace in the rendered email collapses to one newline or space (<pre> excepted). The classic theme's indentation was ~75% of the email; a real 6-movie, 6-show email goes from 88 KB to ~22 KB, well under Gmail's ~102 KB clip, leaving room for summaries and a higher max_displayed_items (6/section with summaries: 28 KB; 20/section: 76 KB).
  • Inbox preview line: the classic theme's empty hidden preheader now says e.g. "3 new movies and 5 new shows", counting items beyond the cap. Strings for all ten languages live in new i18n/fork.<lang>.toml files, out of upstream's Crowdin files.
  • 1.6.0: VERSION, CHANGELOG, CLAUDE.md notes.

Test plan

  • go vet, unit tests, golangci-lint v2.14: 0 issues
  • New tests fail with the hooks removed (compaction, preheader)
  • Integration test (-tags integration) passes from the cassettes
  • Real-library sends into a local Mailpit (no relay): sizes above, SpamAssassin -1.0 (no rule hits beyond ALL_TRUSTED/0-point), rendered layout unchanged

🤖 Generated with Claude Code

## Summary - **Compact HTML:** each run of whitespace in the rendered email collapses to one newline or space (`<pre>` excepted). The classic theme's indentation was ~75% of the email; a real 6-movie, 6-show email goes from 88 KB to ~22 KB, well under Gmail's ~102 KB clip, leaving room for summaries and a higher `max_displayed_items` (6/section with summaries: 28 KB; 20/section: 76 KB). - **Inbox preview line:** the classic theme's empty hidden preheader now says e.g. "3 new movies and 5 new shows", counting items beyond the cap. Strings for all ten languages live in new `i18n/fork.<lang>.toml` files, out of upstream's Crowdin files. - 1.6.0: VERSION, CHANGELOG, CLAUDE.md notes. ## Test plan - [x] `go vet`, unit tests, golangci-lint v2.14: 0 issues - [x] New tests fail with the hooks removed (compaction, preheader) - [x] Integration test (`-tags integration`) passes from the cassettes - [x] Real-library sends into a local Mailpit (no relay): sizes above, SpamAssassin -1.0 (no rule hits beyond ALL_TRUSTED/0-point), rendered layout unchanged 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Compact the email HTML and fill the inbox preview line (1.6.0)
All checks were successful
CI / gate (pull_request) Successful in 1m4s
CI / lint (pull_request) Successful in 56s
CI / image (pull_request) Has been skipped
72f3683675
About three quarters of the rendered email was the classic theme's
indentation, and Gmail clips an email whose HTML passes ~102 KB, which
is why the homelab capped each section at 6 items with no summaries.
BuildNewMediaEmailHTML now collapses each whitespace run to one newline
or space (template/compact_html.go, <pre> excepted). Mail clients render
that the same; the test checks the rendered classic theme loses only
whitespace. A real 6+6 email went from 88 KB to about 22 KB.

The theme's hidden preheader was empty, so inbox lists showed "New on
the server ..." after the subject. It now carries "3 new movies and 5
new shows" (template/preview_text.go), counting items beyond the cap.
The strings live in new i18n/fork.<lang>.toml files for all ten
languages, keeping them out of upstream's Crowdin-managed files.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
joeyr merged commit ab90b47702 into main 2026-10-05 23:56:05 -05:00
joeyr deleted branch email-compact-preview 2026-10-05 23:56:05 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
joeyr/jellyfin-newsletter!15
No description provided.