fix(web): linked pull requests stay in the thread panel - #8188
fix(web): linked pull requests stay in the thread panel#8188RakshithBhat03 wants to merge 3 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The PR makes a focused routing/context fix for linked pull requests in the thread panel, while preserving standalone page behavior and avoiding foreign workspace actions. Its production changes are localized and supported by targeted tests. You can add or adjust custom eligibility rules. Learn more. |
f5b9655 to
8285122
Compare
Dismissing prior approval to re-evaluate 8285122
There was a problem hiding this comment.
One finding: the new thread-ref provider is applied to every pull request shown beside a thread, including pull requests from another project, which lets file chips and workspace images in that body resolve against the thread's workspace instead of the pull request's.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f754d75. Configure here.
|
Superseded by merged #10623 — same fix for pull-request markdown links opening in the panel (and staying in the thread panel) instead of navigating away. |

Opening a pull request from a chat thread keeps it in the thread's right panel. Clicking another GitHub pull request link inside that pull request instead left the thread route, opened the Pull Requests page, and lost the previous panel context.
How to reproduce
https://github.com/pingdotgg/t3code/pull/8089.#6446.Pull request markdown rendered in a thread panel now receives the owning thread reference. The existing link handler can then open the linked pull request as another right-panel tab without changing the thread route. Pull request links opened from the standalone Pull Requests page keep their existing page-level behavior.
Tests: 37 focused tests, web typecheck, targeted lint.
Before
before-pr-link-navigation.mp4
After
after-pr-link-navigation.mp4
Built by GPT-5.6 Sol in T3 Code through the Codex harness.
Note
Fix linked pull request links to stay scoped to the thread panel
pullRequestLinkThreadRefprop toChatMarkdownso pull request link navigation can bind to a specific thread even when the markdown itself isn't thread-scoped.PullRequestThreadRefProviderin PullRequestMarkdown.tsx, a context that supplies athreadRefand ascopeWorkspaceToThreadflag to descendants.PullRequestMarkdownnow passespullRequestLinkThreadRefunconditionally andthreadRefonly whenscopeWorkspaceToThreadis true, so links stay in-thread while file/workspace actions are conditionally scoped.ChatViewwrapsPullRequestDetailPanelin the new provider, computingactivePullRequestBelongsToThreadviaisThreadOwnPullRequest.useOpenChangeRequestLinkin ChatMarkdown.tsx now preferspullRequestLinkThreadRef ?? threadRef; callers not passing the new prop fall back to existingthreadRefbehavior.Macroscope summarized 996032d.
Note
Low Risk
Localized UI routing for markdown PR links and context wiring in the thread right panel; no auth or data-layer changes.
Overview
Fixes PR-to-PR navigation from a pull request body while a chat thread is open: those links no longer jump to the standalone Pull Requests route.
ChatMarkdowngains optionalpullRequestLinkThreadRefsouseOpenChangeRequestLinkcan open another PR as a right-panel tab even whenthreadRefis omitted (avoiding thread-scoped file/workspace actions on foreign workspaces).PullRequestThreadRefProvidersupplies that scope fromPullRequestMarkdown: it always forwards the active thread for PR link navigation, but only passesthreadRefinto markdown whenscopeWorkspaceToThreadis true.ChatViewwraps the thread-panelPullRequestDetailPanelwith the provider, usingactivePullRequestBelongsToThreadto decide whether file paths should stay tied to the thread workspace versus navigation-only threading.Tests cover the split between navigation-only and full thread scoping, plus standalone PR page behavior.
Reviewed by Cursor Bugbot for commit 996032d. Bugbot is set up for automated code reviews on this repo. Configure here.