Skip to content

fix(web): open Azure DevOps PR links in the panel - #1

Closed
jvzijp wants to merge 1 commit into
mainfrom
fix/azure-devops-pr-panel-repository
Closed

jvzijp wants to merge 1 commit into
mainfrom
fix/azure-devops-pr-panel-repository

Conversation

@jvzijp

@jvzijp jvzijp commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Problem

Clicking an Azure DevOps pull request link in an agent message opened the right panel with:

Could not load pull requests
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 selector the server uses.

Fix

  • Move the selector into packages/contracts as pullRequestRepositoryOf and have the server's repositoryIdentityOf delegate to it, so both sides share one rule and cannot drift again.
  • Add changeRequestRepositoryOf in apps/web/src/lib/openPullRequestLink.ts and 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 in ChatMarkdown, and the #123 open in ChatView.
  • The pull requests page resolves a repository-only link with the same selector, so a name-only Azure repository finds its project.
  • Matching a link against a project still compares the full URL path. Only the repository handed to the panel changes.

Mobile takes the repository from the server's linked pull request record and needed no change. Desktop wraps web.

Verification

  • New tests for the shared selector in packages/contracts/src/pullRequest.test.ts and for the Azure link path in apps/web/src/lib/openPullRequestLink.test.ts.
  • Touched test files pass (contracts, web link logic, ChatMarkdown, server PullRequestService).
  • Lint and typecheck clean for contracts, web, and server.

Written by Claude Fable 5.1 in Claude Code.

🤖 Generated with Claude Code

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>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 9, 2026
@jvzijp

jvzijp commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

Reopened against upstream pingdotgg/t3code.

@jvzijp jvzijp closed this Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant