Skip to content

File the open thread to Set Aside and Reply Later with a and l - #371

Merged
jeremy merged 6 commits into
mainfrom
thread-file-actions
Sep 1, 2026
Merged

File the open thread to Set Aside and Reply Later with a and l#371
jeremy merged 6 commits into
mainfrom
thread-file-actions

Conversation

@jeremy

@jeremy jeremy commented Aug 31, 2026

Copy link
Copy Markdown
Member

Customer report on CLIs card 10240722474: Set Aside (a) and Reply Later (l) "not doing anything" in the TUI.

The list keys work (confirmed on the card for postings and bundles), but the web app's topic toolbar keeps its filing hotkeys live while a thread is on screen (app/views/topics/toolbars/_action_bar.html.erb binds l,L and a,A document-wide), so a web reader's habit is to press a/l with the email open — and in the TUI thread view those keys fell through to the viewport and silently scrolled.

Now a/A/l from an open thread route through the same posting action the list uses, when the thread was opened from a list that files (a box or Previously Seen):

  • The action fires on the thread's own posting row; the reader stays on the thread, the way the web app stays on the topic, with the usual "Thread moved to …" toast and the list updated behind.
  • Search results, bundles, and directly opened topics have no posting row to act on (the guard checks the selected row's topic against the open thread), so the key answers with a notice — "Can't file this thread from here" — instead of silence, which was the complaint.
  • The thread help advertises l reply later / a set aside only where they work.

Scope stays on the card's two keys: the rest of the list's action set (e, u, d, t, …) is left alone because u/d are the viewport's half-page scroll keys in the open thread, so extending filing there is a keymap decision, not a bug fix.

TMPDIR=/tmp/t make check green.


Summary by cubic

Fixes a (Set Aside) and l (Reply Later) in the TUI thread view, which previously fell through to the viewport and silently scrolled. The keys now file the open thread the same way they do on the list, keeping the reader on the thread with the usual toast.

Details

  • Filing routes through the posting the thread was opened from, snapshotted at open so the mark-seen resort or a live refresh dropping the row can't lose it; search results, bundles, and directly opened topics show a notice instead of silence.
  • Filing measures against the box the open thread now lives in, so moving a thread and filing again lands it back rather than answering "Already in ...".
  • Filing the thread back into the box on screen re-reads that box's head so the row returns to the list.
  • Only the latest filing records where the thread landed when keys are pressed faster than their requests answer, so out-of-order responses can't file past where the server put it.
  • The thread help only advertises the keys where they work.
  • The rest of the list action set is untouched because u/d are the viewport's half-page scroll keys in the open thread.

Written for commit 0224bde. Summary will update on new commits.

Review in cubic

The web app's topic toolbar keeps its filing hotkeys live while a thread is
on screen, so readers press a and l with an email open — and in the TUI those
keys silently scrolled the viewport instead. Route a/A/l from the open thread
through the same posting action the list uses, when the thread was opened
from a list that files (a box or Previously Seen). Search results, bundles,
and directly opened topics have no posting row to act on, so the key answers
with a notice instead of silence, and the thread help advertises the keys
only where they work.
Copilot AI balanced review requested due to automatic review settings August 31, 2026 23:11
@jeremy
jeremy requested a review from a team as a code owner August 31, 2026 23:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T00:19:05.125260Z 0224bde New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables Set Aside and Reply Later actions while viewing an open TUI thread.

Changes:

  • Routes a/A/l through posting actions.
  • Adds contextual help and regression 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 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
internal/tui/mail.go Adds open-thread filing and help bindings.
internal/tui/mail_test.go Tests filing, guards, and help.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/tui/mail.go Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 229851f0bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/tui/mail.go Outdated
The mark-seen that opening an unseen thread triggers can resort the list and,
with a cover configured, slide the row under the art and clamp the cursor onto
another row — so a cursor-based guard rejected a and l in exactly the reported
case. Carry the posting id the thread was opened from and file on that row by
id, wherever the list has settled it.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c667cca618

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/tui/mail.go Outdated
A live refresh whose head no longer returns the opened row takes it out of
the list entirely — refreshHead removes the old head row rather than merely
resorting it — so the by-id lookup came up empty while the thread was still
on screen. Snapshot the posting when the thread opens and file on that,
independent of whatever the list has since done with the row.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c740c3a105

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/tui/mail.go Outdated
A move keeps the thread on screen, so a second filing key was still compared
against the list under it: file a Set Aside thread to Reply Later and a then
answered "Already in Set Aside" while the server had it in Reply Later. Pass
the box kind a posting files out of down to the move — the list's own box for
a row, the tracked kind for the open thread — and follow the thread's kind as
successful moves land it somewhere new.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f38ff8afa7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/tui/mail.go Outdated
Filing keys pressed faster than their requests answer complete in whatever
order the responses arrive, so the last response could record a box the
server had already filed past. Stamp each open-thread filing with a dispatch
sequence and record the landing box only from the latest one — a failed or
superseded move records nothing.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4748bed77

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/tui/mail.go
Comment thread internal/tui/mail.go
Comment thread internal/tui/mail.go

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread internal/tui/mail.go
Comment thread internal/tui/mail.go
Filing the open thread out and back — Set Aside to Reply Later and home
again — removed its row on the way out, and the return had nothing to
reinsert, leaving the on-screen list missing a thread the server holds.
When a move lands in the box on screen and the row is gone, re-read the
head through the live-refresh lane instead of reconstructing the row from
a stale snapshot.
@jeremy
jeremy merged commit cb0becd into main Sep 1, 2026
23 checks passed
@jeremy
jeremy deleted the thread-file-actions branch September 1, 2026 00:40
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.

2 participants