Repository navigation
Commit a9111a2
fix(web): link a pasted pull request to a thread in non-Git workspaces
A project folder that holds several repos but is not itself a Git repo
has no repository identity. Pasting or right-clicking a PR link from
one of those child repos, or using the Link Pull Request dialog, never
offered "Link to thread" because the client only allowed linking when
some registered project's repository identity matched the link's host.
The server already stores a thread's pull request link by host,
repository, and number with no project requirement (thread.pull-request.link
in Orchestrator.ts), and the MCP link_pull_request tool already accepts
a full PR URL with no project match either. Only the web client's gate
was stuck on the old per-project requirement.
canLinkChangeRequest in usePullRequestLinking.ts now allows linking any
recognized PR URL whenever the environment uses multi-link mode (the
threadPullRequests capability), since that storage needs no project at
all. Single-link mode (older servers) still needs a matching project,
since its link still carries a projectId. This covers every entry point
that funnels through usePullRequestLinking().canLink: the "Link to this
thread" prompt under a pasted link, the right-click "Link to thread"
menu item, and the Link Pull Request dialog from the command palette or
PR panel. Mobile has no pull-request-linking UI, so nothing there
needed a change.
Fixes #9435
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>1 parent a1d9d72 commit a9111a2
3 files changed
Lines changed: 50 additions & 12 deletions
File tree
- apps/web/src
- components/pullRequest
- hooks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| |||
204 | 203 | | |
205 | 204 | | |
206 | 205 | | |
207 | | - | |
208 | | - | |
| 206 | + | |
209 | 207 | | |
210 | 208 | | |
211 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
31 | 50 | | |
32 | 51 | | |
33 | 52 | | |
| |||
44 | 63 | | |
45 | 64 | | |
46 | 65 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 66 | + | |
54 | 67 | | |
55 | 68 | | |
56 | 69 | | |
| |||
0 commit comments