The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): collapse pull request repository errors (#21389)
maria committed
Oct 21, 2026 at 00:02 UTC
043c9c3169596864fff5ff018c9b877509acb93c
1 file changed
+31
-8
apps/mobile/src/features/pull-requests/PullRequestsScreen.tsx
+31
-8
@@ -27,6 +27,7 @@ import { useProjects } from "../../state/entities";
27
import { environmentServerConfigsAtom } from "../../state/server";
28
import { PullRequestListRow } from "./PullRequestListRow";
29
import { PullRequestListFilters } from "./PullRequestListFilters";
30
+import { PullRequestCardRow } from "./PullRequestControls";
31
import { usePullRequestList } from "./usePullRequestList";
32
import { usePullRequestListControls } from "./usePullRequestListControls";
33
import { usePullRequestListActions } from "./usePullRequestListActions";
@@ -57,6 +58,29 @@ function PullRequestScrollView(props: ScrollViewProps) {
58
);
59
}
60
61
+function PullRequestListErrors(props: { readonly messages: readonly string[] }) {
62
+ const [expanded, setExpanded] = useState(false);
63
+ const title = `${props.messages.length} ${props.messages.length === 1 ? "error" : "errors"} loading pull requests`;
64
+ return (
65
+ <View>
66
+ <PullRequestCardRow
67
+ title={title}
68
+ icon="exclamationmark.triangle"
69
+ compact
70
+ last
71
+ expanded={expanded}
72
+ accessibilityLabel={`${title}. ${expanded ? "Hide" : "Show"} details`}
73
+ onPress={() => setExpanded((value) => !value)}
74
+ />
75
+ {expanded ? (
76
+ <Text selectable className="px-4 pb-3 text-sm text-foreground-muted">
77
+ {props.messages.join("\n")}
78
+ </Text>
79
+ ) : null}
80
+ </View>
81
+ );
82
+}
83
+
84
export function PullRequestsScreen(
85
props: {
86
readonly sidebar?: boolean;
@@ -295,14 +319,13 @@ export function PullRequestsScreen(
319
projects={projects}
320
/>
321
{result.data?.errors.length ? (
298
- <Text className="px-4 py-3 text-sm text-foreground-muted">
299
- {result.data.errors
300
- .map(
301
- (error) =>
302
- `${error.projectTitle || environments.find((environment) => environment.environmentId === error.environmentId)?.environmentLabel || "Environment"}: ${error.message}`,
303
- )
304
- .join("\n")}
305
- </Text>
322
+ <PullRequestListErrors
323
+ key={JSON.stringify(targets)}
324
+ messages={result.data.errors.map(
325
+ (error) =>
326
+ `${error.projectTitle || environments.find((environment) => environment.environmentId === error.environmentId)?.environmentLabel || "Environment"}: ${error.message}`,
327
+ )}
328
+ />
329
) : null}
330
</>
331
}