Open a thread on its latest message - #524
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approved
The focused implementation, tests, and documentation consistently support the intended navigation behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Updates the TUI to open threads at their newest message, reducing unnecessary scrolling.
Changes:
- Positions the thread viewport at the latest entry.
- Tests latest-entry opening and backward navigation.
- Documents
j/kmessage navigation.
[!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/mail.go |
Opens threads at the newest entry offset. |
internal/tui/mail_test.go |
Verifies initial position and k navigation. |
docs/tui.md |
Documents the updated behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhh
force-pushed
the
tui-open-thread-on-latest-message
branch
from
September 29, 2026 19:53
a65d44c to
f12d108
Compare
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 thread in the TUI used to open at its top, so on a long conversation the reader had to scroll past everything they'd already read to reach the reply that brought them there.
showLatestEntryininternal/tui/mail.go).ksteps back through earlier messages andjforward again. If the last message is short, the end of the one above it shows too, because the viewport can't scroll past the end of the thread.seencovers the thread as a whole. The latest message is where new mail arrives. Opening on the first unread would need HEY and the SDK to expose per-entry read state.docs/tui.mdgets one line. A new test opens a three-message thread throughtopicLoadedMsgand checks it lands on the last message, withkgoing back one.🤖 Generated with Claude Code