The best way to control Claude Code, Codex and more from any computer or phone
fix(ui): simplify multiple linked pull request badges (#11104)
maria committed
Sep 10, 2026 at 15:24 UTC
e784975bbec7c54ed75fc6da3d4ffd4038fae041
5 files changed
+24
-12
apps/mobile/src/features/threads/thread-list-v2-items.tsx
+10
-4
@@ -871,16 +871,22 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
871
)}
872
{pr ? (
873
<View className="flex-row items-center gap-1" accessibilityLabel={pr.accessibilityLabel}>
874
- {pr.kind === "stack" ? (
874
+ {pr.kind === "stack" || pr.others > 0 ? (
875
<SymbolView
876
- name="square.3.layers.3d"
876
+ name={pr.kind === "stack" ? "square.3.layers.3d" : "arrow.triangle.pull"}
877
size={12}
878
tintColorClassName={
879
selected
880
? materialYouStyleLayoutActive
881
? "accent-thread-selected-foreground"
882
: "accent-user-bubble-foreground"
883
- : "accent-foreground-muted"
883
+ : pr.kind === "stack" || pr.isDraft || pr.state === null
884
+ ? "accent-foreground-muted"
885
+ : pr.state === "open"
886
+ ? "accent-adaptive-emerald-600-400"
887
+ : pr.state === "merged"
888
+ ? "accent-adaptive-violet-600-400"
889
+ : "accent-foreground-muted"
890
}
891
/>
892
) : null}
@@ -896,7 +902,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
902
)}
903
style={{ fontFamily: MONO_FONT }}
904
>
899
- {pr.kind === "stack" ? pr.label : `#${pr.label}`}
905
+ {pr.kind === "stack" || pr.others > 0 ? pr.label : `#${pr.label}`}
906
</Text>
907
</View>
908
) : null}
apps/mobile/src/state/thread-pr-presentation.ts
+7
-2
@@ -17,11 +17,12 @@ export interface ThreadPrPresentation {
17
readonly number: number;
18
readonly state: ThreadPr["state"] | null;
19
readonly kind: "pull-request" | "stack";
20
+ readonly others: number;
21
readonly isDraft: boolean;
22
/** Provider-side last activity, bounding when a terminal state landed. */
23
readonly updatedAt: string | null;
24
readonly url: string;
24
- /** Compact pull request number label, e.g. "3774". */
25
+ /** Compact pull request number or linked count, e.g. "3774" or "+2". */
26
readonly label: string;
27
/** Full, provider-aware label for assistive technologies. */
28
readonly accessibilityLabel: string;
@@ -42,6 +43,7 @@ export function presentThreadPr(
43
const isDraft = pr.state === "open" && pr.isDraft === true;
44
return {
45
kind: "pull-request",
46
+ others: 0,
47
number: pr.number,
48
state: pr.state,
49
isDraft,
@@ -66,9 +68,12 @@ export function presentThreadLinkedPullRequests(
68
const label =
69
badge.kind === "stack"
70
? String(badge.layers)
69
- : `${link.number}${badge.others > 0 ? ` +${badge.others}` : ""}`;
71
+ : badge.others > 0
72
+ ? `+${badge.others}`
73
+ : String(link.number);
74
return {
75
kind: badge.kind,
76
+ others: badge.kind === "pull-request" ? badge.others : 0,
77
number: link.number,
78
state,
79
isDraft,
apps/mobile/src/state/use-thread-pr.test.ts
+1
-1
@@ -87,7 +87,7 @@ describe("presentThreadLinkedPullRequests", () => {
87
it("counts unrelated links without labelling them a stack", () => {
88
expect(presentThreadLinkedPullRequests([linkedPr(1), linkedPr(2)])).toMatchObject({
89
kind: "pull-request",
90
- label: "1 +1",
90
+ label: "+1",
91
});
92
});
93
apps/web/src/components/Sidebar.tsx
+1
-1
@@ -1485,7 +1485,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
1485
</span>
1486
);
1487
1488
- // Stacks show their layer count; unrelated links show the current PR and a remainder count.
1488
+ // Stacks show their layer count; unrelated links show only the remainder count.
1489
// Plain clicks open T3; individual PR links also support opening the host in a new tab.
1490
const prBadgeShape = supportsMultiplePullRequests
1491
? resolveThreadPullRequestBadge(thread.pullRequests)
apps/web/src/components/ThreadStatusIndicators.tsx
+5
-4
@@ -174,10 +174,11 @@ export function ThreadPullRequestBadgeControl({
174
const content = (
175
<>
176
<ThreadPullRequestBadgeIcon icon={badge?.kind ?? "pull-request"} />
177
- {isStack ? badge.layers : number}
178
- {badge?.kind === "pull-request" && badge.others > 0 ? (
179
- <span className="opacity-70">+{badge.others}</span>
180
- ) : null}
177
+ {isStack
178
+ ? badge.layers
179
+ : badge?.kind === "pull-request" && badge.others > 0
180
+ ? `+${badge.others}`
181
+ : number}
182
</>
183
);
184
return (