authorgravatar for maria@kuuro.netmaria <maria@kuuro.net> 2026-09-13 02:44:51-03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-13 02:44:51-03:00
log2ec59ca1fad6d9eb6ae36714b76b6130e63201e6
tree5e02e9e7db85019e15ac183702d7691ff8c29b8d
parent46140c96afe1d8a8b5b4bde1fccb671f8760017a
signature Signed by PGP key B5690EEEBB952194

fix(web): hide back button for single linked pull requests (#11520)


1 files changed, 5 insertions(+), 4 deletions(-)

apps/web/src/components/ChatView.tsx+5-4
......@@ -4228,10 +4228,11 @@ export default function ChatView(props: ChatViewProps) {
42284228 }, [activeThreadRef]);
42294229 const supportsThreadPullRequests =
42304230 serverConfig?.environment.capabilities.threadPullRequests === true;
4231 const visiblePullRequestCount = visibleThreadPullRequests(
4232 (activeThreadShell ?? activeThread)?.pullRequests ?? [],
4233 ).length;
42314234 const pullRequestsSurfaceAvailable =
4232 isServerThread &&
4233 supportsThreadPullRequests &&
4234 visibleThreadPullRequests((activeThreadShell ?? activeThread)?.pullRequests ?? []).length > 0;
4235 isServerThread && supportsThreadPullRequests && visiblePullRequestCount > 0;
42354236 const addPullRequestsSurface = useCallback(() => {
42364237 if (!activeThreadRef || !pullRequestsSurfaceAvailable) return;
42374238 useRightPanelStore.getState().open(activeThreadRef, "pull-requests");
......@@ -8544,7 +8545,7 @@ export default function ChatView(props: ChatViewProps) {
85448545 }
85458546 composerDraftTarget={composerDraftTarget}
85468547 onBack={
8547 activeThreadRef !== null && pullRequestsSurfaceAvailable
8548 activeThreadRef !== null && pullRequestsSurfaceAvailable && visiblePullRequestCount > 1
85488549 ? addPullRequestsSurface
85498550 : undefined
85508551 }