Skip to content

Fix terminal text selection not auto-scrolling when dragging beyond bounds#9448

Merged
seemeroland merged 4 commits intomasterfrom
oz-agent/APP-3952-fix-drag-autoscroll
May 5, 2026
Merged

Fix terminal text selection not auto-scrolling when dragging beyond bounds#9448
seemeroland merged 4 commits intomasterfrom
oz-agent/APP-3952-fix-drag-autoscroll

Conversation

@seemeroland
Copy link
Copy Markdown
Contributor

@seemeroland seemeroland commented Apr 29, 2026

Description

Fix terminal text selection no longer auto-scrolling downward when drag exits the scroll container (block list).

Root cause: LeftMouseDragged events were subject to z-index coverage checks in DispatchedEvent::at_z_index(). When the user dragged downward past the block list, the cursor entered the area of higher-z-index UI elements (input/footer), causing is_covered() to return true and the drag events to be filtered out. This prevented the block list element from receiving drag events, so its auto-scroll logic (mouse_dragged()) never executed.

Fix: Bypass z-index filtering for LeftMouseDragged events in the blocklist element specifically when selecting.

Fixes APP-3952

Testing

Manual testing: https://www.loom.com/share/0e81bc86229a4e0085b52253ca846346

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Changelog Entries for Stable

CHANGELOG-BUG-FIX: Fixed terminal text selection not auto-scrolling when dragging beyond bounds

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: {"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/users/users#get-the-authenticated-user","status":"403"}.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Apr 29, 2026

@seemeroland

I'm starting a first review of this pull request.

I completed the review and posted feedback on this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I completed the review and posted feedback on this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@seemeroland
Copy link
Copy Markdown
Contributor Author

@cla-bot check

@seemeroland seemeroland requested a review from alokedesai April 29, 2026 17:15
@seemeroland seemeroland changed the title Target to blocklist element selection drag instead of blanket Fix terminal text selection not auto-scrolling when dragging beyond bounds Apr 29, 2026
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR changes block-list event dispatch so active terminal text-selection drags can continue when the pointer crosses into higher-z-index UI, fixing downward auto-scroll during selection. The security pass did not identify any security-specific issues in this event-routing change.

Concerns

  • The z-index bypass applies to drag events but not to the corresponding mouse-up event, so releasing over the same covered footer/input region can skip BlockTextSelectAction::End and leave the terminal in selection mode.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/terminal/block_list_element.rs Outdated
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: {"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/users/users#get-the-authenticated-user","status":"403"}.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@seemeroland seemeroland force-pushed the oz-agent/APP-3952-fix-drag-autoscroll branch from a6fc4fa to a30808f Compare April 29, 2026 18:48
@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
seemeroland and others added 4 commits April 29, 2026 13:49
…ts scroll container

LeftMouseDragged events were subject to z-index coverage checks in
at_z_index(), causing them to be dropped when the cursor moved over
higher-z-index UI elements (like the input/footer area) below the block
list. This broke downward auto-scroll during text selection drag.

The fix bypasses z-index filtering for LeftMouseDragged events, matching
the existing behavior for MouseMoved events. Once a drag starts, the
originating element should continue to receive drag events regardless of
what higher-z-index elements the cursor passes over. Element handlers
already have their own guards (e.g. is_terminal_selecting) to avoid
processing drag events they didn't initiate.

Fixes APP-3952

Co-Authored-By: Oz <oz-agent@warp.dev>
Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com>
@seemeroland seemeroland force-pushed the oz-agent/APP-3952-fix-drag-autoscroll branch from a30808f to 13b854d Compare April 29, 2026 18:49
@seemeroland
Copy link
Copy Markdown
Contributor Author

/oz-review

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adjusts BlockListElement event dispatch so active terminal text selections use raw left-drag and left-up events instead of z-index-filtered events, preserving auto-scroll and selection teardown when the cursor moves over higher-z UI below the block list.

Concerns

  • No correctness, security, or error-handling issues found in the provided diff.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@seemeroland seemeroland merged commit b7dd0ef into master May 5, 2026
28 checks passed
@seemeroland seemeroland deleted the oz-agent/APP-3952-fix-drag-autoscroll branch May 5, 2026 18:27
Leejaywell pushed a commit to Leejaywell/warp that referenced this pull request May 5, 2026
…ounds (warpdotdev#9448)

## Description

Fix terminal text selection no longer auto-scrolling downward when drag
exits the scroll container (block list).

**Root cause:** `LeftMouseDragged` events were subject to z-index
coverage checks in `DispatchedEvent::at_z_index()`. When the user
dragged downward past the block list, the cursor entered the area of
higher-z-index UI elements (input/footer), causing `is_covered()` to
return true and the drag events to be filtered out. This prevented the
block list element from receiving drag events, so its auto-scroll logic
(`mouse_dragged()`) never executed.

**Fix:** Bypass z-index filtering for `LeftMouseDragged` events in the
blocklist element specifically when selecting.

Fixes APP-3952

## Testing

Manual testing:
https://www.loom.com/share/0e81bc86229a4e0085b52253ca846346

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

## Changelog Entries for Stable

CHANGELOG-BUG-FIX: Fixed terminal text selection not auto-scrolling when
dragging beyond bounds

---------

Co-authored-by: Oz <oz-agent@warp.dev>
Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com>
Leejaywell pushed a commit to Leejaywell/warp that referenced this pull request May 5, 2026
…ounds (warpdotdev#9448)

## Description

Fix terminal text selection no longer auto-scrolling downward when drag
exits the scroll container (block list).

**Root cause:** `LeftMouseDragged` events were subject to z-index
coverage checks in `DispatchedEvent::at_z_index()`. When the user
dragged downward past the block list, the cursor entered the area of
higher-z-index UI elements (input/footer), causing `is_covered()` to
return true and the drag events to be filtered out. This prevented the
block list element from receiving drag events, so its auto-scroll logic
(`mouse_dragged()`) never executed.

**Fix:** Bypass z-index filtering for `LeftMouseDragged` events in the
blocklist element specifically when selecting.

Fixes APP-3952

## Testing

Manual testing:
https://www.loom.com/share/0e81bc86229a4e0085b52253ca846346

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

## Changelog Entries for Stable

CHANGELOG-BUG-FIX: Fixed terminal text selection not auto-scrolling when
dragging beyond bounds

---------

Co-authored-by: Oz <oz-agent@warp.dev>
Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com>
Leejaywell added a commit to Leejaywell/warp that referenced this pull request May 5, 2026
Cherry-picked from upstream:
- fix: highlight C++ header extensions (warpdotdev#9388)
- Run executable shell scripts in the terminal (warpdotdev#9503)
- Revert schema generator binary recompilation fix (warpdotdev#9676)
- Remove stray backticks from Windows installer README (warpdotdev#9691)
- Fix chord shortcuts on Windows non-Latin keyboard layouts (warpdotdev#9476)
- Scroll output with Page Up/Down from prompt (warpdotdev#9624)
- Respect Markdown Viewer setting for .md links in AI rules/facts panel (warpdotdev#9699)
- fix: disable reset grid checks for restored blocks on Windows (warpdotdev#9987)
- add RedirectionGuard=no to windows-installer.iss (warpdotdev#9863)
- Windows quake mode window correctly sized (warpdotdev#9891)
- fix: update rand to 0.9.4 (GHSA-cq8v-f236-94qc) (warpdotdev#10060)
- Fix diff button when Show code review button toggle is off (warpdotdev#9600)
- Fix freshly cloned repo stuck in loading state (warpdotdev#9998)
- Fix terminal text selection not auto-scrolling when dragging (warpdotdev#9448)
- Resolve conflict markers from 3f0ac51 and edac651
zerx-lab pushed a commit to zerx-lab/warp that referenced this pull request May 8, 2026
…ounds (warpdotdev#9448)

## Description

Fix terminal text selection no longer auto-scrolling downward when drag
exits the scroll container (block list).

**Root cause:** `LeftMouseDragged` events were subject to z-index
coverage checks in `DispatchedEvent::at_z_index()`. When the user
dragged downward past the block list, the cursor entered the area of
higher-z-index UI elements (input/footer), causing `is_covered()` to
return true and the drag events to be filtered out. This prevented the
block list element from receiving drag events, so its auto-scroll logic
(`mouse_dragged()`) never executed.

**Fix:** Bypass z-index filtering for `LeftMouseDragged` events in the
blocklist element specifically when selecting.

Fixes APP-3952

## Testing

Manual testing:
https://www.loom.com/share/0e81bc86229a4e0085b52253ca846346

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

## Changelog Entries for Stable

CHANGELOG-BUG-FIX: Fixed terminal text selection not auto-scrolling when
dragging beyond bounds

---------

Co-authored-by: Oz <oz-agent@warp.dev>
Co-authored-by: oz-for-oss[bot] <277970191+oz-for-oss[bot]@users.noreply.github.com>
(cherry picked from commit b7dd0ef)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants