feat: link pull requests to threads - #8160
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This adds a new cross-layer workflow for linking pull requests to threads, including persistent schema/event changes, periodic external status refreshes, sidebar behavior, and automatic settlement. The breadth of runtime behavior and user-facing capability warrants human review. You can add or adjust custom eligibility rules. Learn more. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d071366. Configure here.
There was a problem hiding this comment.
One finding: the new Link to thread / Unlink from thread context-menu action fails silently, unlike every other user-invoked action in ChatMarkdown.tsx (and unlike useThreadActionMenu's updateMetadata calls), which pair the log with an error toast. No other in-scope findings — the change adds no new controls, class strings, or CSS, and reuses the existing ContextMenuItem / showExternalLinkContextMenu contract.
Posted via Macroscope — UI Consistency
## What's Changed * feat(web): settle and restore threads with a keyboard shortcut by @t3dotgg in pingdotgg/t3code#8089 * perf(desktop): cut macOS signing calls by 81% by @t3dotgg in pingdotgg/t3code#8093 * feat: link pull requests to threads by @t3dotgg in pingdotgg/t3code#8160 * feat(web): safely attach HEIC photos as JPEG images by @t3dotgg in pingdotgg/t3code#8161 **Full Changelog**: pingdotgg/t3code@v0.0.34-nightly.20260825.1181...v0.0.34-nightly.20260825.1182 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.34-nightly.20260825.1182

PR links in chat could not be attached to their thread, so the sidebar missed them and merged PRs did not settle the thread.
Right-click a PR link and choose "Link to thread." The link appears in the sidebar, syncs across devices, and settles the thread when the PR merges. The same menu can remove the link.
Verified with 557 focused tests and type checks across contracts, client runtime, server, web, and mobile.
Built with GPT-5.6 Sol in the Codex harness.
Note
Medium Risk
Adds persisted thread metadata, a DB migration, and changes how sidebar/chat resolve PR state and settlement; incorrect identity or reload handling could mis-settle threads or flash PR status.
Overview
Threads can now persist a linked pull request via
thread.meta.update, with a newthreadPullRequestLinkingserver capability, projection column/migration 042, and shell/event plumbing end-to-end.On web/desktop, right-clicking a PR URL in chat adds Link to thread / Unlink from thread, which updates thread metadata when the server supports linking. Sidebars and chat status stop relying only on local git for linked threads: they load live PR detail (with snapshot identity checks) so merge/close still drives auto-settle and indicators even when checkout/branch does not match.
Mobile thread list v2 mirrors that model—change-request cache entries carry a linked PR key, stale settlement is ignored after relink, and
useThreadPrprefers linked PR detail over branch git status.User docs note that linked PRs show in the sidebar and can settle on merge when auto-settle is enabled.
Reviewed by Cursor Bugbot for commit 5284bbd. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add ability to link and unlink pull requests to threads
ThreadLinkedPullRequestschema andthread.meta.updatesupport, along with migration 42 to persistlinked_pull_request_jsonon ProjectionThreads.ts.threadPullRequestLinking: trueand propagates linked PR data through projection pipelines.useLinkedThreadPullRequestfetch live PR details for linked threads, bypassing local git status inference.buildThreadListV2Itemsin threadListV2.ts ignores cached change request state if itslinkedPullRequestKeydoes not match the current thread's linked PR, which prevents incorrect auto-settlement after relinking.Macroscope summarized 5284bbd.