The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): opening another stack layer no longer shows the previous PR (#24730)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Victor Vogel committed
Oct 31, 2026 at 03:36 UTC
1a93920deafd253edbbadacd6b0be150a689a2cd
3 files changed
+32
-1
apps/mobile/src/features/pull-requests/PullRequestStackCard.tsx
+2
-1
@@ -4,6 +4,7 @@ import { Platform, View } from "react-native";
4
import { useSelectWorkspaceDetail } from "../workspace/useSelectWorkspaceDetail";
5
import { AppText as Text } from "../../components/ui/AppText";
6
import { PullRequestCardGroup, PullRequestCardRow } from "./PullRequestControls";
7
+import { pullRequestLayerParams } from "./pullRequestStack";
8
import { pullRequestStatus } from "./pullRequestStatus";
9
import type { PullRequestParams } from "./usePullRequestDiff";
10
import type { PullRequestStackState } from "./usePullRequestStack";
@@ -66,7 +67,7 @@ export function PullRequestStackCard(props: {
67
selected
68
? undefined
69
: () => {
69
- const params = { ...props.params, number: layer.number };
70
+ const params = pullRequestLayerParams(props.params, layer.number);
71
if (Platform.OS === "android")
72
selectDetail({ name: "PullRequest", params });
73
else navigation.dispatch(StackActions.push("PullRequest", params));
apps/mobile/src/features/pull-requests/pullRequestStack.test.ts
+21
@@ -2,6 +2,7 @@ import { sourceControlClients } from "@t3tools/client-runtime/source-control-cli
2
import { ProjectId, type PullRequestStack, type ThreadPullRequestLink } from "@t3tools/contracts";
3
import { describe, expect, it } from "vite-plus/test";
4
import {
5
+ pullRequestLayerParams,
6
pullRequestStackMerge,
7
savedPullRequestStack,
8
singlePullRequestMergeAllowed,
@@ -124,6 +125,26 @@ describe("mobile stack merge scope", () => {
125
});
126
});
127
128
+describe("mobile stack layer navigation", () => {
129
+ it("opens another layer without the summary of the layer it came from", () => {
130
+ const route = {
131
+ environmentId: "environment",
132
+ projectId: "project",
133
+ repository: "acme/web",
134
+ host: "github.com",
135
+ number: 2,
136
+ initialSummary: { number: 2, url: "https://github.com/acme/web/pull/2" },
137
+ };
138
+ expect(pullRequestLayerParams(route, 3)).toEqual({
139
+ environmentId: "environment",
140
+ projectId: "project",
141
+ repository: "acme/web",
142
+ host: "github.com",
143
+ number: 3,
144
+ });
145
+ });
146
+});
147
+
148
describe("mobile saved stack navigation", () => {
149
it("keeps all saved layers and enriches titles without carrying action revisions", () => {
150
const saved = savedPullRequestStack([link], reference);
apps/mobile/src/features/pull-requests/pullRequestStack.ts
+9
@@ -67,6 +67,15 @@ export function savedPullRequestStack(
67
};
68
}
69
70
+/** The list summary describes the layer it was opened from, so another layer's route drops it. */
71
+export function pullRequestLayerParams<Params extends { readonly initialSummary?: unknown }>(
72
+ params: Params,
73
+ number: number,
74
+) {
75
+ const { initialSummary: _, ...layer } = params;
76
+ return { ...layer, number };
77
+}
78
+
79
export function singlePullRequestMergeAllowed(input: {
80
readonly supportsStackActions: boolean;
81
readonly hasStack: boolean;