feat: Add invite compressor and compressed header display

- Add InviteCompressor for terminal-friendly calendar invite summaries
- Add test fixtures for large group invite and cancellation emails
- Compress To/CC headers to single line with '... (+N more)' truncation
- Add 'h' keybinding to toggle between compressed and full headers
- EnvelopeHeader now shows first 2 recipients by default
This commit is contained in:
Bendt
2025-12-29 10:53:19 -05:00
parent db58cb7a2f
commit 16995a4465
6 changed files with 693 additions and 6 deletions

View File

@@ -914,6 +914,17 @@ class EmailViewerApp(App):
"""Scroll the main content up by a page."""
self.query_one("#main_content").scroll_page_up()
def action_toggle_header(self) -> None:
"""Toggle between compressed and full envelope headers."""
content_container = self.query_one("#main_content", ContentContainer)
if hasattr(content_container, "header") and content_container.header:
content_container.header.toggle_full_headers()
# Provide visual feedback
if content_container.header.show_full_headers:
self.notify("Showing full headers", timeout=1)
else:
self.notify("Showing compressed headers", timeout=1)
def action_toggle_main_content(self) -> None:
"""Toggle the visibility of the main content pane."""
self.main_content_visible = not self.main_content_visible