fix(server): threads settle as soon as branch status sees their PR merge #17148
Mergedt3dotgg(GitHub profile, opens in a new tab)merged 2 commits into
main fromrefs/pull/17148/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
juliusmarminge added labelsmacroscope-review
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/server/src/git/GitManager.ts line 1150Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -1122,3 +1140,11 @@11221140 prLookupFailureStreakByKey.set(key, streak);11231141 return prLookupFailureTtl(streak);11241142 };1143+ // The last state a branch PR lookup read per pull request. The thread details panel shows1144+ // this lookup, so a merge it sees must reach the thread's link and settlement right away.1145+ const pullRequestStateChanges = yield* PubSub.sliding<ThreadPullRequestKey>(64);1146+ const lookupStates = new Map<string, PullRequestInfo["state"]>();1147+ const noteLookupState = (pr: PullRequestInfo) =>1148+ Effect.suspend(() => {1149+ const parsed = parseChangeRequestUrl(pr.url);1150+ if (parsed === null || parsed.number !== pr.number) return Effect.void;
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed