Give the thread view the HEY apps' More menu - #358
Open
jwahdatehagh wants to merge 2 commits into
Open
Conversation
m over an open thread swaps the help bar for the More menu the HEY apps have: Forward, Label, Move and Trash, each behind the key the same action answers to on the list, q or esc to put the bar back. The thread stays on screen and keeps scrolling underneath. The actions aim at the posting the thread was opened from, so they work wherever the thread came from - a box, search results, a bundle or Previously Seen. Trashing (or moving) the open thread closes the thread view once the server has confirmed it, landing the reader back on the list they came from with the row already gone.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a thread-level More menu to perform posting actions without returning to the mail list.
Changes:
- Adds forward, label, move, and trash actions to open threads.
- Preserves posting context across live refreshes and handles action completion.
- Adds extensive More-menu tests.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
internal/tui/more_menu.go |
Implements the More menu and key routing. |
internal/tui/mail.go |
Integrates thread actions, posting snapshots, and completion handling. |
internal/tui/mail_test.go |
Tests menu behavior and edge cases. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+2390
to
+2394
| func (v *mailView) menuOrganizes() bool { | ||
| if v.searchActive { | ||
| return false | ||
| } | ||
| return !v.bundleActive || v.bundleContactID == 0 |
Comment on lines
+2379
to
+2383
| if live := v.openedPosting(v.topicPosting.ID); live != nil { | ||
| posting := *live | ||
| v.topicPosting = &posting | ||
| } | ||
| v.openModal(newMoreMenu(*v.topicPosting, v.menuOrganizes())) |
The More menu builds its label picker off the posting the thread was opened from, and that snapshot is the only copy left once a live re-read has carried the row out of the list - which is the whole reason it is kept. A label filed or removed from the menu never reached it: the completion re-read the box list and nothing else. Reopening the picker then showed a label the thread already carries as unchecked, and enter filed it a second time instead of removing it. The completion now carries the posting and the label it moved, the way the collection one already does, and lays that change onto every copy still in hand - the thread's retained posting and the row on whichever list holds it, which also covers the bundle and Previously Seen lists that are never re-read. A created label is known only by its name until the source reload hands back its ID, so a label without one matches on its name. Tests: labelling from the menu with the row gone leaves the reopened picker offering to remove the label rather than file it again, for both a filed and a freshly created one. Two more cover the menu over bundles, which nothing reached before - label and move offered inside an unseen bundle, withheld over a contact's threads.
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.
In the TUI there was no way to trash (or label, move, forward) a thread without first going back to the list. This adds the More menu the HEY apps have to the thread view.
What it does
mover an open thread swaps the help bar for the menu:f forward • b label • v move • t trash • esc/q back. The thread stays on screen, and every thread key keeps its meaning while the menu is up (j/k, attachments,r, scrolling all route through the thread's own key handling).Edge cases covered (each with a test)
mopens the menu: uppercaseMis the global Mail-section shortcut and never reaches the thread.make checkpasses.Summary by cubic
Adds the HEY apps' More menu to the thread view, so
mover an open thread swaps the help bar for Forward, Label, Move, and Trash (esc/qgoes back) while the thread stays on screen.Written for commit 6694a96. Summary will update on new commits.