Apply seen and unseen actions to selected threads in the TUI
- Dominant language
- Go
- Stars
- 368
- Forks
- 44
- Avg merge
- 15h 15m
- Merged PRs (30d)
- 189
Description
## Current behavior
Space selects multiple threads in the mail list, but most actions still apply only to the thread under the cursor.
For example:
1. Select several threads with Space.
2. Press `e`.
Only the highlighted thread is marked seen. The other threads remain selected.
This makes Space look like general multi-selection even though the selection is currently used only by `Ctrl+B` for bulk reply.
## Proposed behavior
Treat a non-empty Space selection as a selection mode with a small set of supported actions:
- `e` marks all selected threads seen.
- `u` marks all selected threads unseen.
- `Ctrl+B` starts a bulk reply.
- Space toggles the thread under the cursor.
- Escape clears the selection.
The help bar could show:
`3 selected • e seen • u unseen • ctrl+b bulk reply • space toggle • esc clear`
Other mail actions should not run while selection mode is active. If someone presses an unsupported key, the TUI could leave the mail unchanged and show:
`3 threads selected — choose a bulk action or press Esc to clear`
After a successful action, the TUI should clear the selection and refresh the current box. If the action fails, it should keep the selection so the user can retry.
Existing Escape behavior should keep priority. An open modal should close first, a pending request should cancel first, and a thread should close first. Escape would clear the selection only from the normal mail list.
## Scope
The existing SDK already accepts multiple posting IDs for seen and unseen, so this should not need server or SDK changes.
This proposal does not add bulk move, trash, spam, ignore, labels, or collections. Those actions have different safety and confirmation needs and can be considered separately.
Would this be a good direction for Space selection in the TUI?
Contributor guide
Research direction
Start by tracing the TUI mail-list selection handling and the existing Ctrl+B bulk-reply flow, then inspect the SDK calls that accept multiple posting IDs for seen and unseen actions. Done means selected threads respond to e, u, Ctrl+B, Space, and Escape as described, unsupported actions leave mail unchanged, successful actions clear and refresh the selection, and failures preserve it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 57/100