Repository navigation
Conversation
Clicking an Azure DevOps pull request link in a message opened the right panel with "Pull request operation resolveRepository failed: The change request does not belong to the selected project." The server names an Azure DevOps repository by its bare name because `az repos pr` refuses the full `org/project/_git/repo` path. The web client built its references from the identity's `displayName`, which is that full path, so the server's repository check in `requireProject` rejected every reference the client sent. GitHub and GitLab were unaffected because their `displayName` already is the server's selector. Move the selector into `packages/contracts` as `pullRequestRepositoryOf` and have the server's `repositoryIdentityOf` delegate to it, so the two sides share one rule. On the web side, `changeRequestRepositoryOf` in `openPullRequestLink.ts` applies it wherever a reference is built from a matched project: the right-panel link open, the standalone pull requests page navigation, the markdown link preview and thread-link action in ChatMarkdown, and the `pingdotgg#123` open in ChatView. The pull requests page also resolves a repository-only link with the same selector. Matching a link against a project still compares the full URL path. Mobile takes the repository from the server's linked pull request record and needed no change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Owner
Author
|
Reopened against upstream pingdotgg/t3code. |
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.
Problem
Clicking an Azure DevOps pull request link in an agent message opened the right panel with:
The server names an Azure DevOps repository by its bare name because
az repos prrefuses the fullorg/project/_git/repopath. The web client built its references from the identity'sdisplayName, which is that full path, so the server's repository check inrequireProjectrejected every reference the client sent. GitHub and GitLab were unaffected because theirdisplayNamealready is the selector the server uses.Fix
packages/contractsaspullRequestRepositoryOfand have the server'srepositoryIdentityOfdelegate to it, so both sides share one rule and cannot drift again.changeRequestRepositoryOfinapps/web/src/lib/openPullRequestLink.tsand use it wherever the web client builds a reference from a matched project: the right-panel link open, the standalone pull requests page navigation, the markdown link preview and thread-link action inChatMarkdown, and the#123open inChatView.Mobile takes the repository from the server's linked pull request record and needed no change. Desktop wraps web.
Verification
packages/contracts/src/pullRequest.test.tsand for the Azure link path inapps/web/src/lib/openPullRequestLink.test.ts.Written by Claude Fable 5.1 in Claude Code.
🤖 Generated with Claude Code