feat: snooze a thread until its pull request has activity #39612
main fromrefs/pull/39612/head·opened View on GitHubProblem#
I keep PRs open on public repos that wait days on maintainers. I want those threads out of the sidebar without settling them, and back as soon as someone comments or anything else happens on the PR. A timed snooze is a guess. Settling hides the thread for good.
Change#
Snooze → Until PR activity is a normal snooze with a 30-day backstop that also wakes when a linked open PR gets news:
- a comment, review, push, merge or close (bot reviews count too);
- the branch starting to conflict, on hosts that report conflicts.
It shows only for threads with a linked PR that was last read as open, on servers that advertise threadSnoozeOnPullRequest.
There's no new poller. The existing PR sync already reads every unsettled thread's open PRs and dispatches thread.pull-request-link.sync when a snapshot changes. In that command's orchestrator decision, a pending PR snooze wakes when the host's updatedAt, mergedAt or closedAt lands after the snooze, or when a clean read turns into a conflict.
The wake is timer-style: it emits thread.unsnoozed with snoozedUntil: now. Every client therefore shows the usual "Woke" state with no client wake logic, and settlement treats the thread as awake.
Edge cases:
- Merge: your merge settling setting applies as usual.
- Close: a close the thread woke for keeps it active, so a rejected PR doesn't silently land in Settled.
- Nothing left to wait on: if the last open PR is unlinked, dismissed or ended, the snooze wakes.
- Leftover flag: usage-limit snoozes clear the PR flag.
- Settled threads: can't take a PR snooze, because sync skips them.
Surfaces:
- Web and desktop: the thread menu, the sidebar right-click menu, the hover snooze button and multi-select. Snoozed rows show
PR, and the status line reads "Snoozed until PR activity". - Mobile: the row menus, the
PRlabel and the detail status line. - Undo: restores the flag.
- Translations: new strings are translated into all 9 locales.
Scope#
This is a feature, not a bug fix, so I'm flagging it plainly. #36539 ("Until PR updates") overlaps. It wakes on review decisions, conflicts, finished checks, and merge or close, and it adds narrower presets and an agent option. It does not wake on plain comments, which is the case that motivated this PR: a maintainer asking a question on a contributor PR changes no review decision or check.
This PR is the smaller version:
- one preset;
- the wake decided inside the existing sync command;
- no settings or MCP surface.
I'm happy to close it in favor of #36539 if comment wakes land there, or to rebase anything useful onto it.
Not included:
- The MCP organize tool option: CI blocks MCP context growth without the
agent-context-increaselabel. - Azure DevOps comment wakes: Azure doesn't report a PR's last update, so only a merge, close or conflict wakes it there. This is documented.
Verification#
- Live end-to-end on a dev server with no seeded data: I snoozed a thread linked to an open PR in this repository at 07:44:22. A CodeRabbit review on it at 07:47 moved the PR's update time to 07:47:38. The next sync, at 07:47:57, emitted
thread.unsnoozedwithsnoozedUntilset to 07:47:57. Later syncs did not wake it again. - Tests:
- A runtime orchestrator test covers: refused with no PR, refused when settled, no wake on a non-activity sync, wake on a comment, a stale close leaving nothing to wait on, wake on unlink, and no wake for a plain snooze.
- A table test covers the wake rules.
- A settlement test pairs a PR wake (stays active on close) with a plain wake (settles).
- The new cases fail without their fixes.
vp run check:changed: passes locally, exceptSidebar.shortcuts.browser.test.tsx, which fails the same way onmainon my machine; it passes in CI.- Mobile: not captured. The dev client built and loaded on a local Android emulator, but the 8 GB VM kept hanging the emulator's System UI. Mobile renders the same shared preset,
PRlabel and status-line strings.
Web, before and after (real app):
| Before | After |
|---|---|
![]() | ![]() |
Snoozed row and status line:

Council review#
Rounds: 6
| Delegate | Round 1 | Round 2 | Round 3 | Round 4 | Round 5 | Round 6 |
|---|---|---|---|---|---|---|
| Claude Opus 5.5 | 8/10 | 9/10 | 9/10 | 9/10 | 9/10 | 9.5/10 |
| GPT-6.2 Sol | 6.5/10 | 8/10 | 8/10 | 8/10 | 9/10 | 9.5/10 |
| GPT-6.2 Astra | 6/10 | 8/10 | 8/10 | 8.5/10 | 9.5/10 | 10/10 |
Created with Claude Opus 5.5 in Claude Code, running inside T3 Code. Council reviews by Claude Opus 5.5, GPT-6.2 Sol and GPT-6.2 Astra.
🤖 Generated with Claude Code
- 1
tanstack-source added labelsfeature
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
Note
🤖 Claude Opus 5.5 responding on behalf of RealDoc06
Closing in favor of #36539, which overlaps this and came first. The one behavior #39612 had that #36539 lacked, waking on new comments, is now notkainoa/t3code#5 against that branch.
RealDoc06(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.


No actionable comments were generated in the recent review.
Walkthrough
Threads can now be snoozed until activity on a linked open pull request. The snooze choice has a 30-day fallback, and qualifying pull-request activity or removal of the last awaited pull request wakes the thread. Web and mobile interfaces expose the option when supported and show its status.
Changes: Pull-request activity snoozing
packages/contracts/src/environment.ts,packages/contracts/src/orchestrationV2.ts,packages/shared/src/threadPullRequests.ts,packages/shared/src/threadPullRequests.test.ts,packages/client-runtime/src/state/threadSettled.ts,packages/client-runtime/src/state/threadSnoozed.test.tspackages/client-runtime/src/operations/commands.ts,packages/client-runtime/src/state/*,apps/server/src/environment/ServerEnvironment.ts,apps/server/src/orchestration-v2/*apps/web/src/state/entities.ts,apps/web/src/components/Sidebar*.tsx,apps/web/src/components/chat/useThreadLifecycle.tsx,apps/web/src/hooks/useThread*.ts,apps/web/src/i18n/translations/*,docs/user/thread-sidebar.mdapps/mobile/src/features/home/*,apps/mobile/src/features/threads/*,apps/mobile/src/state/*,apps/mobile/src/i18n/translations/*Estimated code review effort: 4 (Complex) | ~60 minutes
Change: Feature
Sequence Diagram(s)#
Possibly related PRs
thread.unsnoozedwake path.Suggested reviewers:
maria-rcks,macroscopeapp,juliusmarmingeMerge Risk:
Minimal · up to
d1a2eThe change adds an "Until PR activity" snooze across web, mobile, and server, with a 30-day fallback and capability gating. No blocking issues were found. Minor edge cases around the timing of conflict reads were not confirmed and do not block merge.
Pre-merge checks:
4
Full details: Title check
Explanation
The title "feat: snooze a thread until its pull request has activity" describes the main change: a new "Until PR activity" snooze option that wakes a thread on linked pull-request activity. The changeset spans web, mobile, server, contracts, and shared packages, and all of them implement this feature. The title is specific, conventional-commit formatted, and matches the objectives.
Full details: Description check
Explanation
The description follows the template sections (Problem, Change, Scope, Verification) and explains the problem, the new 'Until PR activity' snooze behavior, edge cases, affected surfaces, and scope. It also reports concrete verification: a live end-to-end run on a dev server, runtime orchestrator, table, and settlement tests, and a web before/after screenshot. Mobile verification is explicitly not captured, and the one failing local test (Sidebar.shortcuts.browser.test.tsx) is disclosed. The title line is missing from the template's conventional-commit guidance, since the PR title is not part of the provided description. The Scope section states this is a feature, not a bug fix, which conflicts with the template's requirement to accept bug fixes only; the author flags this and cites a linked overlapping PR (
#36539) but does not link a maintainer request or issue. The Problem section is a user-need statement rather than a bug with reproduction steps. Overall the description is mostly complete, with the scope mismatch and the missing maintainer approval as the main gaps.Finishing Touches
Generate unit tests (beta)
2b178189-af69-4280-9fa9-a9973fc8137dReviewing files that changed from the base of the PR and between f2d4df0367451f1771e94619021dfbb9982b463f and d1a2e3e683228ad20e0a44db967ecd465c2ddab7.
apps/mobile/src/features/home/HomeScreen.tsxapps/mobile/src/features/home/useThreadListActions.test.tsapps/mobile/src/features/home/useThreadListActions.tsapps/mobile/src/features/threads/ThreadDetailScreen.tsxapps/mobile/src/features/threads/ThreadNavigationSidebar.tsxapps/mobile/src/features/threads/thread-list-v2-items.tsxapps/mobile/src/features/threads/threadListV2.tsapps/mobile/src/i18n/translations/de.jsonapps/mobile/src/i18n/translations/en.jsonapps/mobile/src/i18n/translations/es.jsonapps/mobile/src/i18n/translations/fr.jsonapps/mobile/src/i18n/translations/ja.jsonapps/mobile/src/i18n/translations/ko.jsonapps/mobile/src/i18n/translations/pt-BR.jsonapps/mobile/src/i18n/translations/ru.jsonapps/mobile/src/i18n/translations/sv.jsonapps/mobile/src/i18n/translations/zh.jsonapps/mobile/src/state/thread-list-environments.tsapps/mobile/src/state/use-thread-selection.tsapps/server/src/environment/ServerEnvironment.tsapps/server/src/orchestration-v2/Orchestrator.tsapps/server/src/orchestration-v2/ProjectionStore.tsapps/server/src/orchestration-v2/ThreadSettlementService.test.tsapps/server/src/orchestration-v2/ThreadSettlementService.tsapps/server/src/orchestration-v2/runtimeLayer.test.tsapps/web/src/components/Sidebar.snooze.tsapps/web/src/components/Sidebar.tsxapps/web/src/components/chat/useThreadLifecycle.tsxapps/web/src/components/sidebar/SidebarThreadRow.tsxapps/web/src/hooks/useThreadActionMenu.test.tsapps/web/src/hooks/useThreadActionMenu.tsapps/web/src/hooks/useThreadActions.permissions.test.tsapps/web/src/hooks/useThreadActions.tsapps/web/src/hooks/useThreadActions.undo.test.tsapps/web/src/i18n/translations/de.jsonapps/web/src/i18n/translations/en.jsonapps/web/src/i18n/translations/es.jsonapps/web/src/i18n/translations/fr.jsonapps/web/src/i18n/translations/ja.jsonapps/web/src/i18n/translations/ko.jsonapps/web/src/i18n/translations/pt-BR.jsonapps/web/src/i18n/translations/ru.jsonapps/web/src/i18n/translations/sv.jsonapps/web/src/i18n/translations/zh.jsonapps/web/src/state/entities.tsdocs/user/thread-sidebar.mdpackages/client-runtime/src/operations/commands.tspackages/client-runtime/src/state/models.tspackages/client-runtime/src/state/threadCommands.tspackages/client-runtime/src/state/threadSettled.tspackages/client-runtime/src/state/threadSnoozed.test.tspackages/client-runtime/src/state/threadUndo.tspackages/contracts/src/environment.tspackages/contracts/src/orchestrationV2.tspackages/shared/src/threadPullRequests.test.tspackages/shared/src/threadPullRequests.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.