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, 21:45 UTC
fix(web): multi-PR badges open the linked pull requests panel (#13211)
oliver committed
Sep 29, 2026 at 17:40 UTC
0fcd5f90611451cca842689faea53b5450c022da
4 files changed
+19
-17
apps/web/src/components/BranchToolbarBranchSelector.tsx
+1
-1
@@ -793,7 +793,7 @@ export function BranchToolbarBranchSelector({
793
number={prNumber}
794
url={prUrl}
795
status={displayedPrStatus}
796
- onOpenStack={() => useRightPanelStore.getState().open(threadRef, "pull-requests")}
796
+ onOpenList={() => useRightPanelStore.getState().open(threadRef, "pull-requests")}
797
onOpenPullRequest={(event) => {
798
if (prUrl) openPrLink(event, prUrl);
799
}}
apps/web/src/components/Sidebar.tsx
+4
-3
@@ -1515,11 +1515,12 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
1515
const accessibleTitle = isRenaming ? null : <span className="sr-only">{thread.title}</span>;
1516
1517
// Stacks show their layer count; multiple unrelated links show their total count.
1518
- // Plain clicks open T3; individual PR links also support opening the host in a new tab.
1518
+ // Either opens the thread's pull requests tab; a single PR link opens that PR and still
1519
+ // supports opening the host in a new tab.
1520
const prBadgeShape = supportsMultiplePullRequests
1521
? resolveThreadPullRequestBadge(thread.pullRequests)
1522
: null;
1522
- const handlePrStackClick = useCallback(() => {
1523
+ const handlePrListClick = useCallback(() => {
1524
useRightPanelStore.getState().open(threadRef, "pull-requests");
1525
if (!props.isActive) onThreadActivate(threadRef);
1526
}, [onThreadActivate, props.isActive, threadRef]);
@@ -1531,7 +1532,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
1532
number={pr?.number ?? currentLinkedPr?.number}
1533
url={pr?.url ?? currentLinkedPr?.url}
1534
status={prStatus}
1534
- onOpenStack={handlePrStackClick}
1535
+ onOpenList={handlePrListClick}
1536
onOpenPullRequest={handlePrClick}
1537
/>
1538
) : null;
apps/web/src/components/ThreadStatusIndicators.tsx
+13
-12
@@ -195,7 +195,8 @@ export function resolveThreadPullRequestBadgePresentation({
195
* The linked-PR badge shared by the sidebar and composer footer. The badge owns what it shows:
196
* the state glyph and number at the meta size, in the state's color. The caller owns the control
197
* it sits in through `render` (an inline link in a sidebar row, a toolbar control in the
198
- * composer), and the badge fills in the link or stack button behavior.
198
+ * composer), and the badge fills in the behavior: a single PR is a link to it, while a stack or
199
+ * several linked PRs is a button that opens the thread's pull requests tab.
200
*/
201
export function ThreadPullRequestBadgeControl({
202
render,
@@ -203,7 +204,7 @@ export function ThreadPullRequestBadgeControl({
204
number,
205
url,
206
status,
206
- onOpenStack,
207
+ onOpenList,
208
onOpenPullRequest,
209
}: {
210
render: ReactElement<{ render?: useRender.RenderProp }>;
@@ -211,7 +212,7 @@ export function ThreadPullRequestBadgeControl({
212
number?: number | undefined;
213
url?: string | undefined;
214
status: PrStatusIndicator | null;
214
- onOpenStack: () => void;
215
+ onOpenList: () => void;
216
onOpenPullRequest: (event: MouseEvent<HTMLElement>) => void;
217
}) {
218
const presentation = resolveThreadPullRequestBadgePresentation({ badge, number, url, status });
@@ -220,9 +221,9 @@ export function ThreadPullRequestBadgeControl({
221
<PullRequestBadge
222
render={render}
223
presentation={presentation}
223
- isStack={badge?.kind === "stack"}
224
+ opensList={badge !== null && (badge.kind === "stack" || badge.others > 0)}
225
url={url}
225
- onOpenStack={onOpenStack}
226
+ onOpenList={onOpenList}
227
onOpenPullRequest={onOpenPullRequest}
228
/>
229
);
@@ -231,26 +232,26 @@ export function ThreadPullRequestBadgeControl({
232
function PullRequestBadge({
233
render,
234
presentation,
234
- isStack,
235
+ opensList,
236
url,
236
- onOpenStack,
237
+ onOpenList,
238
onOpenPullRequest,
239
}: {
240
render: ReactElement<{ render?: useRender.RenderProp }>;
241
presentation: NonNullable<ReturnType<typeof resolveThreadPullRequestBadgePresentation>>;
241
- isStack: boolean;
242
+ opensList: boolean;
243
url: string | undefined;
243
- onOpenStack: () => void;
244
+ onOpenList: () => void;
245
onOpenPullRequest: (event: MouseEvent<HTMLElement>) => void;
246
}) {
246
- const onClick = isStack
247
+ const onClick = opensList
248
? (event: MouseEvent<HTMLElement>) => {
249
event.preventDefault();
250
event.stopPropagation();
250
- onOpenStack();
251
+ onOpenList();
252
}
253
: onOpenPullRequest;
253
- const element = isStack ? (
254
+ const element = opensList ? (
255
<button type="button" />
256
) : (
257
<a href={url} target="_blank" rel="noopener noreferrer" />
docs/user/source-control.md
+1
-1
@@ -164,7 +164,7 @@ on the Pull Requests page, **Link to thread** lets you search for an active thre
164
also lists the threads that link to it, including archived threads, so you can return to their context.
165
166
Thread badges show a stack's layer count or the current review number with a count of additional
167
-links. On mobile, the Git overview lists linked reviews and their stacks; tap a review to open it.
167
+links. Clicking a badge with more than one review opens the **Linked pull requests** panel. On mobile, the Git overview lists linked reviews and their stacks; tap a review to open it.
168
Linking and unlinking are available in the web and desktop clients.
169
170
The **Linked pull requests** panel lists every review and groups stacks. Unlink a review from its