fix(web): reach every PR of a multi-repo thread - #299
Merged
LoganRupe merged 1 commit intoSep 24, 2026
Merged
Conversation
The +N PR badge in the sidebar and composer now opens a right-panel tab per pull request when they are unrelated (one per repo, say), and lists them all on hover. Stacks still open the ordered Pull requests list. The multi-repo Source Control popover reads each repo's worktree for an isolated run instead of the original checkout, so each row shows the run's PR. View PR passes the PR's URL, so a non-primary repo row opens its own repository's PR rather than the same number in the primary repo. Fixes #298
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
ChatView must preserve Forgejo ports and correctly resolve or fall back for non-primary Azure PRs.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Updates multi-repository PR navigation and makes Source Control status worktree-aware.
Changes:
- Opens linked PRs in separate tabs and improves badge tooltips.
- Routes PR actions using repository-specific URLs.
- Uses isolated worktrees for multi-repo status rows.
- Adds coverage for multi-PR badge behavior.
| File | Summary |
|---|---|
apps/web/src/lib/vcsStatusState.ts |
Exports repository display-name helper. |
apps/web/src/lib/openPullRequestLink.ts |
Adds multi-PR tab opening logic. |
apps/web/src/components/ThreadStatusIndicators.tsx |
Updates badge labels and tooltips. |
apps/web/src/components/ThreadStatusIndicators.test.ts |
Tests multi-PR badge behavior. |
apps/web/src/components/Sidebar.tsx |
Opens linked PR tabs from sidebar badges. |
apps/web/src/components/GitActionsControl.tsx |
Passes PR URLs to handlers. |
apps/web/src/components/ChatView.tsx |
Uses worktrees and repository-specific PR targets. |
apps/web/src/components/chat/MultiRepoGitControl.tsx |
Updates PR callback typing. |
apps/web/src/components/chat/ChatHeader.tsx |
Updates header callback typing. |
apps/web/src/components/BranchToolbarBranchSelector.tsx |
Opens linked PR tabs from composer badges. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| useRightPanelStore.getState().openPullRequest(activeThreadRef, { | ||
| projectId: activeProject.id, | ||
| repository: activeProjectRepository, | ||
| ...(parsed ? { host: parsed.host } : {}), |
LoganRupe
added a commit
that referenced
this pull request
Sep 24, 2026
The +N PR badge in the sidebar and composer now opens a right-panel tab per pull request when they are unrelated (one per repo, say), and lists them all on hover. Stacks still open the ordered Pull requests list. The multi-repo Source Control popover reads each repo's worktree for an isolated run instead of the original checkout, so each row shows the run's PR. View PR passes the PR's URL, so a non-primary repo row opens its own repository's PR rather than the same number in the primary repo. Fixes #298 Co-authored-by: Logan Rupe <logzerroneous@gmail.com>
LoganRupe
added a commit
that referenced
this pull request
Sep 26, 2026
The +N PR badge in the sidebar and composer now opens a right-panel tab per pull request when they are unrelated (one per repo, say), and lists them all on hover. Stacks still open the ordered Pull requests list. The multi-repo Source Control popover reads each repo's worktree for an isolated run instead of the original checkout, so each row shows the run's PR. View PR passes the PR's URL, so a non-primary repo row opens its own repository's PR rather than the same number in the primary repo. Fixes #298 Co-authored-by: Logan Rupe <logzerroneous@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What Changed
+Nbadge stands for PRs in different repos, clicking it opens one right-panel tab per PR. The thread's current PR opens last, so its tab is the one showing. Hovering lists every PR with its number, title and state, instead of "PR [pull] main from pingdotgg:main #5 … and 1 more linked". Stacks still open the ordered Pull requests list. If none of the PRs match a project, the click falls back to that list. The tabs go through the same link resolver the Pull requests list uses (useOpenThreadPullRequestTabsinlib/openPullRequestLink.ts), and only the active tab loads its details.ChatView.tsx). The row is still labelled by repo name, not the worktree folder.Why
Fixes #298. Your agents already link each repo's PR, so the links were never missing. The badge still behaved like a link to one PR, and the header rows looked at checkouts that were on
main. On a Max + Max_Workspace run, Max showed "Clean · Create PR" while Coldtap/Max#27 was open.Verified: web typecheck is clean and
ThreadStatusIndicators.test.tspasses. It covers the new count label and which badges open a list. In real dev builds of this branch andmulti-repo-workspaces, I seeded the same two-repo isolated run with both PRs linked, and a scripted flow checked hover, click and popover on both builds. The Before build failed at the click and at the popover, and the After build passed. The fixture uses a local fakegh, so PR titles and details come from fixture data.Limits: a PR only opens as a tab when it resolves to a project, which means the primary repo or any non-Azure host the project has a checkout on. Azure DevOps PRs in non-primary repos (MaxExternal, Max-Forms) fall back to the list. The Pull requests list resolves PRs the same way, so that limit is older than this change. The command palette, the legacy sidebar and mobile still show a single PR.
UI Changes
Before/after on a two-repo isolated run with a PR linked in each repo: hover the
+2badge, click it, open the other PR, then open Source Control.compare.mp4