fix(maestro): an intervening event breaks a double-click #49

Merged
naps62-yolo merged 1 commits from lithuanians into main 2026-08-22 15:21:36 +01:00
Collaborator

Follow-up to the review comment on #48, which was already merged.

promote() early-returned for anything that wasn't a Click and left the pending click intact. So click → drag → click at the same cell within 400ms was reported as a double-click. Same for a scroll or a keystroke in between.

Any non-click input now clears the pending click: two clicks with something between them are two clicks, however fast. Three regression tests — drag, keystroke, scroll.

The trade-off worth naming: a double-click where the mouse jitters enough for the terminal to emit a Drag between the two downs will now register as two clicks. That is the right way round — a spurious dblclick fires AttachHighlighted and opens a session, while a missed one costs the user a second click.

Verification
cargo clippy --all-targets -- -D warnings    0
cargo test --all                             320 passed, 0 failed
Follow-up to the review comment on #48, which was already merged. `promote()` early-returned for anything that wasn't a `Click` and left the pending click intact. So **click → drag → click** at the same cell within 400ms was reported as a double-click. Same for a scroll or a keystroke in between. Any non-click input now clears the pending click: two clicks with something between them are two clicks, however fast. Three regression tests — drag, keystroke, scroll. The trade-off worth naming: a double-click where the mouse jitters enough for the terminal to emit a `Drag` between the two downs will now register as two clicks. That is the right way round — a spurious dblclick fires `AttachHighlighted` and opens a session, while a missed one costs the user a second click. <details> <summary>Verification</summary> ``` cargo clippy --all-targets -- -D warnings 0 cargo test --all 320 passed, 0 failed ``` </details>
naps62-yolo added 1 commit 2026-08-22 15:18:41 +01:00
fix(maestro): an intervening event breaks a double-click
ci / web (pull_request) Successful in 28s
ci / rust (pull_request) Successful in 1m41s
ci / web (push) Successful in 26s
ci / rust (push) Successful in 2m17s
812861f883
promote() early-returned for anything that was not a Click, leaving the
pending click intact — so click, drag, click at the same cell within
400ms was reported as a double-click. Same for a scroll or a keystroke
between the two.

Any non-click input now clears the pending click. Two clicks with
something in between are two clicks, however fast.

Reported in review on #48.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
naps62-yolo left a comment
Author
Collaborator

Reviewed 812861f8835d329e9127349686a7f0778f092e6f. No findings.

Reviewed `812861f8835d329e9127349686a7f0778f092e6f`. No findings. <!-- agent-meta: {"model":"gpt-5.6","session":"01a029d6"} -->
naps62-yolo merged commit 812861f883 into main 2026-08-22 15:21:36 +01:00
naps62-yolo deleted branch lithuanians 2026-08-22 15:21:36 +01:00
This repo is archived. You cannot comment on pull requests.