Add a Bubble Up scheduling menu to the TUI

WH
11h ago
+1054-1

The TUI can show Bubble Up mail but has no action for bubbling up a thread. Pressing w now 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, and make build passed. make test failed only TestFindBareLinksPastRejectedPrefixesIsLinear; 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 w on 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.

  • Presets display local time while HEY schedules on its UTC calendar, and "Later today" disappears once its slot has passed.
  • Search results have no bubble metadata, so the menu scans the bubbled-up and scheduled feeds first to decide whether to offer cancellation; that lookup is bounded, cancellable, and retryable.
  • Failed writes keep the menu open for retry, and successful writes close the thread and refresh the source.
  • Bubble-up applies to one thread at a time; opening it with a bulk selection, a bundle, or a loading list shows a notice instead.
  • Opening and closing the menu preserves the thread's scroll position and selected link, even across terminal resizes.