Preview a sender's email in The Screener with space - #529
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Theme refresh and narrow-header layout defects can leave the preview incorrectly rendered.
Review effort: Balanced
Findings: 2
Open (3)
What changed in this PR
Adds full-message previews to The Screener so users can review an email before screening its sender.
Changes:
- Adds preview loading, rendering, scrolling, closing, and screening controls.
- Preserves sender identity during live queue refreshes.
- Adds tests and TUI 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.go |
Integrates preview state and controls. |
internal/tui/screener_preview.go |
Implements preview loading and rendering. |
internal/tui/screener_test.go |
Adds preview API fixture. |
internal/tui/screener_preview_test.go |
Tests preview behavior and edge cases. |
docs/tui.md |
Documents preview controls. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+258
to
+260
| func (v *screenerView) Restyle() { | ||
| if v.preview != nil { | ||
| v.preview.width = 0 |
Comment on lines
+140
to
+143
| b.WriteString(truncateStr(" "+name, width)) | ||
| if row.trailing != "" { | ||
| b.WriteString(styleMuted.Render(" " + row.trailing)) | ||
| } |
|
|
||
| Space opens a bigger preview of the selected sender's most recent email: the whole message, | ||
| not just the first line the list has room for. Arrow keys and PgUp/PgDn scroll it, `y` and | ||
| `n` answer for that sender straight from it, and Space or Escape closes it again. Opening a |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhh
force-pushed
the
tui-screener-preview
branch
from
September 29, 2026 20:14
f01312f to
218f107
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


A row in The Screener only has room for the subject and the first line of what the sender wrote, which often isn't enough to decide. Space now opens a bigger preview.
j/kand PgUp/PgDn scroll it.y/iandnanswer for the sender being previewed and close it. Space, Escape andqclose it and leave you in The Screener. The help bar changes to match, and the queue's help bar offers "space preview".Messages().Getof the clearance'smost_recent_entry(the row now keepsentryID). It only reads, so it doesn't screen the sender or tell them anything. I checked against a live account: a still-unscreened sender's email reads in full, and the Screener still held the same four senders afterwards.screennow calls a newscreenRow, so an answer from the preview goes to the previewed sender, not to whoever a live re-read has since put under the cursor.docs/tui.mddescribes it. New tests cover opening, the three ways to close, answering from the preview, a late answer after closing, a sender with nothing to preview, the history tab, and scrolling with the header in place.🤖 Generated with Claude Code