From 2ec59ca1fad6d9eb6ae36714b76b6130e63201e6 Mon Sep 17 00:00:00 2001 From: maria Date: Sun, 13 Sep 2026 02:44:51 -0300 Subject: [PATCH] fix(web): hide back button for single linked pull requests (#11520) --- apps/web/src/components/ChatView.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 4e8b370d382c0a208a28dd84533eae62869bf95f..7994b3196f58edc031d943ab01ba4bc76347fd06 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -4228,10 +4228,11 @@ export default function ChatView(props: ChatViewProps) { }, [activeThreadRef]); const supportsThreadPullRequests = serverConfig?.environment.capabilities.threadPullRequests === true; + const visiblePullRequestCount = visibleThreadPullRequests( + (activeThreadShell ?? activeThread)?.pullRequests ?? [], + ).length; const pullRequestsSurfaceAvailable = - isServerThread && - supportsThreadPullRequests && - visibleThreadPullRequests((activeThreadShell ?? activeThread)?.pullRequests ?? []).length > 0; + isServerThread && supportsThreadPullRequests && visiblePullRequestCount > 0; const addPullRequestsSurface = useCallback(() => { if (!activeThreadRef || !pullRequestsSurfaceAvailable) return; useRightPanelStore.getState().open(activeThreadRef, "pull-requests"); @@ -8544,7 +8545,7 @@ export default function ChatView(props: ChatViewProps) { } composerDraftTarget={composerDraftTarget} onBack={ - activeThreadRef !== null && pullRequestsSurfaceAvailable + activeThreadRef !== null && pullRequestsSurfaceAvailable && visiblePullRequestCount > 1 ? addPullRequestsSurface : undefined } -- 2.54.0