Conversation
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…esult Track the held search result from the moment the press attaches and cancel in a layout effect, so neither a pending press nor a release before passive effects flush can attach a result that has left the search results. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — The change cancels a sidebar search drag when its result disappears. It also adds a line-level lint suppression, which requires human review under the configured policy. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…3bf701a89ea Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While a sidebar search result was being dragged, editing the search could remove that result, and a later release over the composer still attached it as a thread reference. The sidebar now records which search result is held as soon as the press begins, even before it passes the drag threshold. It then cancels the drag in the same render that removes the result, so neither a held press nor a quick release can attach a result that is no longer shown.
Related: #44844, #21550
Reproduction on main
Commit 52682d10f9 (main). The composer adds a reference to the thread from the first search. Expected: The drag ends when its search result disappears, leaving the composer unchanged.
The cause is at
apps/web/src/components/Sidebar.tsx:3451. Ranpnpm scenarios:prove scripts/scenarios/sidebar-search-drag-ends-when-results-disappear.e2e.ts --target webwith the repro scenario added: it failed in 2 of 2 runs on a clean boat.dev VM, withexpected 1 to be 0in the output.Evidence
Environment: Linux x64 on a boat.dev VM reset before each run, the repository's own tests.
Proven: the replacement test
apps/web/src/components/Sidebar.drag.browser.test.tsxfails at the test commit 0da3c76985 and passes on the head 4b1ff31543, both on main e59f9db983.The composer adds a reference to the thread from the first search.
The drag ends when its search result disappears, leaving the composer unchanged.
Tests
pnpm exec vp run check:changed e59f9db9838fe0ad61d22d8e73fdfaf53f67ba5bpassed on head.Not in this change
Who did the work
Made in T3 Code by GPT 6.2 Sol and Claude Opus 5.5