The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 16:45 UTC
fix(web): pr merge actions stay visible while the stack refreshes (#17559)
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
maria committed
Oct 9, 2026 at 15:47 UTC
aa8c6662e212a4307bd4e585661da99a358e46d4
3 files changed
+12
-4
apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx
+1
-1
@@ -823,7 +823,7 @@ export function PullRequestDetailPanel({
823
const canMergeSinglePullRequest = allowsSinglePullRequestMerge({
824
supportsStackActions,
825
hasStack: nativeStack !== null,
826
- stackPending: !nativeStackQuery.isSuccess || nativeStackQuery.isPending,
826
+ stackPending: !nativeStackQuery.isFresh,
827
stackError: nativeStackQuery.error,
828
});
829
const activityPending = activityQuery.isPending && activity === null;
apps/web/src/components/pullRequest/pullRequestStackSnapshot.test.ts
+5
-1
@@ -88,6 +88,10 @@ describe("saved stack navigation", () => {
88
isFresh: true,
89
notice: null,
90
});
91
- expect(pullRequestStackView({ ...query, isPending: true }, saved).isFresh).toBe(false);
91
+ expect(pullRequestStackView({ ...query, isPending: true }, saved).isFresh).toBe(true);
92
+ expect(pullRequestStackView({ ...query, data: null, isPending: true }, saved)).toMatchObject({
93
+ data: null,
94
+ isFresh: true,
95
+ });
96
});
97
});
apps/web/src/components/pullRequest/pullRequestStackSnapshot.ts
+6
-2
@@ -47,7 +47,11 @@ export function savedPullRequestStack(
47
};
48
}
49
50
-/** A fresh absence overrides saved membership; failed refreshes preserve available navigation. */
50
+/**
51
+ * A fresh absence overrides saved membership; failed refreshes preserve available navigation.
52
+ * A background refresh keeps the last successful lookup fresh, so stack-dependent actions do
53
+ * not blink out every time the detail revalidates.
54
+ */
55
export function pullRequestStackView(
56
query: {
57
data: PullRequestStack | null;
@@ -60,7 +64,7 @@ export function pullRequestStackView(
64
const data = query.isSuccess ? query.data : (query.data ?? saved);
65
return {
66
data,
63
- isFresh: query.isSuccess && !query.isPending,
67
+ isFresh: query.isSuccess,
68
notice:
69
data === null
70
? null