Return to the list after sending a reply or forward from a thread - #525
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The topic-mismatch safeguard needs regression coverage to ensure a different open thread is never closed.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Returns users to their originating mail list after successfully replying to or forwarding a thread.
Changes:
- Tracks the originating thread on compose forms.
- Closes matching threads after successful sends.
- Updates 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/mail.go |
Exits the originating thread after successful sends. |
internal/tui/compose.go |
Records the reply or forward’s thread ID. |
internal/tui/compose_test.go |
Tests successful and failed thread sends. |
docs/tui.md |
Documents the updated navigation behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // A reply or a forward finishes with the thread it was written from, the way | ||
| // the web app sends you back to the box: the reader lands on the list they | ||
| // opened the thread from — the Imbox, a search, a bundle — ready for the next. | ||
| if v.inThread && form.topicID != 0 && form.topicID == v.topicID { |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhh
force-pushed
the
tui-return-to-list-after-reply
branch
from
September 29, 2026 19:58
f577a59 to
0fc5ed6
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.

Sending a reply or forward from inside a thread used to close the form and leave the reader in the thread. HEY's web app sends you back to the box instead, which is where the next thing to deal with is.
composeForm.topicID, set from the context message). ThecomposeSentMsghandler exits the thread only if that thread is still the one open, so a thread left or switched while the send was in flight is left alone.TestForwardCompletionIsSaidFromInsideAThreadasserted that the thread stayed on screen; it's nowTestForwardFromAThreadReturnsToTheList. New tests cover a reply returning to the list and a failed reply staying in the thread.docs/tui.mdgets one line.🤖 Generated with Claude Code