Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat: snooze a thread until its pull request has activity #39612

ClosedRealDoc06(GitHub profile, opens in a new tab)wants to merge 7 commits intomain fromrefs/pull/39612/headopened View on GitHub

RealDoc06(GitHub profile, opens in a new tab)commented

Problem

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 PR label 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-increase label.
  • 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.unsnoozed with snoozedUntil set 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, except Sidebar.shortcuts.browser.test.tsx, which fails the same way on main on 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, PR label and status-line strings.

Web, before and after (real app):

BeforeAfter
beforeafter

Snoozed row and status line:

snoozed

Council review

Rounds: 6

DelegateRound 1Round 2Round 3Round 4Round 5Round 6
Claude Opus 5.58/109/109/109/109/109.5/10
GPT-6.2 Sol6.5/108/108/108/109/109.5/10
GPT-6.2 Astra6/108/108/108.5/109.5/1010/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

    2. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Explain Change →

      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

      Layer / File(s)Summary
      Snooze choice and eligibility
      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.ts
      Contracts add the pull-request snooze capability and state fields. Shared logic detects open pull requests and qualifying sync activity. The preset adds a 30-day fallback and eligibility checks.
      Snooze state and server wake handling
      packages/client-runtime/src/operations/commands.ts, packages/client-runtime/src/state/*, apps/server/src/environment/ServerEnvironment.ts, apps/server/src/orchestration-v2/*
      Client commands, thread state, and undo plans carry the pull-request wake flag. The server validates requests, updates snooze state, and emits wake events after qualifying pull-request changes or link mutations. Settlement tests cover pull-request close behavior.
      Web snooze controls and status
      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.md
      Web menus offer the choice when the environment supports it and the thread is eligible. Actions pass the full choice, and status labels reflect pull-request snoozes. Translations and sidebar documentation are updated; web filter labels are also revised or relocated.
      Mobile snooze controls and status
      apps/mobile/src/features/home/*, apps/mobile/src/features/threads/*, apps/mobile/src/state/*, apps/mobile/src/i18n/translations/*
      Mobile menus use the choice contract and gate the option by environment support and thread eligibility. Thread rows and detail views display pull-request snooze status. Mobile translations are added.

      Estimated code review effort: 4 (Complex) | ~60 minutes

      Change: Feature

      Sequence Diagram(s)

      sequenceDiagram
        participant Sidebar
        participant resolveSnoozePresets
        participant snoozeThread
        participant Orchestrator
        participant PullRequestSync
        Sidebar->>resolveSnoozePresets: request presets with pull-request availability
        resolveSnoozePresets-->>Sidebar: return pull-request choice with 30-day fallback
        Sidebar->>snoozeThread: submit selected SnoozeChoice
        snoozeThread->>Orchestrator: dispatch thread.snooze
        PullRequestSync->>Orchestrator: sync pull-request snapshot and links
        Orchestrator->>Orchestrator: emit thread.unsnoozed for qualifying activity or no awaited pull request

      Possibly related PRs

      • pingdotgg/t3code#30913: Adds a pull-request activity snooze with overlapping wake triggers and a thread.unsnoozed wake path.
      • pingdotgg/t3code#11846: Changes per-thread auto-settlement behavior for merged or closed pull requests, which is referenced by this PR’s merge and close behavior.
      • pingdotgg/t3code#36539: Adds an overlapping “Until PR updates” snooze option with a 30-day cap and server capability gate.

      Suggested reviewers: maria-rcks, macroscopeapp, juliusmarminge

      Merge Risk: Minimal · up to d1a2e

      The 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: Passed 4

      Check nameStatusExplanation
      Title checkPassedThe 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 change…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Description checkPassedThe 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…
      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)

      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
      Recent review info

      Run configuration

      Commits

      Reviewing files that changed from the base of the PR and between f2d4df0367451f1771e94619021dfbb9982b463f and d1a2e3e683228ad20e0a44db967ecd465c2ddab7.

      Files selected for processing: 56

      • apps/mobile/src/features/home/HomeScreen.tsx
      • apps/mobile/src/features/home/useThreadListActions.test.ts
      • apps/mobile/src/features/home/useThreadListActions.ts
      • apps/mobile/src/features/threads/ThreadDetailScreen.tsx
      • apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
      • apps/mobile/src/features/threads/thread-list-v2-items.tsx
      • apps/mobile/src/features/threads/threadListV2.ts
      • apps/mobile/src/i18n/translations/de.json
      • apps/mobile/src/i18n/translations/en.json
      • apps/mobile/src/i18n/translations/es.json
      • apps/mobile/src/i18n/translations/fr.json
      • apps/mobile/src/i18n/translations/ja.json
      • apps/mobile/src/i18n/translations/ko.json
      • apps/mobile/src/i18n/translations/pt-BR.json
      • apps/mobile/src/i18n/translations/ru.json
      • apps/mobile/src/i18n/translations/sv.json
      • apps/mobile/src/i18n/translations/zh.json
      • apps/mobile/src/state/thread-list-environments.ts
      • apps/mobile/src/state/use-thread-selection.ts
      • apps/server/src/environment/ServerEnvironment.ts
      • apps/server/src/orchestration-v2/Orchestrator.ts
      • apps/server/src/orchestration-v2/ProjectionStore.ts
      • apps/server/src/orchestration-v2/ThreadSettlementService.test.ts
      • apps/server/src/orchestration-v2/ThreadSettlementService.ts
      • apps/server/src/orchestration-v2/runtimeLayer.test.ts
      • apps/web/src/components/Sidebar.snooze.ts
      • apps/web/src/components/Sidebar.tsx
      • apps/web/src/components/chat/useThreadLifecycle.tsx
      • apps/web/src/components/sidebar/SidebarThreadRow.tsx
      • apps/web/src/hooks/useThreadActionMenu.test.ts
      • apps/web/src/hooks/useThreadActionMenu.ts
      • apps/web/src/hooks/useThreadActions.permissions.test.ts
      • apps/web/src/hooks/useThreadActions.ts
      • apps/web/src/hooks/useThreadActions.undo.test.ts
      • apps/web/src/i18n/translations/de.json
      • apps/web/src/i18n/translations/en.json
      • apps/web/src/i18n/translations/es.json
      • apps/web/src/i18n/translations/fr.json
      • apps/web/src/i18n/translations/ja.json
      • apps/web/src/i18n/translations/ko.json
      • apps/web/src/i18n/translations/pt-BR.json
      • apps/web/src/i18n/translations/ru.json
      • apps/web/src/i18n/translations/sv.json
      • apps/web/src/i18n/translations/zh.json
      • apps/web/src/state/entities.ts
      • docs/user/thread-sidebar.md
      • packages/client-runtime/src/operations/commands.ts
      • packages/client-runtime/src/state/models.ts
      • packages/client-runtime/src/state/threadCommands.ts
      • packages/client-runtime/src/state/threadSettled.ts
      • packages/client-runtime/src/state/threadSnoozed.test.ts
      • packages/client-runtime/src/state/threadUndo.ts
      • packages/contracts/src/environment.ts
      • packages/contracts/src/orchestrationV2.ts
      • packages/shared/src/threadPullRequests.test.ts
      • packages/shared/src/threadPullRequests.ts

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

    3. 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.

Sign in to join this conversation.