Skip to content

Commit 936b397

Browse files
committed
fix(web): prefer foreign links over branch pull requests
1 parent d2af9d6 commit 936b397

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4617,6 +4617,7 @@ export default function ChatView(props: ChatViewProps) {
46174617
);
46184618
// The shell carries server PR updates even while thread detail is still loading.
46194619
const activeThreadMetadata = activeThreadShell ?? activeThread;
4620+
const hasLinkedPullRequestDetail = activeThreadMetadata?.linkedPullRequest != null;
46204621
const linkedThreadPullRequest =
46214622
activeThreadMetadata?.linkedPullRequest ?? activeThreadMetadata?.branchPullRequest ?? null;
46224623
const activeProjectRepository = activeProject?.repositoryIdentity?.displayName ?? null;
@@ -4712,7 +4713,7 @@ export default function ChatView(props: ChatViewProps) {
47124713
if (eligibleLink && pullRequestsCapabilityKnown) {
47134714
if (
47144715
pullRequestsSurfaceAvailable &&
4715-
(visiblePullRequestCount > 1 || linkedThreadPullRequest === null || !supportsPullRequests)
4716+
(visiblePullRequestCount > 1 || !hasLinkedPullRequestDetail || !supportsPullRequests)
47164717
) {
47174718
panels.openProactive(
47184719
activeThreadRef,
@@ -4783,6 +4784,7 @@ export default function ChatView(props: ChatViewProps) {
47834784
latestTurnSettled,
47844785
linkedThreadPullRequest,
47854786
proactivePullRequestsKey,
4787+
hasLinkedPullRequestDetail,
47864788
onDiffPanelOpen,
47874789
pullRequestsCapabilityKnown,
47884790
pullRequestsSurfaceAvailable,

0 commit comments

Comments
 (0)