fix(web): keep PR panel actions in the current thread - #12320
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped web bug fix that corrects pull-request panel context detection and keeps existing thread or draft actions in the appropriate composer, with focused regression coverage and no schema, infrastructure, security, billing, or default changes. A separate unresolved Medium-severity finding identifies an edge case involving all-dismissed links and should be handled by the repository’s correctness gate. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
💤 Files with no reviewable changes (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe pull-request panel now derives context from visible thread links and routes supplied composer targets directly. Tests cover panel actions across stacked, unrelated, draft, and standalone contexts. Several unrelated component test files are removed. ChangesComposer target routing
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The updated panel routing preserves existing drafts when a target is supplied and still creates a new thread for standalone pages without one. No concrete merge-readiness risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
PR panel actions kept regressing because ChatView decided "is this the thread's own PR" from the single legacy linkedPullRequest field, which the server re-derives from the full link list and has changed nine times. Any thread with a stack or a second link got context="page", so actions opened a new thread and the checkout button appeared for a branch already under the reader's feet. The only test on the seam asserted that behavior. Move the decision into pullRequestPanelContext, fed the thread's full pullRequests list with the legacy fields as a fallback for old servers. Test it from realistic link fixtures (a five-layer stack, two links, an unsynced manual link, a dismissed stack member), and have the panel test derive its scenarios through the same function so it also checks checkout visibility. Remove the string-presence and label-lookup tests in the pull request directory that could not catch any of this. Model: Claude Fable 5. Harness: Claude Code. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dismissing prior approval to re-evaluate c409cba
This comment has been minimized.
This comment has been minimized.
## What's Changed * fix(web): keep PR panel actions in the current thread by @Bil0000 in pingdotgg/t3code#12320 * fix(web): keep browser pages aligned during panel animations by @juliusmarminge in pingdotgg/t3code#12329 * fix(server): bound provider event log records before serialization by @juliusmarminge in pingdotgg/t3code#12305 * fix(server): reject file rewind in shared workspaces by @juliusmarminge in pingdotgg/t3code#12306 * fix(server): capture checkpoints when baseline lookup fails by @juliusmarminge in pingdotgg/t3code#12307 * fix(server): refresh file search outside checkpoint processing by @juliusmarminge in pingdotgg/t3code#12308 * fix(web): keep chat from jumping when the scroll-to-end pill mounts by @Yash-Singh1 in pingdotgg/t3code#12317 * fix(server): checkpoint workspaces with empty nested repositories by @saphid in pingdotgg/t3code#12181 * chore(review): keep review bots out of the vendored .repos references by @juliusmarminge in pingdotgg/t3code#12333 * fix(server): pass Codex image attachments by path to avoid oversized requests by @saphid in pingdotgg/t3code#11050 * feat(web): filter sidebar from thread menu by @saphid in pingdotgg/t3code#8719 * feat(web): open diff files from a right-click context menu by @saphid in pingdotgg/t3code#11842 * fix(web): keep numbered jumps from stealing browser tabs by @Yash-Singh1 in pingdotgg/t3code#12315 * fix(mobile): define Clerk colors in every Uniwind theme by @juliusmarminge in pingdotgg/t3code#12344 * refactor(web): reuse searchable picker inputs by @juliusmarminge in pingdotgg/t3code#12353 * fix(web): share touch-visible pull request edit actions by @juliusmarminge in pingdotgg/t3code#12370 * fix(mobile): share accessible connection trace controls by @juliusmarminge in pingdotgg/t3code#12371 * fix(mobile): share settings control row layout by @juliusmarminge in pingdotgg/t3code#12356 * refactor(web): share diagnostic process actions by @juliusmarminge in pingdotgg/t3code#12358 * refactor(mobile): share Android toolbar search fields by @juliusmarminge in pingdotgg/t3code#12359 * refactor(web): share settings group surfaces by @juliusmarminge in pingdotgg/t3code#12360 * refactor(web): reuse inline settings actions by @juliusmarminge in pingdotgg/t3code#12362 * refactor(mobile): share thread list section controls by @juliusmarminge in pingdotgg/t3code#12363 * refactor(mobile): share connection form fields by @juliusmarminge in pingdotgg/t3code#12364 * refactor(mobile): share local environment lists by @juliusmarminge in pingdotgg/t3code#12365 * refactor(mobile): share file preview feedback by @juliusmarminge in pingdotgg/t3code#12368 * refactor(web): share standalone page layout by @juliusmarminge in pingdotgg/t3code#12354 * fix(mobile): share settings action row defaults by @juliusmarminge in pingdotgg/t3code#12369 * fix(mobile): share request action button defaults by @juliusmarminge in pingdotgg/t3code#12366 * fix(web): share accessible color picker controls by @juliusmarminge in pingdotgg/t3code#12355 **Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260917.1880...v0.0.43-nightly.20260918.1895 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260918.1895
PR actions in the chat right panel could open a new thread when the displayed PR did not match the primary linked PR. The same flag controlled checkout visibility and composer selection.
Use the supplied composer for all agent handoffs. Resolve conflicts, fix findings/checks, ask/explain, and selected-code notes now stay in the current thread or draft. Standalone PR pages still open a new draft.
Added 24 panel action regression cases that check the real composer store, preserve existing draft text, and reject unintended thread creation or checkout. Twelve cases reproduced the bug before the fix.
Validation: 156 focused tests passed; web typecheck and formatting passed; targeted lint passed with existing component warnings. Tests use stubbed host queries and child controls; no browser pass was run.
Model: GPT-6. Harness: Codex.
Second commit: the
contextprop itself was the recurring failure. ChatView decided "is this the thread's own PR" from the single legacylinkedPullRequestfield, which the server re-derives from the full link list and has changed nine times since August; any thread with a stack or a second link gotcontext="page". The decision now lives inpullRequestPanelContext, fed the thread's fullpullRequestslist (legacy fields only as a fallback for old servers), and is tested from realistic fixtures: a five-layer stack whose legacy field names the top layer, a created+stack pair, an unsynced manual link, a dismissed stack member, another project's checkout of the same repository. The panel test derives its scenarios through the same function and now also asserts checkout-button visibility. String-presence tests in the pull request directory that could not catch any of this are removed.Verified the new tests bite: with the link-list branch removed, three logic cases and the panel's checkout case fail. 143 tests in the two files pass; web typecheck clean.
Model: Claude Fable 5. Harness: Claude Code.
Summary by CodeRabbit