Skip to content

feat: snooze threads when their pull request watch comes back green - #4

Open
flamboh wants to merge 4 commits into
async-ci-pr-monitoringfrom
pr-watch-auto-snooze
Open

flamboh wants to merge 4 commits into
async-ci-pr-monitoringfrom
pr-watch-auto-snooze

Conversation

@flamboh

@flamboh flamboh commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Note

🤖 Claude Opus 5.5 on behalf of Oliver

Stacked on #3.

ELI5

If you want, T3 Code can tuck a thread away once its pull request's CI comes back all green, and bring it back if a check later fails or someone leaves review feedback.

Why

A thread whose PR is green usually needs nothing until review. It still sits in the inbox until you snooze it by hand.

Implementation

  • New server setting snoozeGreenPullRequests: off (default), "indefinitely", or a number of hours. Settings → General → Organization on web, Threads settings on mobile. Gated on a new pullRequestWatchAutoSnooze capability.
  • A watch delivery is green when checks_finished is the only hit and every check passed or skipped. A green delivery arms a row in pull_request_auto_snoozes (migration 058).
  • The row waits for the agent's reply to that notification to finish, then dispatches thread.snooze. A failed reply, a pending approval, a pin, or a snooze the user already set drops it instead.
  • While snoozed, a slow check (every 15 min) reads the PR through the existing watch observer. A new failed check or new review remark dispatches thread.unsnooze (new pull-request reason). Merge/close, a timer wake, a manual unsnooze, or new agent activity retire the row without waking anything.
  • "Indefinitely" is a far-future wake time (INDEFINITE_SNOOZE_UNTIL), so the snooze model needs no new wake state. Plain open-ended snoozes show ∞ instead of a countdown.
  • The thread carries an optional pullRequestSnooze (PR, wokeAt, wakeReasons) in its JSON payload, so no projection migration. Auto-snooze sets it, a pull-request unsnooze records why it woke, and any manual snooze, wake, pin, or new message clears it.
  • Visibility: a watched snoozed row shows a blue closed eye ("Watching feat: Commit, Push and Create PR actions pingdotgg/t3code#13 · wakes on a failed check or review"). A PR wake reuses the existing Woke pill with an open-eye icon, an amber ring on the row, and a tooltip saying what happened. The thread banner says "New review feedback on feat: Commit, Push and Create PR actions pingdotgg/t3code#13" with a View pull request action. Mobile rows get the same eye icons and ring.

Why poll instead of webhooks

T3 servers usually run on a laptop behind NAT, and GitHub webhooks need a public URL plus admin access to each repo. The observer already exists and works anywhere gh does. One read per snoozed PR every 15 minutes is small next to the one-minute watch poll.

UI Changes

Before: no setting; a green thread stays in the inbox until you snooze it by hand.

After:

Snoozed and watching:

Watching tooltip on the snoozed row

Snoozed banner in the thread

Woken by a review comment:

https://gh-file-drop-api-prod-galwoqjslzlnws6s.oliver-boorstein.workers.dev/f/8b6e8623fe7124ae/wake.mp4

Woke pill with eye icon, ring, and reason tooltip

Wake banner with View pull request

Woke row in light mode

Full workflow from the first iteration (the snoozed row showed ∞ before the eye icon landed):

Snooze green pull requests setting

Auto-snoozed thread showing ∞ in the Snoozed section

Workflow, recorded against the sandbox PR flamboh/t3-pr-ui-sandbox#13:

  1. Enable the setting

https://gh-file-drop-api-prod-galwoqjslzlnws6s.oliver-boorstein.workers.dev/f/be99c2e2fc5ab50a/clip-1-settings.mp4

  1. The agent opens a PR and watches its CI

https://gh-file-drop-api-prod-galwoqjslzlnws6s.oliver-boorstein.workers.dev/f/aaf07811bb549a67/clip-2-agent.mp4

  1. Checks go green, the agent replies, and the thread snoozes (∞)

https://gh-file-drop-api-prod-galwoqjslzlnws6s.oliver-boorstein.workers.dev/f/34c4bfb27fda62f3/clip-3-snooze.mp4

  1. A review comment lands and the thread wakes back into the inbox (the 15-minute check was forced early in the dev database for the recording)

https://gh-file-drop-api-prod-galwoqjslzlnws6s.oliver-boorstein.workers.dev/f/37ce8a2dd5db7cbe/clip-4-wake.mp4


Built with Claude Opus 5.5 in Claude Code (T3 Code).

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL labels Sep 22, 2026
@github-actions

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 8373acf.

This comment will update automatically after the next completed run.

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

size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant