feat(pull-requests): link multiple pull requests to threads (#10839)
This commit is contained in:
1 parent
383cc40f4d
commit
afb84898be
172 files changed
+12063
-914
No files matched your search
@@ -45,3 +45,11 @@ Terms whose meaning matters across T3 Code. Architecture and lifecycle constrain
|
||||
| Checkpoint | A saved workspace state used for diffs and restore, stored as a hidden Git ref. |
|
||||
| Checkpoint baseline | The workspace state captured before the work being compared. |
|
||||
| Turn diff | The workspace changes attributed to one turn. |
|
||||
|
||||
## Pull requests
|
||||
|
||||
| Term | Meaning |
|
||||
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Pull request link | A persisted thread association identified by host, repository, and number. Links can cross projects within an environment and carry a server-maintained snapshot. |
|
||||
| Pull request sync | The reactor that refreshes each distinct linked review once per cadence and discovers native stack layers. Explicit refreshes and failed stack reads trigger another read. |
|
||||
| Current pull request | The link used by single-review controls and older clients. Open work takes precedence; a completed single chain points at its top layer. Unrelated terminal links use the latest update. |
|
||||
@@ -18,6 +18,25 @@ versioned clients and servers. Subscriptions send the state a client needs, so a
|
||||
thread does not pay for every thread's history. Authentication of a socket does not authorize every
|
||||
method on it. See [environment auth](./environment-auth.md).
|
||||
|
||||
### Pull request linking compatibility
|
||||
|
||||
Web, desktop, mobile, and environments upgrade independently. Negotiate linking through the
|
||||
environment descriptor, never through a client version or an assumed coordinated release:
|
||||
|
||||
| Environment capability | Client behavior |
|
||||
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
||||
| `threadPullRequests: true` | Use persisted `pullRequests[]`, multi-link commands, stack UI, and reverse thread lookup. |
|
||||
| Only `threadPullRequestLinking: true` | Use `linkedPullRequest` and the existing `thread.meta.update` single-link operation. Do not call multi-link RPCs. |
|
||||
| Neither flag | Hide linking actions; existing branch-discovered PR display remains available. |
|
||||
|
||||
New environments continue advertising the legacy flag, accepting legacy metadata commands, and
|
||||
emitting the derived `linkedPullRequest` field for older clients. That hostless field includes only
|
||||
links in the thread project's own repository; cross-host and cross-repository links require the
|
||||
multi-link protocol. New clients accept snapshots that
|
||||
omit `pullRequests`. Retain the legacy wire fields, projection column, and replay support; this feature
|
||||
does not schedule their removal. Missing new capabilities must also override cached multi-link data
|
||||
after an environment downgrade.
|
||||
|
||||
Provider-specific behavior belongs behind an adapter. Orchestration works with normalized commands
|
||||
and events, so adding a provider should not require branches throughout the domain or clients.
|
||||
See [provider constraints](./providers.md).
|
||||
|
||||
@@ -91,3 +91,27 @@ reopening a declined pull request.
|
||||
remotes can require separate setup from the hosting provider's API access.
|
||||
- **A review cannot load:** open it on the host website while resolving connectivity, permissions,
|
||||
or rate limits.
|
||||
|
||||
## Linked pull requests
|
||||
|
||||
A thread can hold several pull requests, including reviews from another repository on the same host.
|
||||
Use **Link pull request** in the command palette or **Linked pull requests** panel, or right-click a
|
||||
pull request link in the conversation. Creating a pull request from Git actions links it automatically.
|
||||
Agents can link their pull requests with the `link_pull_request` tool.
|
||||
|
||||
Use **Link this PR** in a branch-detected badge's tooltip to keep it with the thread. From a review
|
||||
on the Pull Requests page, **Link to thread** lets you search for an active thread. The review header
|
||||
also lists the threads that link to it, including archived threads, so you can return to their context.
|
||||
|
||||
Thread badges show a stack's layer count or the current review number with a count of additional
|
||||
links. On mobile, the Git overview lists linked reviews and their stacks; tap a review to open it.
|
||||
Linking and unlinking are available in the web and desktop clients.
|
||||
|
||||
The **Linked pull requests** panel lists every review and groups stacks. Unlink a review from its
|
||||
row menu. An unlinked stack layer stays out of later syncs. Open linked reviews refresh on the server;
|
||||
closed reviews refresh periodically so reopening one on the host is detected. Merged reviews refresh
|
||||
when requested. With **Auto-settle merged threads** enabled, a thread can settle after every linked
|
||||
review is terminal. An open or unsynced link keeps it active.
|
||||
|
||||
Cross-repository links use a project on the same host. Azure DevOps reviews require a project checked
|
||||
out from the matching organization and repository.
|
||||
Reference in new issue
Block a user