Commit Graph

24 Commits

Author SHA1 Message Date
Bendt
09d4bc18d7 feat: Scrollable envelope header with proper To/CC display
- Refactor ContentContainer to Vertical layout with fixed header + scrollable content
- Change EnvelopeHeader to ScrollableContainer for long recipient lists
- Parse headers from message content (fixes empty To: field from himalaya)
- Strip all email headers, MIME boundaries, base64 blocks from body display
- Add 22 unit tests for header parsing and content stripping
- Cancelled meeting emails now render with empty body as expected
2025-12-29 14:15:21 -05:00
Bendt
279beeabcc fix: Mount header widget and add 'm' keybinding for toggle mode
- Header widget was created but never mounted in compose()
- Added 'm' keybinding for toggle_mode (switch markdown/HTML view)
2025-12-29 10:58:34 -05:00
Bendt
16995a4465 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
2025-12-29 10:53:19 -05:00
Bendt
a0057f4d83 fix: Correct HelpScreen instantiation
- Fix missing app_bindings argument
- Pass self.BINDINGS list to HelpScreen constructor
- Help screen now works without crash
2025-12-28 13:35:26 -05:00
Bendt
977c8e4ee0 feat: Add comprehensive help screen modal
- Create HelpScreen with all keyboard shortcuts
- Add hardcoded sections for instructions
- Add binding for '?' key to show help
- Support ESC/q/? to close help screen
- Document notification compression feature in help
- Format help with colors and sections (Navigation, Actions, View, Search)

Features:
- Shows all keyboard shortcuts in organized sections
- Quick Actions section explains notification compression
- Configuration instructions for mail.toml
- Modal dialog with close button
- Extracts bindings automatically for display
2025-12-28 13:33:09 -05:00
Bendt
5f3fe302f1 fix: Fix runtime errors in mail app
- Fix envelopes list access: use index with bounds checking instead of .get()
- Add missing 'Any' type import to ContentContainer
- App now starts successfully without NameError or AttributeError
2025-12-28 12:52:23 -05:00
Bendt
1c1b86b96b feat: Add notification email compression feature
Add intelligent notification email detection and compression:
- Detect notification emails from GitLab, GitHub, Jira, Confluence, Datadog, Renovate
- Extract structured summaries from notification emails
- Compress notifications into terminal-friendly markdown format
- Add configuration options for notification compression mode

Features:
- Rule-based detection using sender domains and subject patterns
- Type-specific extractors for each notification platform
- Configurable compression modes (summary, detailed, off)
- Integrated with ContentContainer for seamless display

Files added:
- src/mail/notification_detector.py: Notification type detection
- src/mail/notification_compressor.py: Content compression

Modified:
- src/mail/config.py: Add notification_compression_mode config
- src/mail/widgets/ContentContainer.py: Integrate compressor
- src/mail/app.py: Pass envelope data to display_content
- PROJECT_PLAN.md: Document new feature
2025-12-28 10:49:25 -05:00
Bendt
d6e10e3dc5 Add calendar invite actions to mail app with A/D/T keybindings
- Add calendar_invite.py with detect/find/respond functions for calendar invites
- Keybindings: A (accept), D (decline), T (tentative)
- Searches Graph API calendarView to find matching event by subject
- Responds via Graph API POST to event/{id}/accept|decline|tentativelyAccept
2025-12-19 16:51:40 -05:00
Bendt
9f596b10ae Add folder message counts to mail app sidebar 2025-12-19 16:24:56 -05:00
Bendt
994e545bd0 Add toggle read/unread action with 'u' keybinding in mail app 2025-12-19 16:18:09 -05:00
Bendt
39a5efbb81 Add 'r' keybinding to refresh mail message list 2025-12-19 16:16:12 -05:00
Bendt
9a2f8ee211 Add search autocomplete and fix search state restoration
- Add SuggestFromList with Himalaya keywords for search input autocomplete
- Cache and restore metadata_by_id when cancelling search (fixes navigation)
- Set search_mode=True when opening panel for consistent Escape behavior
- Fix SearchPanel CSS vertical alignment with explicit heights
2025-12-19 15:33:42 -05:00
Bendt
5deebbbf98 Fix search stability and improve Escape key behavior
- Add bounds check in _mark_message_as_read to prevent IndexError
- Clear metadata_by_id when search returns no results
- Escape now focuses search input when in search mode instead of exiting
- Add focus_input() method to SearchPanel
2025-12-19 15:10:50 -05:00
Bendt
a5f7e78d8d Fix IndexError when pressing Escape to exit search mode
Add bounds check in refresh_list_view_items() to handle cases where
ListView and message_store.envelopes are temporarily out of sync
during transitions (e.g., when exiting search mode).
2025-12-19 14:54:40 -05:00
Bendt
f56f1931bf Fix IndexError when selecting search results
The search header was being added to ListView but not to message_store.envelopes,
causing an index mismatch when marking messages as read. Now the search header
is included in the envelopes list and metadata_by_id is properly updated so
indices align between ListView and the message store.
2025-12-19 14:52:00 -05:00
Bendt
bbc53b4ce7 Add Himalaya search integration tests and fix 0 results display
- Add test mailbox with 5 sample emails for integration testing
- Add himalaya_test_config.toml for local Maildir backend testing
- Create 12 integration tests covering search by from/to/subject/body
- Fix search results display to clear list and show message when 0 results
- Add clear_content() method to ContentContainer widget
2025-12-19 14:42:10 -05:00
Bendt
8be4b4785c Add live search panel with debounced Himalaya search and help modal 2025-12-19 14:31:21 -05:00
Bendt
0cd7cf6984 Implement mail search using Himalaya CLI with auto-select first result 2025-12-19 14:18:40 -05:00
Bendt
be2f67bb7b Fix TUI bugs: folder selection, filter stability, UI consistency
- Mail: Fix folder/account selector not triggering reload (use direct
  fetch instead of reactive reload_needed flag)
- Tasks: Store all_projects/all_tags on mount so filters don't change
  when filtering; add OR search for multiple tags
- Sync: Use rounded borders and border_title for sidebar/activity log
- Calendar: Remove padding from mini-calendar, add rounded border and
  border_title to invites panel
2025-12-19 11:24:15 -05:00
Bendt
25385c6482 Add search functionality to Mail TUI with / keybinding
- Add reusable SearchScreen modal and ClearableSearchInput widget
- Implement filter_by_query in MessageStore for client-side filtering
- Search matches subject, sender name/email, recipient name/email
- Press / to open search, Escape to clear search filter
- Shows search query in list subtitle when filter is active
2025-12-19 11:01:05 -05:00
Bendt
d4226caf0a Complete Phase 1: parallel sync, IPC, theme colors, lazy CLI loading
- Sync: Parallelize message downloads with asyncio.gather (batch size 5)
- Sync: Increase HTTP semaphore from 2 to 5 concurrent requests
- Sync: Add IPC notifications to sync daemon after sync completes
- Mail: Replace all hardcoded RGB colors with theme variables
- Mail: Remove envelope icon/checkbox gap (padding cleanup)
- Mail: Add IPC listener for refresh notifications from sync
- Calendar: Style current time line with error color and solid line
- Tasks: Fix table not displaying (CSS grid to horizontal layout)
- CLI: Implement lazy command loading for faster startup (~12s to ~0.3s)
- Add PROJECT_PLAN.md with full improvement roadmap
- Add src/utils/ipc.py for Unix socket cross-app communication
2025-12-19 10:29:53 -05:00
Bendt
a41d59e529 WIP 2025-12-18 22:11:47 -05:00
Bendt
0ed7800575 add new tasks 2025-12-18 15:40:03 -05:00
Bendt
fe65183fb7 move and rename module 2025-12-18 14:00:54 -05:00