Reported reproduction
With selectable messages visible in ChatView:
- Click a control in the sidebar, a dialog, or the close button of the top-right notification.
- Release the mouse button and move the pointer over the chat.
- Observe text selection continuing to follow the pointer even though the button is up.
- Click in ChatView again: the release ends the drag at that position. A further click clears the selection.
Expected: a gesture that begins outside selectable chat content never starts a chat selection. Every selection drag ends on release or cancellation, even if another surface owns the release.
Current foundation
Text selection was moved to gpui_base::TextSelection in #219. There are existing markdown selection/link tests and a prior titlebar-specific fix in #191. Trace the current shared selection layer, hit testing and propagation through sidebar/dialog/notification surfaces; do not restore an obsolete application-local selection implementation by default.
Mouse-down leaking while mouse-up is consumed is a hypothesis consistent with the report, not a confirmed event trace. Capture event phase, hit target and button state to locate the owner.
Acceptance criteria
- Sidebar, dialog, popover and notification-close gestures never arm underlying chat selection.
- A legitimate chat drag still works across markdown blocks and ends when the button is released, including release over an overlay or outside the window and focus loss where the platform permits.
- Links, context menus and copy continue to work.
- A regression exercises real event dispatch and layer composition, not just selection-state setters. Verify the reported sequence in both themes and record platform/revision details.
This audit verified the current selection ownership, but did not reproduce the GUI failure.
Code context
Reviewed against main at b4c549787da6 (2026-09-08).
Reported reproduction
With selectable messages visible in ChatView:
Expected: a gesture that begins outside selectable chat content never starts a chat selection. Every selection drag ends on release or cancellation, even if another surface owns the release.
Current foundation
Text selection was moved to
gpui_base::TextSelectionin #219. There are existing markdown selection/link tests and a prior titlebar-specific fix in #191. Trace the current shared selection layer, hit testing and propagation through sidebar/dialog/notification surfaces; do not restore an obsolete application-local selection implementation by default.Mouse-down leaking while mouse-up is consumed is a hypothesis consistent with the report, not a confirmed event trace. Capture event phase, hit target and button state to locate the owner.
Acceptance criteria
This audit verified the current selection ownership, but did not reproduce the GUI failure.
Code context
Reviewed against
mainatb4c549787da6(2026-09-08).