From 2bf7f4a6ad7ef4628c33c9253cfa3a6a58ef6cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 9 Sep 2026 17:26:58 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(app):=20the=20lane=20bed=20c?= =?UTF-8?q?lips=20its=20clips=20at=20the=20pinned=20heads?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DESIGN §7 has the lanes scrolling *behind* the pinned ruler and track heads, but the bed carried no clip mask: a clip starting left of the view sits at a negative `left`, and gpui painted it -- and its hitbox -- straight over the 72 px head column, so V1/A1 and their verbs vanished under the first take as soon as the bench was wheeled past frame 0. `overflow_hidden()` on the bed cuts painting and hit-testing at the same edges (gpui intersects every hitbox with its content mask), so the visible half of a half-scrolled clip still drags and trims while the hidden half answers nothing. Menus, drag previews and tooltips render at the window root, not inside the bed, so none of them are cut. The ruler already clamps its ticks and playhead to its own box and sits right of the head column, so it needed nothing. --- crates/app/src/tests/layout.rs | 19 +++++++++++++++++++ crates/app/src/ui/bench_stance.rs | 11 +++++++++++ 2 files changed, 30 insertions(+) diff --git a/crates/app/src/tests/layout.rs b/crates/app/src/tests/layout.rs index d966771..aaaa842 100644 --- a/crates/app/src/tests/layout.rs +++ b/crates/app/src/tests/layout.rs @@ -2795,3 +2795,22 @@ fn the_seam_paints_nothing_until_a_pointer_finds_it() { assert!(body.contains(step), "the divider is missing {step}"); } } + +/// DESIGN §7: "lanes scroll behind the pinned ruler and track heads" -- pinned +/// means pinned. A clip that starts left of the view sits at a negative `left` +/// inside its bed, and with no clip mask gpui paints it (and its hitbox) over +/// the 72 px head column, so V1/A1 and their verbs disappear under the first +/// take as soon as the bench is wheeled past frame 0. The mask belongs on the +/// bed itself so a half-scrolled clip still drags on the half that shows. +#[test] +fn the_lane_bed_clips_its_clips_at_the_pinned_heads() { + let src = src_text("ui/bench_stance.rs"); + let start = src.find(r#".id(("bench-bed""#).expect("the bed"); + let bed = + &src[start..start + src[start..].find(".bg(rgb(DARK_CANVAS()))").expect("its fill")]; + assert!( + bed.contains(".overflow_hidden()"), + "the bed lets its clips paint outside itself, straight over the \ + pinned lane heads: {bed}" + ); +} diff --git a/crates/app/src/ui/bench_stance.rs b/crates/app/src/ui/bench_stance.rs index f1bf263..fb141bb 100644 --- a/crates/app/src/ui/bench_stance.rs +++ b/crates/app/src/ui/bench_stance.rs @@ -1039,6 +1039,17 @@ fn lane_row( .flex_1() .min_w(px(0.)) .h_full() + // DESIGN §7: the lanes scroll BEHIND the pinned heads. A + // clip whose start is left of the view sits at a negative + // `left`, and without a clip mask gpui paints it -- and its + // hitbox -- straight over the 72px head column, so V1/A1 and + // their verbs vanish under it. The mask cuts painting and + // hit-testing at the bed's own edges together, so the visible + // half of a half-scrolled clip still drags and trims and the + // hidden half answers nothing. Menus, drag previews and + // tooltips are unaffected: they render at the window root + // (`ui/overlays.rs`, gpui's `active_drag`), not in here. + .overflow_hidden() .bg(rgb(DARK_CANVAS())) // The seam is drawn as an absolute overlay rather than a // layout `border_l_1`: a border eats a pixel out of the