Skip to content

Open Previously Seen on its own screen with 9 - #342

Merged
robzolkos merged 3 commits into
mainfrom
previously-seen-screen
Aug 26, 2026
Merged

Open Previously Seen on its own screen with 9#342
robzolkos merged 3 commits into
mainfrom
previously-seen-screen

Conversation

@monorkin

Copy link
Copy Markdown
Collaborator

From a customer report (HEY CLI card 10240722474): the web app's 9 jumps to Previously Seen, and the TUI had no answer to it — nor any way to see what a covered Imbox hides without lifting the cover.

What this does

Previously Seen gets a screen of its own, backed by HEY's route for it, which orders threads by when they were seen — an ordering the Imbox's own pages don't offer.

  • Its own tab in the box row, just before Labels, with the 9 shortcut. The arrows walk through it both ways, the box's own number or esc lands back on the list the screen was opened over, and the screen opens the moment the tab is stepped on — spinner while the first page loads, like a box switch — so the ribbon reads on past it to Labels instead of ringing the fetch twice.
  • Every thread action works there: reply, forward, move, labels, collections, and the triage keys. Actions read their selection from the screen's list and file out of the Imbox — whose threads these are whatever source the screen was opened over — so i says "Already in Imbox" and the move picker doesn't offer it. A thread moved out, trashed, marked spam or marked unseen is not previously seen any more: it leaves the screen and the list refills from below.
  • The list grows as the reader scrolls, following the cursor out of next_history_url back into the seen route — the URL names /imbox, but its cursor belongs to the seen ordering, so it never goes back to the box.
  • Action results carry where they were taken, so one completing after the screen closed lands nowhere instead of mangling the box list.

Depends on

basecamp/hey-sdk#129 (GetImboxSeen). Draft until that ships — the last commit points go.mod at a local SDK checkout and gets dropped for a pin on the released version (plus the usual nix vendorHash refresh).

The web app's 9 jumps to Previously Seen; the TUI now gives those
threads a screen of their own, on HEY's own route for them, ordered by
when they were seen. The tab sits in the box row just before Labels,
the arrows walk through it, and the box's own number or esc lands back
on the list it was opened over. A covered Imbox hides its seen threads;
this screen is the way to look at them.

Every thread action works there — reply, forward, move, labels,
collections, and the triage keys — reading its selection from the
screen's list and filing out of the Imbox, which is whose threads these
are whatever source the screen was opened over. A thread moved out,
trashed, marked spam or marked unseen is not previously seen any more,
so it leaves the screen and the list refills from below.

The screen opens before its first page answers, the way a box switch
does: the tab is selected there and then, so the ribbon reads on past
it to Labels rather than asking for the screen again.
@robzolkos
robzolkos marked this pull request as ready for review August 26, 2026 17:32
@robzolkos
robzolkos requested a review from a team as a code owner August 26, 2026 17:32
Copilot AI balanced review requested due to automatic review settings August 26, 2026 17:32

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

Adds a dedicated, paginated Previously Seen TUI screen using HEY’s typed SDK endpoint.

Changes:

  • Adds 9 shortcut and subnavigation for Previously Seen.
  • Supports navigation, pagination, and thread actions.
  • Adds SDK paging integration, tests, and README documentation.

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 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Documents Previously Seen navigation.
internal/tui/tui_test.go Updates subnavigation test.
internal/tui/mail.go Implements the screen, navigation, paging, and actions.
internal/tui/mail_test.go Tests Previously Seen behavior.
internal/tui/content.go Generalizes list-row removal.
internal/tui/collections_test.go Updates collection navigation tests.
internal/mail/page.go Adds typed Previously Seen paging.
internal/mail/page_test.go Tests endpoint and cursor handling.
go.mod Adds a local SDK replacement.
go.sum Removes the previous SDK checksums.

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

Comment thread go.mod Outdated
Comment thread internal/mail/page.go
Comment thread internal/tui/mail.go
@robzolkos
robzolkos force-pushed the previously-seen-screen branch from edf15d7 to 0c7315b Compare August 26, 2026 17:39
@robzolkos
robzolkos force-pushed the previously-seen-screen branch from 0c7315b to 31140a3 Compare August 26, 2026 18:54
@robzolkos

Copy link
Copy Markdown
Collaborator

Addressed the review feedback: the PR now uses the published SDK, documents the typed Previously Seen endpoint, and supports selection and bulk replies from the Previously Seen screen.

@robzolkos
robzolkos merged commit eac1cfa into main Aug 26, 2026
33 checks passed
@robzolkos
robzolkos deleted the previously-seen-screen branch August 26, 2026 21:30
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.

3 participants