Skip to content

feat(messages): add Slack-style scheduled messages - #3239

Open
sqnico wants to merge 3 commits into
mainfrom
codex/slack-style-scheduled-messages
Open

sqnico wants to merge 3 commits into
mainfrom
codex/slack-style-scheduled-messages

Conversation

@sqnico

@sqnico sqnico commented Nov 10, 2026 •

Copy link
Copy Markdown

Why

People need to write a message now and deliver it later, including while Buzz is closed. The modern app has no composer scheduling flow or scheduled queue in Drafts & sent.

What

  • Add a split Send button with Later today, Tomorrow, Monday, and Custom time choices, up to 120 days ahead.
  • Add a calendar and editable time picker, an explicit time zone, and a confirmation with a link to scheduled messages. The draft clears only after durable acceptance.
  • Put Scheduled inside the existing Drafts & sent page. Add edit, reschedule, send-now, save-to-drafts, and delete actions, plus a clock/count in the sidebar.
  • Give Drafts, Scheduled, and Sent their own search labels and retained search text. Search matches message text and destination within the selected tab.

How

The existing message builder prepares formatting, mentions, uploaded attachments, and thread references. The host signs the exact future event and uses one fixed authenticated relay endpoint. A session-owned service verifies queued signatures and preserves revisions and retry IDs.

The sidebar and page share one queue read, subscription, and timer. Scheduled revalidates on entry and shares a jittered 15-minute backstop, including when the queue is empty. Overdue messages and failed reads retry with bounded backoff. The UI reuses Dialog, Calendar, Combobox, Menu, SearchField, and the split-button recipe.

The first commit adds the service and host boundary; the second adds the composer and management UI. No standalone scheduling plugin is needed.

Risk and limitations

  • Requires the companion relay change and its default-off capability. Older relays keep ordinary sending behavior. Enable the bundled Drafts & sent plugin to manage the queue.
  • Drafts remain local to this device. Cross-device draft sync and recurring schedules are not included.
  • Draft conversion supports text, formatting, mentions, and root-thread replies. It refuses attachments, nested reply parents, media targets, explicit model/effort settings, and unaddressed slash commands. The original stays scheduled when conversion is refused.
  • Text edits are read-only for queued messages with mention recipients. Save supported messages to drafts to edit recipients in the full composer. Reschedule and send-now remain available; destination and attachment bindings stay fixed.
  • Attachment uploads must finish before scheduling. New uploads were not tested against object storage in the isolated manual environment.
  • Server retries can deliver late; the message keeps its selected signed timestamp. No production deployment or activation is included.

Testing

The running modified macOS app was exercised against an isolated local HTTPS relay during UI iteration. The feature flow was checked in Chromium and WebKit. The final rebase added Pi/MCP and Windows OAuth changes without altering the feature patches; mandatory types, related tests, design guards, and native Clippy passed afterward. The author confirmed successful testing on November 10, 2026, before the review fixes below. Those fixes need a new human acceptance pass.

  • pnpm exec playwright test --config tests/browser/playwright.config.mjs scheduled-messages.spec.mjs drafts-in-progress.spec.mjs --project chromium --project webkit --no-deps: representative flows pass in both engines, including refusal/retry, draft preservation/reload, cross-year layout at 100%/150%, Finnish time selection, queue edits, rescheduling, search, and save-to-drafts. Later focused reruns checked the locale fix and visible menu capture.

  • BUZZ_SCHEDULED_TEST_RELAY=<isolated loopback relay> pnpm exec vitest run src/features/relay/scheduled-messages.live.test.ts: passed with verified local HTTPS; delivery completed after the scheduling session closed.

  • An existing team-mentions status test now controls its directory-search debounce instead of racing a real timer under suite load. Assertions and timeouts are unchanged.

  • Focused coverage checks signature/owner boundaries, stable retries, stale revisions, newer composer drafts, delayed queue refresh, tab isolation, and refusal of unsafe draft conversion. All mandatory pre-commit and pre-push checks passed without bypasses, including the related test suite, design guards, and native Clippy.

  • Browser cases added: 5 scenarios per engine. They prove real picker focus/input behavior, rendered geometry, and composer/page wiring. State matrices stay in unit tests. A locale parsing probe reproduced the English-parser failure; canonical-time picker selections now pass in both engines; existing browser cases were retained.

  • Review fixes: the signed HTTPS relay test now also passes exact create retries after delivery and send-now retries without a second revision. Independent review of the fixes found no remaining blockers. The existing 10 browser checks passed in Chromium and WebKit.

Screenshots use fictional local fixtures and the actual shared UI components.

Schedule a message

Schedule message dialog

Manage scheduled messages

Scheduled tab and search

Scheduled message actions

Bigger picture

Companion relay: block/buzz#9335. Deploy its migration and reservation-aware probes with scheduling off before enabling delivery. This PR uses a branch pushed directly to the upstream repository. Human acceptance of the review fixes and current hosted CI remain pending.

Replaces the fork-based app PR #3207. Review fixes address queue revalidation and safe mention editing. The original review discussion remains available there.

Generated with Codex

sqnico and others added 3 commits November 10, 2026 11:37
Expose signed, authenticated relay scheduling through the native and browser host boundaries. Preserve exact message bindings and stable retries within the active session.

Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: sqnico <111789695+sqnico@users.noreply.github.com>
Schedule from the composer and manage the queue in Drafts & sent. Keep searches scoped to each tab and preserve local drafts through failures and navigation.

Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: sqnico <111789695+sqnico@users.noreply.github.com>
Refresh remote schedules when management opens and preserve mention recipients through safe editing. Reuse uncertain send-now requests and renew them after a definite rejection.

Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: sqnico <111789695+sqnico@users.noreply.github.com>
@sqnico
sqnico marked this pull request as ready for review November 10, 2026 21:54
@sqnico
sqnico requested a review from a team as a code owner November 10, 2026 21:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant