History

feat(pull-requests): link multiple pull requests to threads (#10839)

Julius Marminge committed 2 months ago

Commit afb84891 parent 383cc40172 files · +12057 −908Browse files

Showing the changes to docs (3 of 172 files). Show all

Unified · Split

3 files
  1. docs/internals/glossary.md +8 −0
  2. docs/internals/overview.md +19 −0
  3. docs/user/source-control.md +24 −0
docs/internals/glossary.md+8−0
@@ -45,3 +45,11 @@ Terms whose meaning matters across T3 Code. Architecture and lifecycle constrain · 44 unmodified lines
45| Checkpoint | A saved workspace state used for diffs and restore, stored as a hidden Git ref. |45| Checkpoint | A saved workspace state used for diffs and restore, stored as a hidden Git ref. |
46| Checkpoint baseline | The workspace state captured before the work being compared. |46| Checkpoint baseline | The workspace state captured before the work being compared. |
47| Turn diff | The workspace changes attributed to one turn. |47| Turn diff | The workspace changes attributed to one turn. |
48
49## Pull requests
50
51| Term | Meaning |
52| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
53| 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. |
54| 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. |
55| 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. |
docs/internals/overview.md+19−0
@@ -18,6 +18,25 @@ versioned clients and servers. Subscriptions send the state a client needs, so a · 17 unmodified lines
18thread does not pay for every thread's history. Authentication of a socket does not authorize every18thread does not pay for every thread's history. Authentication of a socket does not authorize every
19method on it. See [environment auth](./environment-auth.md).19method on it. See [environment auth](./environment-auth.md).
20 20
21### Pull request linking compatibility
22
23Web, desktop, mobile, and environments upgrade independently. Negotiate linking through the
24environment descriptor, never through a client version or an assumed coordinated release:
25
26| Environment capability | Client behavior |
27| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
28| `threadPullRequests: true` | Use persisted `pullRequests[]`, multi-link commands, stack UI, and reverse thread lookup. |
29| Only `threadPullRequestLinking: true` | Use `linkedPullRequest` and the existing `thread.meta.update` single-link operation. Do not call multi-link RPCs. |
30| Neither flag | Hide linking actions; existing branch-discovered PR display remains available. |
31
32New environments continue advertising the legacy flag, accepting legacy metadata commands, and
33emitting the derived `linkedPullRequest` field for older clients. That hostless field includes only
34links in the thread project's own repository; cross-host and cross-repository links require the
35multi-link protocol. New clients accept snapshots that
36omit `pullRequests`. Retain the legacy wire fields, projection column, and replay support; this feature
37does not schedule their removal. Missing new capabilities must also override cached multi-link data
38after an environment downgrade.
39
21Provider-specific behavior belongs behind an adapter. Orchestration works with normalized commands40Provider-specific behavior belongs behind an adapter. Orchestration works with normalized commands
22and events, so adding a provider should not require branches throughout the domain or clients.41and events, so adding a provider should not require branches throughout the domain or clients.
23See [provider constraints](./providers.md).42See [provider constraints](./providers.md).
docs/user/source-control.md+24−0
@@ -91,3 +91,27 @@ reopening a declined pull request. · 90 unmodified lines
91 remotes can require separate setup from the hosting provider's API access.91 remotes can require separate setup from the hosting provider's API access.
92- **A review cannot load:** open it on the host website while resolving connectivity, permissions,92- **A review cannot load:** open it on the host website while resolving connectivity, permissions,
93 or rate limits.93 or rate limits.
94
95## Linked pull requests
96
97A thread can hold several pull requests, including reviews from another repository on the same host.
98Use **Link pull request** in the command palette or **Linked pull requests** panel, or right-click a
99pull request link in the conversation. Creating a pull request from Git actions links it automatically.
100Agents can link their pull requests with the `link_pull_request` tool.
101
102Use **Link this PR** in a branch-detected badge's tooltip to keep it with the thread. From a review
103on the Pull Requests page, **Link to thread** lets you search for an active thread. The review header
104also lists the threads that link to it, including archived threads, so you can return to their context.
105
106Thread badges show a stack's layer count or the current review number with a count of additional
107links. On mobile, the Git overview lists linked reviews and their stacks; tap a review to open it.
108Linking and unlinking are available in the web and desktop clients.
109
110The **Linked pull requests** panel lists every review and groups stacks. Unlink a review from its
111row menu. An unlinked stack layer stays out of later syncs. Open linked reviews refresh on the server;
112closed reviews refresh periodically so reopening one on the host is detected. Merged reviews refresh
113when requested. With **Auto-settle merged threads** enabled, a thread can settle after every linked
114review is terminal. An open or unsynced link keeps it active.
115
116Cross-repository links use a project on the same host. Azure DevOps reviews require a project checked
117out from the matching organization and repository.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t