Repository navigation
Add a Bubble Up scheduling menu to the TUI - #670
WhiskeyTuesday wants to merge 6 commits into
Conversation
|
Related UI work: #671 gives Move, labels, and collection membership the same compact overlay treatment. The features are independent and use the modal infrastructure already in main. Both include the same small background-rendering extraction, which can be dropped from whichever branch is rebased second. |
There was a problem hiding this comment.
🟡 Changes recommended
Opening the picker after scrolling away from a selected thread link resets the background scroll position, and Escape does not restore it; viewport preservation and a regression test through model.Update are needed.
1 open issue
What changed in this PR
Adds Bubble Up scheduling to the TUI using the existing modal and SDK infrastructure.
Changes:
- Adds a
wmenu for immediate bubbling, scheduling presets, custom dates, and cancellation. - Resolves missing search-result metadata through bounded, cancellable lookups.
- Adds regression coverage and documents the menu’s behavior.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
internal/tui/mail.go |
Connects Bubble Up keys, messages, help, and background rendering. |
internal/tui/bubble.go |
Implements the scheduling menu and mutation handling. |
internal/tui/bubble_test.go |
Tests scheduling, retries, targeting, and screen preservation. |
internal/tui/bubble_state.go |
Adds bounded Bubble Up state lookups for search results. |
internal/tui/bubble_state_test.go |
Tests lookup results, cancellation, retries, and limits. |
internal/mail/posting.go |
Preserves scheduled Bubble Up metadata. |
internal/mail/posting_test.go |
Tests schedule metadata conversion. |
internal/cmd/bubble_test.go |
Aligns success mocks with HTTP 200 responses. |
docs/tui.md |
Documents shortcuts, scheduling rules, and cancellation. |
Review effort: Balanced
| } | ||
| } | ||
| picker := newBubblePicker(*posting, scheduled, time.Now) | ||
| v.openModal(picker) |
There was a problem hiding this comment.
Fixed in 21db033, with the root-model regression in 67ad6bb. Opening the picker changed the help/footer height, and the resulting resize revealed the selected link or changed the offset at the bottom. The fix preserves the reading position across those modal layout changes and restores it on dismissal.
The regression sends Tab, scrolling, w, and Escape through model.Update, covering a wrapping selected-link footer and an unselected thread, both partway down and at the bottom. Actual terminal resizing still lays out the thread at its new dimensions.
TUI/mail tests and lint pass. Offline PTY checks on the combined build also verified that Bubble Up restores the rendered screen after dismissal, including at the bottom.

The TUI can show Bubble Up mail but has no action for bubbling up a thread. Pressing
wnow opens a menu over the current mail screen to bubble up immediately, choose a preset, enter a date, or cancel an existing bubble-up.Presets display their local time while using HEY's UTC scheduling rules. Search results lack Bubble Up metadata, so the menu checks the bubbled-up and scheduled feeds before offering cancellation. That lookup is bounded, cancellable, and retryable. Failed writes keep the menu open; successful writes refresh the source.
Uses the existing modal and SDK infrastructure. Includes regression coverage for request payloads, date boundaries, real search-response shapes, cancellation, stale lookup results, and preserving the screen and scroll position behind the menu. The existing Bubble Up success mocks now use the SDK's HTTP 200 contract.
Validation after rebasing onto f6244d7: TUI tests,
make lint, andmake buildpassed.make testfailed onlyTestFindBareLinksPastRejectedPrefixesIsLinear; the same five-second assertion fails on unchanged upstream on this machine. Focused live checks on combined build 9da3f57 passed in a real HEY account: Tomorrow scheduling, cancellation from search, and independent server readbacks.Summary by cubic
The TUI can now schedule, apply, and cancel Bubble Up from a menu opened with
won a mail list or open thread. The menu offers Now, Later today, Tomorrow, This weekend, Next week, a custom date, or Cancel bubble-up, and it works from search, bundles, seen, and thread views.Written for commit 67ad6bb. Summary will update on new commits.