Repository navigation
Show delivery and recipient addresses in mail views and Screener previews - #643
WhiskeyTuesday wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
On short terminals, fixed headers can consume all available rows while the layout still reserves a body row, causing the preview to exceed its allotted height.
1 open issue
What changed in this PR
Adds delivery and recipient context to hey-cli’s TUI thread views and Screener previews, helping users identify which address received a message and who else was included.
Changes:
- Retains exact delivery addresses, including plus-tags and aliases, alongside recipient metadata.
- Displays nonempty
Via,To,Cc, andBccheaders and adds sender addresses to thread headings. - Adds regression tests and updates user and architecture documentation.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
internal/tui/screener_test.go |
Adds recipients and delivery addresses to the preview fixture. |
internal/tui/screener_preview.go |
Loads and displays envelope headers in previews. |
internal/tui/screener_preview_test.go |
Tests envelope display and loading behavior. |
internal/tui/mail.go |
Retains envelope metadata and renders expanded message headings. |
internal/tui/mail_test.go |
Tests metadata retention, sender formatting, and envelope rendering. |
internal/tui/envelope.go |
Adds shared recipient formatting and header truncation. |
internal/mail/entry.go |
Extracts recipients and exact delivery addresses into mail entries. |
internal/mail/entry_test.go |
Tests envelope extraction and missing-message behavior. |
docs/tui.md |
Documents headers in threads and Screener previews. |
docs/architecture/threads-and-replies.md |
Updates the TUI’s metadata-retention documentation. |
Review effort: Balanced
There was a problem hiding this comment.
All reported issues were addressed across 10 files
Reply to a comment to ask cubic a question or push back. It learns from your replies.
View guided diff | Re-trigger cubic
|
Addressed the review feedback in 832ad33. On short terminals, preview headers now scroll with the message so all delivery and recipient addresses remain accessible. Long sender headings are truncated to fit beside the date, and the recipient test now guards against missing entries. Added layout regression tests; |

The TUI now shows
Via,To,CcandBccwhen reading a message and, crucially, in the Screener preview. Empty fields are omitted.Viapreserves the exact address the message arrived through, including plus-tags and catch-all aliases.Knowing who sent a message is only part of deciding what to do with it. With multiple HEY for Domains accounts, or forwarding from several domains, the destination address provides essential context. In the Screener, seeing where a message was intended to go—and who else was included—helps inform the decision to accept or reject a sender.
HEY’s web interface already exposes this information; this brings that context into the TUI.
The change also displays sender addresses alongside names in the mail view, adjusts Screener preview layout for the additional headers, and adds regression tests and documentation.
Summary by cubic
The TUI thread view and Screener preview now show a message's delivery and recipient addresses, not just its sender.
Via,To,Cc, andBcclines appear under the From line; empty lines are omitted.Viakeeps the exact address mail arrived through — plus-tags and catch-all aliases included — and only shows for inbound mail.Name <address>, including mail you sent; an alternative sender name keeps just the name.Written for commit 832ad33. Summary will update on new commits.
The PR appears safe to merge, with a non-blocking layout issue in short Screener windows.
Findings
Fix with agent prompt
Summary
Shows delivery and recipient addresses in opened threads and Screener previews.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[SDK message] --> B[Thread loader retains addresses] B --> C[mail.Entry] A --> D[Screener preview] C --> E[Shared address formatting] D --> E E --> F[Via, To, Cc and Bcc rows]Reviews (1) · Last reviewed commit: "Show Via, To, Cc and Bcc when reading ma..." · Reviewed by Greptile