Skip to content

File the open thread with the rest of the web's keys - #410

Merged
monorkin merged 1 commit into
mainfrom
thread-filing-keys
Sep 8, 2026
Merged

File the open thread with the rest of the web's keys#410
monorkin merged 1 commit into
mainfrom
thread-filing-keys

Conversation

@monorkin

@monorkin monorkin commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Finishes what #349 starts. A thread on screen answered to a, l and t; the web app's topic toolbar keeps every filing key live while a topic is open, so u, i, d, p, b and v now work there too.

This is the same customer report as #349, from the other direction: the card behind it is [HEY TUI] Missing actions in bundles + Trash unavailable.

Why this shape rather than a menu

#358 proposed an m More menu for the same actions. HEY web has that menu, but it is for the mouse. Its shortcuts are github/hotkey, whose fireDeterminedAction calls element.click() with no visibility check, so the keys bound inside the menu fire without it ever opening. On the web you press t, not m then t. This PR matches that.

Closes #358.

The three kinds of change

The moves were wiring, not writing. postingAction has handled u, i, d and p since the list gained them. The thread's key switch simply never named them, and unlike the list's it has no default, so anything unnamed reaches the viewport and scrolls.

The pickers needed pointing. startFolderPicker and startMove both read the list's selection, which is not the thread's row once the automatic mark-seen has resorted it under the cover. They now take actionPosting(), and answer to fileablePosting()'s rule: a thread with no row to file gets the notice the filing keys already give, rather than a picker aimed at wherever the cursor has landed.

Mark unseen needed the snapshot kept in step. Opening an unseen thread marks it seen, and the snapshot the thread files on is taken before that lands. So u measured against a stale row and refused, saying the thread it had just marked seen was already unseen.

Left out on purpose

Spam, ignore and collections, because the web leaves them out of an open thread too — they are in the More menu with no key of their own. Mark seen, because opening the thread has already done it. Bubble up has no action in the TUI at all, so it is a feature rather than a key.

Not covered here

The card's other half. A thread opened from a bundle still refuses to file, because fileablePosting() refuses it. Worth knowing that the web does not: an open topic carries the full toolbar however you reached it, which is why the customer reports the actions working there. That is a deliberate decision in #371 and changing it is @jeremy's call, so I have left it alone.

Checks

make check passes. The snapshot fix is mutation-checked: removing it fails TestMailViewMarksTheOpenThreadUnseen.

Stacked on #349, so the diff shows that commit too until it merges.

A thread on screen answered to a, l and t. The web app's topic toolbar keeps
every filing key live while a topic is open, so u, i, d, p, b and v now
work there too.

The moves needed wiring rather than writing: postingAction has handled
all four since the list gained them, and the thread's key switch simply
never named them. It has no default the way the list's does, so anything
unnamed reaches the viewport and scrolls.

The two pickers needed more. Both read the list's selection, which is not
the thread's row once the automatic mark-seen has resorted it under the
cover, so they take the posting from actionPosting and answer to
fileablePosting's rule: a thread with no row to file gets the notice the
filing keys already give rather than a picker aimed at whatever the
cursor has landed on.

Marking unseen needed the snapshot kept in step. Opening an unseen thread
marks it seen, and the snapshot is taken before that lands, so u measured
against a stale row and said the thread it had just marked seen was
already unseen.

Left out, because the web leaves them out of an open thread too: spam,
ignore, and collections. Mark seen is left out because opening the thread
has already done it. Trash landed separately in #349.

Closes #358
@monorkin
monorkin merged commit 5a6f97f into main Sep 8, 2026
23 checks passed
@monorkin
monorkin deleted the thread-filing-keys branch September 8, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant