fix: prevent HTML email content from being cut off (#288) #292

Merged
guettlibot merged 3 commits from issue-288-fix into main 2026-05-27 17:52:15 +00:00
guettlibot commented 2026-05-27 17:51:40 +00:00 (Migrated from codeberg.org)

Summary

  • HTML emails with fixed-width tables (e.g. <table width="600">) were being cut off on the right because the WebView's viewport is narrower than the table
  • Added overflow-x: hidden to body and max-width: 100% on all elements to prevent overflow
  • Forced table { width: 100%; } so fixed-pixel-width email tables reflow to fit the viewport
  • Added td/th { overflow-wrap/word-break } for text wrapping in table cells
  • Added pre { white-space: pre-wrap; } so preformatted text wraps instead of stretching the page

Test plan

  • New unit test prevents horizontal overflow so wide HTML emails are not cut off verifies all four CSS rules are injected into the email HTML
  • All 476 tests continue to pass (task check-fast via pre-commit hook)

🤖 Generated with Claude Code

## Summary - HTML emails with fixed-width tables (e.g. `<table width="600">`) were being cut off on the right because the WebView's viewport is narrower than the table - Added `overflow-x: hidden` to body and `max-width: 100%` on all elements to prevent overflow - Forced `table { width: 100%; }` so fixed-pixel-width email tables reflow to fit the viewport - Added `td/th { overflow-wrap/word-break }` for text wrapping in table cells - Added `pre { white-space: pre-wrap; }` so preformatted text wraps instead of stretching the page ## Test plan - [x] New unit test `prevents horizontal overflow so wide HTML emails are not cut off` verifies all four CSS rules are injected into the email HTML - [x] All 476 tests continue to pass (`task check-fast` via pre-commit hook) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.