From bbc437bc4c98fb098813698e513cb7ea1831ffb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 10 Sep 2026 01:07:53 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(app):=20a=20clip=20let=20go?= =?UTF-8?q?=20in=20the=20bench's=20left=20gutter=20lands=20at=20frame=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gpui fires on_drop only on an element whose own hitbox holds the pointer, and the bench's 12px side gutter was padding on the parent div -- so a release at x < 12, exactly where a hand aiming a clip at frame 0 puts it, reached no drop target and moved nothing, silently. The gutter now lives inside bench-content's own box: same pixels, and the catch-all release already written there now covers the edge. --- crates/app/src/ui/bench_stance.rs | 7 +++++++ crates/app/src/ui/stance.rs | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/crates/app/src/ui/bench_stance.rs b/crates/app/src/ui/bench_stance.rs index 8bcc236..3e3601d 100644 --- a/crates/app/src/ui/bench_stance.rs +++ b/crates/app/src/ui/bench_stance.rs @@ -1229,6 +1229,9 @@ fn lane_row( /// The bench's content: pinned ruler, pinned heads, lane stack -- compressed /// evenly to [`LANES_COMPRESS`] rows and then scrolling (DESIGN §7). +/// The bench's side gutter, spent inside [`render`]'s own content box. +const BENCH_GUTTER: f32 = 12.; + pub(crate) fn render( player: &mut Player, box_h: f32, @@ -1292,6 +1295,10 @@ pub(crate) fn render( .on_scroll_wheel(cx.listener(|this, event: &ScrollWheelEvent, _, cx| { this.timeline_wheel(event, cx); })) + // The bench's side gutter, spent here rather than by the `bench` div + // above, so this element's bounds -- and the catch-all release below + // with them -- reach the window edge (note at `ui::stance::bench`). + .px(px(BENCH_GUTTER)) // The catch-all release: a clip let go of anywhere on the bench that is // not a lane row -- left of the tracks, in the gap between two rows, on // the empty bench below the last one -- lands on the lane and the x the diff --git a/crates/app/src/ui/stance.rs b/crates/app/src/ui/stance.rs index 859421c..a636a5a 100644 --- a/crates/app/src/ui/stance.rs +++ b/crates/app/src/ui/stance.rs @@ -615,7 +615,14 @@ fn bench( // the bench is the selection one a picked clip draws (DESIGN §2/§4). .flex() .flex_col() - .px(px(12.)) + // The 12px side gutter is spent INSIDE `bench_stance`'s own content + // box, not here: gpui fires `on_drop` only on an element whose own + // hitbox holds the pointer (`div.rs:2089`), and padding on this + // parent left the gutter outside every registered target -- a clip + // let go at x < 12, hard against the left edge where a hand aiming + // at frame 0 puts it, reached nothing at all and moved nothing, + // silently (DESIGN §8: a release that has aimed has made an edit). + // Same box, same pixels; only the catch-all's bounds grow. .py(px(4.)) .child(bench_stance::render(player, bench_h - BENCH_CHROME_H, cx)) }