fix(threads): threads watching a PR stay in Working instead of bouncing to the inbox #16204
Merged
t3dotgg(GitHub profile, opens in a new tab)merged 3 commits into
main fromrefs/pull/16204/head·merged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubShowing 15 changed files with 127 additions and 1 deletion (loading 12).
x
@@ -289,7 +289,7 @@
- "Have T3 Code watch an open pull request for this thread, linking it first if needed. T3 Code checks it every minute and wakes you with a message when a check fails, the required checks pass, someone else comments or reviews, or the branch starts to conflict with its base. Use this to monitor or babysit a pull request instead of polling, sleeping, or running a watcher. Only comments posted after this call wake you, so handle the existing ones first, then end your turn. A wake is news, not a merge decision: check readiness yourself before merging. Watching ends when the pull request merges or closes, when its thread settles, when T3 Code cannot read it for 15 minutes, when the user stops this thread, or when you call unwatch_pull_request. Unsettle the thread before starting a new watch.",
+ "Have T3 Code watch an open pull request for this thread, linking it first if needed. T3 Code checks it every minute and wakes you with a message when a check fails, the required checks pass, someone else comments or reviews, or the branch starts to conflict with its base. Use this to monitor or babysit a pull request instead of polling, sleeping, or running a watcher. Only comments posted after this call wake you, so handle the existing ones first, then end your turn. A wake is news, not a merge decision: check readiness yourself before merging. While T3 Code watches, the thread stays in the user's Working list, not their inbox. When you hand the work back to the user, call unwatch_pull_request first so the thread returns to their inbox. Watching ends when the pull request merges or closes, when its thread settles, when T3 Code cannot read it for 15 minutes, when the user stops this thread, or when you call unwatch_pull_request. Unsettle the thread before starting a new watch.",
123 additions and 0 deletions+123-0apps/server/src/orchestration-v2/ProjectionStore.test.tsModifiedView file
@@ -21,6 +21,7 @@
+ type ThreadPullRequestLink,
@@ -4401,6 +4402,128 @@
+ it.effect("a pull request watch keeps a finished thread working until it ends", () =>
+ Effect.gen(function* () {
+ const store = yield* ProjectionStore.ProjectionStoreV2;
+ const threadId = ThreadId.make("thread:watched-pull-request");