forge
Explore
Log in

Don't you dare go Hollow

wip(cleanse): bench + ledger — capped mid-work

Browse files at this commit

9513e4a6db5e91b08fb5be3a83d8def72c61e837Ahmet Kaan GümüşParent: a3a997b
DESIGN.mdmodified+22 -7
@@ -115,10 +115,10 @@ Fixed geography; nothing moves, nothing occludes the picture:
115 │ transport → cut readout → │ │115 │ transport → cut readout → │ │
116 │ contact strip → [Export] │ │116 │ contact strip → [Export] │ │
117 ├─────────────────────────────────┤ │117 ├─────────────────────────────────┤ │
118-│ BENCH (lanes V/A/S) │ │118+│ ruler · lanes • V1 • A1 • S1 │ │
119 ├─────────────────────────────────┤ │119 ├─────────────────────────────────┤ │
120-│ LEDGER (project · state · room │ │120+│ name · saved | last action | │ │
121-│ verbs · position) │ │121+│ room verbs · position │ │
122 └─────────────────────────────────┴──────┘122 └─────────────────────────────────┴──────┘
123 ```123 ```
124 124
@@ -127,17 +127,32 @@ Fixed geography; nothing moves, nothing occludes the picture:
127 - **Time band**: timecode leads; ghost transport; cut readout (`14/37`); the **contact strip**127 - **Time band**: timecode leads; ghost transport; cut readout (`14/37`); the **contact strip**
128 (whole-film motion-trace minimap, `FILM` label, viewport bracket with grip notches — click128 (whole-film motion-trace minimap, `FILM` label, viewport bracket with grip notches — click
129 jumps, drag pans); boxed **Export** at the end.129 jumps, drag pans); boxed **Export** at the end.
130-- **Bench**: lanes. Clip anatomy = ink spine (3px left edge) + real thumbnails/waveform in the130+- **Bench**: the ruler row, then lanes. Clip anatomy = ink spine (3px left edge) + real
131- source's ink + name plate + splice gaps in lamp white.131+ thumbnails/waveform in the source's ink + name plate + splice gaps in lamp white. A lane head
132-- **Ledger**: project identity (`name.edith · saved`), last action, export progress, and at the132+ is a source dot and the lane's name (`• V1`, 60px) and nothing else; the name plate carries
133+ the file's name without its extension (`files::stem`), and only once per source — the audio
134+ half of a linked insert has no plate, because the picture plate directly above it and the
135+ shared dot already say whose it is.
136+- **Ledger**: project identity (`name · saved`, extension dropped), last action, export
137+ progress, and at the
133 right end, before the position: the **room verbs** as ghosts (`CC t · settings ^, · keys ? ·138 right end, before the position: the **room verbs** as ghosts (`CC t · settings ^, · keys ? ·
134 full f11`) — the four commands that act on the room itself and so have no thing under the139 full f11`) — the four commands that act on the room itself and so have no thing under the
135 cursor to be right-clicked on. `ink3` + chord, hover raises to `ink2` with the room's own140 cursor to be right-clicked on. `ink3` + chord, hover raises to `ink2` with the room's own
136 plate, `CC` reads `ink1` + fill while subtitles are shown. State lives here, notices rise141 plate, `CC` reads `ink1` + fill while subtitles are shown. State lives here, notices rise
137- from here.142+ from here. When the project is unsaved the state word is not a word but a door:
143+ `unsaved ^s`, the same room-verb ghost, and clicking it saves — this is Save's home.
138 - **Dock** (right, the only side panel): Sources tab (assembly: filter, usage chips, import),144 - **Dock** (right, the only side panel): Sources tab (assembly: filter, usage chips, import),
139 Clip tab (verbs: Speed / Colour / Transform / EQ as ghost verbs over param rows) and KEYS tab.145 Clip tab (verbs: Speed / Colour / Transform / EQ as ghost verbs over param rows) and KEYS tab.
140 146
147+**Amendment (2026-09-10), "cleanse round 2":** the `BENCH` and `LEDGER` section heads are
148+deleted — the geography says what a region is, and a label above it is a second saying. The
149+ruler row is the bench's own top edge (the seam's grab band no longer reaches past it, since the
150+ruler answers presses itself), and the ledger's first word is the project. `all ^a` leaves the
151+ruler's right edge for the ruler's own right-click menu; the lane head's `≋` mix and `×` remove
152+leave the head for the head's own right-click menu, where they still act on the lane that was
153+clicked. Every one of them keeps its chord and its KEYS row: nothing lost a door, each one moved
154+to the thing it acts on, which is the "option C" rule below applied a second time.
155+
141 **Amendment (2026-09-09), user decision "option C":** there is no rail. The 56px spine — every156 **Amendment (2026-09-09), user decision "option C":** there is no rail. The 56px spine — every
142 command as a ghost glyph + chord down the left edge — is deleted, and the picture, time band,157 command as a ghost glyph + chord down the left edge — is deleted, and the picture, time band,
143 bench and ledger take its width. Nothing on screen lists the room's commands, because **the158 bench and ledger take its width. Nothing on screen lists the room's commands, because **the
crates/app/src/files.rsmodified+11 -0
@@ -145,6 +145,17 @@ pub(crate) fn is_project(path: &std::path::Path) -> bool {
145 path.extension().is_some_and(|e| e == "edith")145 path.extension().is_some_and(|e| e == "edith")
146 }146 }
147 147
148+/// A path's name without its extension, for every surface that shows what a
149+/// file *is* rather than what it is stored as (cleanse round 2: the bench's
150+/// name plates, the ledger's project identity, the dock's rows). One place,
151+/// so those three can never come to disagree about the same file's name.
152+pub(crate) fn stem(path: &std::path::Path) -> String {
153+ path.file_stem().map_or_else(
154+ || file_name(path),
155+ |n| n.to_string_lossy().into(),
156+ )
157+}
158+
148 /// The tail of a path, for showing. A path that is all root has none, and reads159 /// The tail of a path, for showing. A path that is all root has none, and reads
149 /// as itself.160 /// as itself.
150 pub(crate) fn file_name(path: &std::path::Path) -> String {161 pub(crate) fn file_name(path: &std::path::Path) -> String {
crates/app/src/layout.rsmodified+8 -13
@@ -316,19 +316,14 @@ pub(crate) const SPLIT_W: f32 = 6.;
316 /// the strip's far side), not the six transparent pixels in front of it.316 /// the strip's far side), not the six transparent pixels in front of it.
317 pub(crate) const GRAB_W: f32 = 14.;317 pub(crate) const GRAB_W: f32 = 14.;
318 318
319-/// The bench seam's own band, deeper than [`GRAB_W`] because it may be: what319+/// The bench seam's own band. It used to be deeper than [`GRAB_W`] because
320-/// lies under the seam is `ui::stance::bench`'s own section head -- 24 px of320+/// what lay under the seam was `ui::stance::bench`'s own section head -- 24 px
321-/// border, padding and the word "bench", with nothing in it to press -- so the321+/// with nothing in it to press, so the band reached down through it. That head
322-/// band reaches down through it instead of stopping 7 px past the line. Driven322+/// is gone (cleanse round 2): the ruler row is the bench's top edge now, and
323-/// at 2560x1440 against a real `bench=207`: with the 14 px band the seam323+/// the ruler *is* pressable (it scrubs), so a band reaching into it would take
324-/// answered a press only within +/-7 px of the line the eye sees and was silent324+/// presses meant for the film. Back to every other seam's reach: `-1 .. +13`
325-/// on the `BENCH` label row below it, which is the visible top edge of the325+/// of strip, `-7 .. +7` of the seam.
326-/// timeline and so the thing a hand aims at ("library resizes but timeline326+pub(crate) const BENCH_GRAB_H: f32 = GRAB_W;
327-/// doesn't" -- a real `stance-splits` holds `dock=277`, a dragged dock, beside
328-/// a `bench=207` that is a press with no drag in it). 20 px hung one row above
329-/// the strip covers the line, the six pixels in front of it and the whole head
330-/// row: `-1 .. +19` of strip, `-7 .. +13` of the seam.
331-pub(crate) const BENCH_GRAB_H: f32 = 20.;
332 327
333 /// The most of the window one side column may be dragged to. A third each, so328 /// The most of the window one side column may be dragged to. A third each, so
334 /// the picture keeps the middle at every size -- the rule [`library_w`] and329 /// the picture keeps the middle at every size -- the rule [`library_w`] and
crates/app/src/menus.rsmodified+5 -1
@@ -237,7 +237,11 @@ pub(crate) const MENU_ITEMS: [ActionId; 16] = [
237 /// undo pair, which is the one thing every editor expects on empty canvas.237 /// undo pair, which is the one thing every editor expects on empty canvas.
238 /// Not a junk drawer (§9): nothing here acts on a clip, and everything here238 /// Not a junk drawer (§9): nothing here acts on a clip, and everything here
239 /// acts on the thing the pointer is over.239 /// acts on the thing the pointer is over.
240-pub(crate) const BENCH_ITEMS: [ActionId; 10] = [240+pub(crate) const BENCH_ITEMS: [ActionId; 11] = [
241+ // The `all` control left the ruler's right edge (cleanse round 2): this
242+ // row is where the pointer reaches "select everything" now, and `^a`
243+ // still fires it.
244+ ActionId::SelectAll,
241 ActionId::WalkCutPrev,245 ActionId::WalkCutPrev,
242 ActionId::WalkCutNext,246 ActionId::WalkCutNext,
243 ActionId::WalkCutPrev10,247 ActionId::WalkCutPrev10,
crates/app/src/oracle.rsmodified+6 -0
@@ -374,6 +374,12 @@ pub(crate) fn enable_lane(action: ActionId, lane: Lane, ctx: Ctx) -> Enable {
374 /// second row arguing about the same act.374 /// second row arguing about the same act.
375 pub(crate) fn lane_items(lane: Lane) -> Vec<ActionId> {375 pub(crate) fn lane_items(lane: Lane) -> Vec<ActionId> {
376 let mut items = HEAD_ADDS.to_vec();376 let mut items = HEAD_ADDS.to_vec();
377+ // The verbs that used to hang off the head itself (cleanse round 2): the
378+ // head is a dot and a name now, and this menu is where the pointer reaches
379+ // its mix -- an audio lane's alone, the way `enable_lane` reads it.
380+ if lane.kind == LaneKind::Audio {
381+ items.push(ActionId::Mix);
382+ }
377 items.push(match lane.kind {383 items.push(match lane.kind {
378 LaneKind::Video => ActionId::RemoveVideoLane,384 LaneKind::Video => ActionId::RemoveVideoLane,
379 LaneKind::Audio => ActionId::RemoveAudioLane,385 LaneKind::Audio => ActionId::RemoveAudioLane,
crates/app/src/tests/layout.rsmodified+55 -79
@@ -1599,17 +1599,30 @@ fn darkroom_lane_header_verbs_are_targeted_and_visible() {
1599 Enable::Hidden(_)1599 Enable::Hidden(_)
1600 ));1600 ));
1601 1601
1602+ // The head itself carries a dot, a name and -- on a subtitle lane -- its
1603+ // eye, and nothing else (cleanse round 2). Its mix and its remove are rows
1604+ // in its own right-click menu instead, and they still reach the lane the
1605+ // hand named rather than the last of the kind a bare stroke walks to:
1606+ // `overlays.rs` routes those rows through the same `act_lane` door the
1607+ // head's buttons used.
1602 let bench = src_text("ui/bench_stance.rs");1608 let bench = src_text("ui/bench_stance.rs");
1603- for door in [1609+ for gone in ["\"bench-mix-lane\"", "\"bench-remove-lane\"", "lane.{}.remove"] {
1604- "\"bench-mix-lane\"",1610+ assert!(!bench.contains(gone), "the lane head still wears {gone}");
1605- "\"bench-show-sub-lane\"",1611+ }
1606- "\"bench-remove-lane\"",1612+ for door in ["\"bench-show-sub-lane\"", "this.show_sub_lane(lane, cx)"] {
1607- "this.act_lane(ActionId::Mix, lane, cx)",
1608- "this.show_sub_lane(lane, cx)",
1609- "this.act_lane(action, lane, cx)",
1610- ] {
1611 assert!(bench.contains(door), "lane header lost {door}");1613 assert!(bench.contains(door), "lane header lost {door}");
1612 }1614 }
1615+ assert!(
1616+ lane_items(Lane::A1).contains(&ActionId::Mix)
1617+ && lane_items(Lane::A1).contains(&ActionId::RemoveAudioLane)
1618+ && lane_items(Lane::V1).contains(&ActionId::RemoveVideoLane)
1619+ && !lane_items(Lane::V1).contains(&ActionId::Mix),
1620+ "a head verb left the head with no row in the head's own menu"
1621+ );
1622+ assert!(
1623+ src_text("ui/overlays.rs").contains("this.act_lane(action, menu.lane, cx)"),
1624+ "the head menu lane verbs no longer act on the lane that was clicked"
1625+ );
1613 let time_band = src_text("ui/timeband_stance.rs");1626 let time_band = src_text("ui/timeband_stance.rs");
1614 for door in [1627 for door in [
1615 "fn volume_slider(",1628 "fn volume_slider(",
@@ -1854,18 +1867,17 @@ fn the_whole_bench_stack_fits_its_own_floor_with_the_ledger_seam_clear() {
1854 use crate::BENCH_MIN_H;1867 use crate::BENCH_MIN_H;
1855 use crate::ui::bench_stance::{LANE_MIN_H, ROW_GAP, RULER_H};1868 use crate::ui::bench_stance::{LANE_MIN_H, ROW_GAP, RULER_H};
1856 use crate::ui::stance::BENCH_CHROME_H;1869 use crate::ui::stance::BENCH_CHROME_H;
1857- use crate::ui::type_scale::SECTION_HEAD_PX;
1858 1870
1859 const BENCH_BORDER_T: f32 = 1.;1871 const BENCH_BORDER_T: f32 = 1.;
1860 const BENCH_PY_TOP: f32 = 4.;1872 const BENCH_PY_TOP: f32 = 4.;
1861- let section_head_line_h = (SECTION_HEAD_PX * 1.618_034).round();1873+ // No section head any more (cleanse round 2): the border and the padding
1862- let real_chrome = BENCH_BORDER_T + BENCH_PY_TOP + section_head_line_h;1874+ // are the whole of what `stance::bench` draws above the ruler.
1875+ let real_chrome = BENCH_BORDER_T + BENCH_PY_TOP;
1863 assert_eq!(1876 assert_eq!(
1864 BENCH_CHROME_H, real_chrome,1877 BENCH_CHROME_H, real_chrome,
1865 "BENCH_CHROME_H ({BENCH_CHROME_H}) does not match what `stance::bench` \1878 "BENCH_CHROME_H ({BENCH_CHROME_H}) does not match what `stance::bench` \
1866 actually draws above the content ({real_chrome}px: {BENCH_BORDER_T}px \1879 actually draws above the content ({real_chrome}px: {BENCH_BORDER_T}px \
1867- border + {BENCH_PY_TOP}px padding + {section_head_line_h}px label line \1880+ border + {BENCH_PY_TOP}px padding) -- bench_stance::render gets handed the wrong box_h and lays its \
1868- box) -- bench_stance::render gets handed the wrong box_h and lays its \
1869 rows out past its own real space"1881 rows out past its own real space"
1870 );1882 );
1871 1883
@@ -2626,9 +2638,7 @@ fn hitmap_names_every_darkroom_pointer_entry_surface() {
2626 "clip.{}.{}.{}.trim-{}",2638 "clip.{}.{}.{}.trim-{}",
2627 "clip.{}.{}.{}.dissolve",2639 "clip.{}.{}.{}.dissolve",
2628 "lane.{}.reorder",2640 "lane.{}.reorder",
2629- "lane.{}.mix",
2630 "lane.{}.eye",2641 "lane.{}.eye",
2631- "lane.{}.remove",
2632 ] {2642 ] {
2633 assert!(2643 assert!(
2634 bench.contains(needle),2644 bench.contains(needle),
@@ -2854,28 +2864,24 @@ fn the_seam_paints_nothing_until_a_pointer_finds_it() {
2854 );2864 );
2855 }2865 }
2856 2866
2857-/// The band the hand actually gets, in seam coordinates -- driven at2867+/// The band the hand actually gets, in seam coordinates. It once reached 13px
2858-/// 2560x1440 with a real `bench=207` before this diff: a press answered only2868+/// past the line to cover the `BENCH` label row a hand aimed at; that row is
2859-/// within +/-7 px of the line the eye sees, and the `BENCH` label row under it2869+/// gone (cleanse round 2) and the ruler under the seam answers presses of its
2860-/// -- the visible top edge of the timeline, the thing a hand aims at -- was2870+/// own (it scrubs), so the bench seam takes every other seam's reach and no
2861-/// silent. The band is hung one row above the [`SPLIT_W`] strip, so its reach2871+/// more -- a deeper band would eat scrubs at the film's own top edge.
2862-/// past the line is `grab - 1 - SPLIT_W`.
2863 #[test]2872 #[test]
2864-fn the_bench_seam_reaches_into_the_row_a_hand_aims_at() {2873+fn the_bench_seam_reaches_no_further_than_every_other_seam() {
2865 let above = 1.;2874 let above = 1.;
2866 let reach = |grab: f32| grab - above - crate::layout::SPLIT_W;2875 let reach = |grab: f32| grab - above - crate::layout::SPLIT_W;
2867- // Every other seam is unchanged: its neighbour's own first row carries
2868- // content (the dock's rows, the legacy toolbar's buttons).
2869 assert_eq!(reach(crate::layout::GRAB_W), 7.);2876 assert_eq!(reach(crate::layout::GRAB_W), 7.);
2870- // The bench's reaches through the 24 px section head far enough to cover2877+ assert_eq!(
2871- // the label row a hand lands on, and no further than the head itself.2878+ reach(crate::layout::BENCH_GRAB_H),
2872- let past = reach(crate::layout::BENCH_GRAB_H);2879+ 7.,
2873- assert!(2880+ "the bench band reaches past the ruler row, which answers presses itself"
2874- (10. ..=crate::ui::stance::BENCH_CHROME_H).contains(&past),
2875- "the bench band reaches {past}px past the seam"
2876 );2881 );
2877 }2882 }
2878 2883
2884+
2879 /// The clamp table, driven: the seam refuses exactly two things, and neither2885 /// The clamp table, driven: the seam refuses exactly two things, and neither
2880 /// is anywhere near where a hand drags. Measured live at 2560x1440 --2886 /// is anywhere near where a hand drags. Measured live at 2560x1440 --
2881 /// `bench=105` at the floor, `bench=1164` at the ceiling.2887 /// `bench=105` at the floor, `bench=1164` at the ceiling.
@@ -3156,60 +3162,30 @@ fn the_ledger_carries_the_rooms_four_verbs_and_no_rail_remains() {
3156 );3162 );
3157 }3163 }
3158 3164
3159-/// The ruler's right edge was soup: `bench-select-all` sits `right(4.)` over3165+/// The `all` control left the ruler (cleanse round 2, DESIGN §5): the ruler
3160-/// the tick band while tick suppression only guarded the LEFT plate, so the3166+/// row is the bench's own top edge and carries ticks and the playhead alone.
3161-/// `00:20` label drew straight under the `all` chord. The control's band is3167+/// Every removed control keeps a door -- `^a` still fires it, and the ruler's
3162-/// reserved now -- a label whose right edge would enter it is dropped, the3168+/// own right-click menu ([`BENCH_ITEMS`]) is where the pointer reaches it --
3163-/// mirror of the left rule.3169+/// so this checks the control is gone AND that the row exists, not just the
3170+/// deletion.
3164 #[test]3171 #[test]
3165-fn the_ruler_reserves_a_band_for_its_select_all_control() {3172+fn select_all_left_the_ruler_for_the_rulers_own_menu() {
3166- use crate::ui::bench_stance::{SELECT_ALL_PAD, char_w};3173+ use crate::ActionId;
3167- use crate::ui::type_scale::{CHORD_METADATA_MIN_PX, FLOOR_PX};3174+ use crate::menus::BENCH_ITEMS;
3168- let bench = src_text("ui/bench_stance.rs");
3169- assert!(
3170- bench.contains("x + label_w <= bed_w - all_w"),
3171- "the tick loop no longer keeps the select-all band clear"
3172- );
3173- // The rule itself, with the shipped widths: `all` + `^a` at the chord
3174- // size, a `00:20` label at the floor size, a 850 px bed.
3175- let all_w = ("all".len() + "^a".len()) as f32 * char_w(CHORD_METADATA_MIN_PX) + SELECT_ALL_PAD;
3176- let label_w = "00:20".len() as f32 * char_w(FLOOR_PX);
3177- let clear = |x: f32| x + label_w <= 850. - all_w;
3178- assert!(!clear(820.), "a tick at the right edge still draws under `all`");
3179- assert!(
3180- !clear(850. - all_w - label_w + 1.),
3181- "the band's own edge leaks"
3182- );
3183- assert!(clear(700.), "the rule eats ticks that clear the band");
3184-}
3185-
3186-/// Clicking `all` selected all AND scrubbed: the control lives inside
3187-/// `bench-ruler`, whose `on_mouse_down` seeks, and the press reached it (the
3188-/// playhead jumped 00:00:11:12 -> 00:00:20:14). The scrub refuses the
3189-/// control's reserved band now -- a `stop_propagation` on the control is what
3190-/// this looks like at first and it does NOT work: gpui builds the control's
3191-/// own click out of that same mouse-down, so stopping it drops the selection
3192-/// (measured live, run 20260909-174243-jZzccm/after-all.png: nothing but the
3193-/// hover changed).
3194-#[test]
3195-fn a_press_on_the_select_all_band_does_not_scrub_the_ruler() {
3196- use crate::ui::bench_stance::select_all_band;
3197 let bench = src_text("ui/bench_stance.rs");3175 let bench = src_text("ui/bench_stance.rs");
3198- let at = bench.find(r#".id("bench-ruler")"#).expect("no ruler");3176+ for gone in ["bench-select-all", "select_all_band", "SELECT_ALL_PAD"] {
3199- let listener = &bench[at..at + bench[at..].find(".children(ticks").expect("its ticks")];3177+ assert!(!bench.contains(gone), "the ruler still carries {gone}");
3178+ }
3200 assert!(3179 assert!(
3201- listener.contains("bed_w - band") && listener.contains("select_all_band("),3180+ BENCH_ITEMS.contains(&ActionId::SelectAll),
3202- "the ruler's scrub takes the select-all band's presses again: {listener}"3181+ "`all` left the ruler with no menu row behind it"
3203 );3182 );
3183+ // And the band it reserved is the ticks' again: nothing subtracts a
3184+ // control's width from the bed's right edge any more.
3204 assert!(3185 assert!(
3205- !bench[at..].contains("cx.stop_propagation()"),3186+ bench.contains("if x >= plate_w && x + label_w <= bed_w {"),
3206- "a press stopped inside the ruler also swallows the control's own click"3187+ "the tick loop still keeps a band clear for a control that is gone"
3207 );3188 );
3208- // The rule the listener runs, at the shipped widths: a 850 px bed, `^a`.
3209- let band = select_all_band("^a");
3210- assert!(band > 30. && band < 70., "the band is not a control's width: {band}");
3211- assert!(850. - 4. >= 850. - band, "a press on the control still seeks");
3212- assert!(500. < 850. - band, "a press mid-ruler stopped seeking");
3213 }3189 }
3214 3190
3215 /// DESIGN §4/§5: the hero timecode leads the time band and the ledger carries3191 /// DESIGN §4/§5: the hero timecode leads the time band and the ledger carries
@@ -3745,7 +3721,7 @@ fn every_hitmap_control_wears_a_hover_line() {
3745 }3721 }
3746 }3722 }
3747 assert!(3723 assert!(
3748- controls >= 40,3724+ controls >= 38,
3749 "the hover sweep found only {controls} controls -- it has gone blind"3725 "the hover sweep found only {controls} controls -- it has gone blind"
3750 );3726 );
3751 assert!(3727 assert!(
crates/app/src/ui/bench_stance.rsmodified+40 -188
@@ -63,28 +63,16 @@ const TICK_MIN_PX: f64 = 64.;
63 const PLATE_W: f32 = 11. * crate::layout::LIST_CHAR_W / type_scale::CHORD_METADATA_MIN_PX63 const PLATE_W: f32 = 11. * crate::layout::LIST_CHAR_W / type_scale::CHORD_METADATA_MIN_PX
64 * type_scale::CHORD_METADATA_MAX_PX64 * type_scale::CHORD_METADATA_MAX_PX
65 + 9.;65 + 9.;
66-/// The reserved right-edge band `bench-select-all` sits in: its own
67-/// `right(4.)` offset, the `px(3.)` either side of its text and the `gap(3.)`
68-/// between the label and its chord. The band's text width is measured per
69-/// render (the chord is keymap-dependent) and added to this.
70-pub(crate) const SELECT_ALL_PAD: f32 = 4. + 3. + 3. + 3.;
71-/// The width of that band for a given chord: `all`, the chord, and the
72-/// padding around them. Read by the tick loop (no label may enter it) and by
73-/// the ruler's own scrub listener (no press inside it seeks) -- one rule, so
74-/// the two can never disagree about where the control's edge is.
75-pub(crate) fn select_all_band(chord: &str) -> f32 {
76- ("all".len() + chord.chars().count()) as f32 * char_w(type_scale::CHORD_METADATA_MIN_PX)
77- + SELECT_ALL_PAD
78-}
79 /// A mono character's width at `size_px`, from the shared66 /// A mono character's width at `size_px`, from the shared
80 /// [`crate::layout::LIST_CHAR_W`] calibration (taken at67 /// [`crate::layout::LIST_CHAR_W`] calibration (taken at
81 /// [`type_scale::CHORD_METADATA_MIN_PX`]).68 /// [`type_scale::CHORD_METADATA_MIN_PX`]).
82 pub(crate) fn char_w(size_px: f32) -> f32 {69 pub(crate) fn char_w(size_px: f32) -> f32 {
83 crate::layout::LIST_CHAR_W / type_scale::CHORD_METADATA_MIN_PX * size_px70 crate::layout::LIST_CHAR_W / type_scale::CHORD_METADATA_MIN_PX * size_px
84 }71 }
85-/// The pinned track-head column: wide enough for its lane-specific ghost72+/// The pinned track-head column: the source dot and the lane's name, and
86-/// verbs and their compact chords without shrinking their pointer targets.73+/// nothing else since the head's verbs moved into its own menu (cleanse
87-const HEAD_W: f32 = 72.;74+/// round 2) -- the pixels it gave up are the bed's now.
75+const HEAD_W: f32 = 60.;
88 pub(crate) const ROW_GAP: f32 = 2.;76 pub(crate) const ROW_GAP: f32 = 2.;
89 /// DESIGN §7: lanes compress evenly up to this many rows before the column77 /// DESIGN §7: lanes compress evenly up to this many rows before the column
90 /// scrolls behind the pinned ruler and heads instead of compressing further.78 /// scrolls behind the pinned ruler and heads instead of compressing further.
@@ -220,8 +208,14 @@ fn clip_box(
220 let on = marked((lane, idx), clip.link, picks, pick_links);208 let on = marked((lane, idx), clip.link, picks, pick_links);
221 let t = tier(span);209 let t = tier(span);
222 let source = player.sources().get(clip.source);210 let source = player.sources().get(clip.source);
223- let label = source.map(|s| file_name(&s.path));
224 let audio = lane.kind == LaneKind::Audio;211 let audio = lane.kind == LaneKind::Audio;
212+ // The name, extension dropped (`files::stem`, the ledger's and the dock's
213+ // helper too) -- and only once per source: the audio half of a linked
214+ // insert carries no plate at all, because the picture plate directly above
215+ // it and the shared source dot already say whose it is (cleanse round 2).
216+ let label = source
217+ .filter(|_| !(audio && clip.link.is_some()))
218+ .map(|s| stem(&s.path));
225 let fade_in = player.shown_fade_in(lane, idx, clip);219 let fade_in = player.shown_fade_in(lane, idx, clip);
226 let fade_out = player.shown_fade_out(lane, idx, clip);220 let fade_out = player.shown_fade_out(lane, idx, clip);
227 let dissolves = lane.kind == LaneKind::Video221 let dissolves = lane.kind == LaneKind::Video
@@ -847,12 +841,7 @@ fn lane_row(
847 .first()841 .first()
848 .map_or_else(INK4, |clip| source_tint(clip.source));842 .map_or_else(INK4, |clip| source_tint(clip.source));
849 let head_ghost: SharedString = lane.label().into();843 let head_ghost: SharedString = lane.label().into();
850- let gain_db = player
851- .session
852- .as_ref()
853- .map_or(0., |session| session.lane_gain_db(lane));
854 let shown = player.sub_lane_on(lane);844 let shown = player.sub_lane_on(lane);
855- let chord_style = type_scale::mono(type_scale::CHORD_METADATA_MIN_PX, gpui::FontWeight::MEDIUM);
856 let drop = player845 let drop = player
857 .lane_drop846 .lane_drop
858 .filter(|drop| drop.lane == lane && cx.has_active_drag());847 .filter(|drop| drop.lane == lane && cx.has_active_drag());
@@ -930,56 +919,30 @@ fn lane_row(
930 div()919 div()
931 .flex()920 .flex()
932 .items_center()921 .items_center()
933- .gap(px(2.))922+ .gap(px(5.))
934- // MOCK-SPEC.md "Bench": "V1, A1 in mono".923+ // The head is the source dot and the lane's name, and
935- .type_style(type_scale::mono(924+ // nothing else (DESIGN §5, cleanse round 2): the verbs
936- type_scale::CHORD_METADATA_MIN_PX,925+ // it used to wear -- mix, remove -- are rows in its own
937- gpui::FontWeight::MEDIUM,926+ // right-click menu (`oracle::lane_items`) and keep
938- ))927+ // their chords there.
939- .text_color(rgb(INK2()))928+ .child(
940- .child(lane.label())929+ div()
941- .when(lane.kind == LaneKind::Audio, |d| {930+ .flex_none()
942- d.child(931+ .w(px(LANE_DOT_D))
943- div()932+ .h(px(LANE_DOT_D))
944- .id(("bench-mix-lane", lane.ord))933+ .rounded(px(LANE_DOT_D / 2.))
945- .flex()934+ .bg(rgb(dot)),
946- .items_center()935+ )
947- .gap(px(1.))936+ .child(
948- .rounded(px(3.))937+ div()
949- .px(px(2.))938+ // MOCK-SPEC.md "Bench": "V1, A1 in mono".
950- .cursor_pointer()939+ .type_style(type_scale::mono(
951- .hover(|s| s.bg(rgb(DARK_RAISED())).text_color(rgb(INK1())))940+ type_scale::CHORD_METADATA_MIN_PX,
952- .tooltip(move |_, cx| {941+ gpui::FontWeight::MEDIUM,
953- cx.new(|_| {942+ ))
954- Tip(format!(943+ .text_color(rgb(INK2()))
955- "{} {gain_db:+.0} dB — mix this lane",944+ .child(lane.label()),
956- lane.label()945+ )
957- )
958- .into())
959- })
960- .into()
961- })
962- .on_click(cx.listener(move |this, _: &ClickEvent, _, cx| {
963- this.act_lane(ActionId::Mix, lane, cx);
964- }))
965- .children(hitmap::dynamic(
966- move || {
967- (
968- format!("lane.{}.mix", lane.label()),
969- format!("Mix {}", lane.label()),
970- )
971- },
972- true,
973- ))
974- .child("≋")
975- .child(
976- div()
977- .type_style(chord_style.clone())
978- .text_color(rgb(INK3()))
979- .child(player.keymap.chord(ActionId::Mix)),
980- ),
981- )
982- })
983 .when(lane.kind == LaneKind::Subtitle, |d| {946 .when(lane.kind == LaneKind::Subtitle, |d| {
984 d.child(947 d.child(
985 div()948 div()
@@ -1014,62 +977,7 @@ fn lane_row(
1014 ))977 ))
1015 .child("◉"),978 .child("◉"),
1016 )979 )
1017- })
1018- .when(lane.kind != LaneKind::Subtitle, |d| {
1019- let action = match lane.kind {
1020- LaneKind::Video => ActionId::RemoveVideoLane,
1021- LaneKind::Audio => ActionId::RemoveAudioLane,
1022- LaneKind::Subtitle => unreachable!(),
1023- };
1024- d.child(
1025- div()
1026- .id(("bench-remove-lane", lane.ord * 10 + lane.kind as usize))
1027- .flex()
1028- .items_center()
1029- .gap(px(1.))
1030- .rounded(px(3.))
1031- .px(px(2.))
1032- .cursor_pointer()
1033- .hover(|s| s.bg(rgb(DARK_RAISED())).text_color(rgb(INK1())))
1034- .tooltip(move |_, cx| {
1035- cx.new(|_| {
1036- Tip(format!(
1037- "Remove {} — it must be empty first",
1038- lane.label()
1039- )
1040- .into())
1041- })
1042- .into()
1043- })
1044- .on_click(cx.listener(move |this, _: &ClickEvent, _, cx| {
1045- this.act_lane(action, lane, cx);
1046- }))
1047- .children(hitmap::dynamic(
1048- move || {
1049- (
1050- format!("lane.{}.remove", lane.label()),
1051- format!("Remove {}", lane.label()),
1052- )
1053- },
1054- player.enable(action, None).yes(),
1055- ))
1056- .child("×")
1057- .child(
1058- div()
1059- .type_style(chord_style)
1060- .text_color(rgb(INK3()))
1061- .child(player.keymap.chord(action)),
1062- ),
1063- )
1064 }),980 }),
1065- )
1066- .child(
1067- div()
1068- .flex_none()
1069- .w(px(LANE_DOT_D))
1070- .h(px(LANE_DOT_D))
1071- .rounded(px(LANE_DOT_D / 2.))
1072- .bg(rgb(dot)),
1073 ),981 ),
1074 )982 )
1075 .child(983 .child(
@@ -1313,16 +1221,6 @@ pub(crate) fn render(
1313 .map_or_else(|| vec![Lane::V1, Lane::A1], PlaybackSession::lanes);1221 .map_or_else(|| vec![Lane::V1, Lane::A1], PlaybackSession::lanes);
1314 let position = player.active_session().map_or(0., PlaybackSession::now);1222 let position = player.active_session().map_or(0., PlaybackSession::now);
1315 let scale = player.scale;1223 let scale = player.scale;
1316- let select_all = player.enable(ActionId::SelectAll, None);
1317- let select_all_tip: SharedString = match select_all.why() {
1318- Some(why) => format!("{} — {why}", player.keymap.display(ActionId::SelectAll)),
1319- None => format!(
1320- "{} — {}",
1321- player.keymap.display(ActionId::SelectAll),
1322- ActionId::SelectAll.label()
1323- ),
1324- }
1325- .into();
1326 let bed_w = f32::from(player.ruler.get().size.width).max(1.);1224 let bed_w = f32::from(player.ruler.get().size.width).max(1.);
1327 let filled = scale.px_at(position).clamp(0., bed_w);1225 let filled = scale.px_at(position).clamp(0., bed_w);
1328 let (picks, pick_links) = player.marks();1226 let (picks, pick_links) = player.marks();
@@ -1336,16 +1234,13 @@ pub(crate) fn render(
1336 // first tick at or after the bed's left edge to the bed's right edge.1234 // first tick at or after the bed's left edge to the bed's right edge.
1337 // Guarded on `pps > 0` -- a zero scale (no session yet) has no interval1235 // Guarded on `pps > 0` -- a zero scale (no session yet) has no interval
1338 // that ever advances past the bed's own width, which would loop forever.1236 // that ever advances past the bed's own width, which would loop forever.
1339- // The ruler's two reserved bands, and no tick label may enter either.1237+ // The ruler's one reserved band, which no tick label may enter: the
1340- // Left: the playhead timecode plate, which now shows only while a scrub1238+ // playhead timecode plate, which now shows only while a scrub
1341 // drag is live (the hero timecode leads the time band at rest, DESIGN1239 // drag is live (the hero timecode leads the time band at rest, DESIGN
1342 // §4, and the ledger keeps position, §5 -- a third resting copy is the1240 // §4, and the ledger keeps position, §5 -- a third resting copy is the
1343 // crowding) -- at rest the band is zero and the ticks have the width1241 // crowding) -- at rest the band is zero and the ticks have the width
1344- // back. Right: `bench-select-all`, which used to be drawn straight over1242+ // back.
1345- // the `00:20` label because only the left plate was ever suppressed.
1346 let plate_w = if player.scrubbing { PLATE_W } else { 0. };1243 let plate_w = if player.scrubbing { PLATE_W } else { 0. };
1347- let all_chord = player.keymap.chord(ActionId::SelectAll);
1348- let all_w = select_all_band(&all_chord);
1349 let mut ticks = Vec::new();1244 let mut ticks = Vec::new();
1350 if scale.pps > 0. {1245 if scale.pps > 0. {
1351 let interval = tick_interval(scale.pps);1246 let interval = tick_interval(scale.pps);
@@ -1354,7 +1249,7 @@ pub(crate) fn render(
1354 let x = scale.px_at(t).max(0.);1249 let x = scale.px_at(t).max(0.);
1355 let label = tick_mmss(t);1250 let label = tick_mmss(t);
1356 let label_w = label.chars().count() as f32 * char_w(type_scale::FLOOR_PX);1251 let label_w = label.chars().count() as f32 * char_w(type_scale::FLOOR_PX);
1357- if x >= plate_w && x + label_w <= bed_w - all_w {1252+ if x >= plate_w && x + label_w <= bed_w {
1358 ticks.push((x, label));1253 ticks.push((x, label));
1359 }1254 }
1360 t += interval;1255 t += interval;
@@ -1397,21 +1292,6 @@ pub(crate) fn render(
1397 .on_mouse_down(1292 .on_mouse_down(
1398 MouseButton::Left,1293 MouseButton::Left,
1399 cx.listener(|this, event: &MouseDownEvent, _, cx| {1294 cx.listener(|this, event: &MouseDownEvent, _, cx| {
1400- // The reserved right-edge band is `bench-select-all`'s,
1401- // not the scrub's: a press there used to select all AND
1402- // seek the playhead under the control (11:12 -> 20:14).
1403- // The guard lives here rather than as a
1404- // `stop_propagation` on the control, because stopping
1405- // the press also swallows the control's own click --
1406- // gpui builds a click out of that same mouse-down.
1407- let bounds = this.ruler.get();
1408- let bed_w = f32::from(bounds.size.width).max(1.);
1409- let band = select_all_band(&this.keymap.chord(ActionId::SelectAll));
1410- if f32::from(crate::timeline_math::px_along(event.position.x, bounds))
1411- >= bed_w - band
1412- {
1413- return;
1414- }
1415 this.scrubbing = true;1295 this.scrubbing = true;
1416 this.scrub_to(event.position.x, true, cx);1296 this.scrub_to(event.position.x, true, cx);
1417 }),1297 }),
@@ -1479,35 +1359,7 @@ pub(crate) fn render(
1479 .child(playhead_tc),1359 .child(playhead_tc),
1480 )1360 )
1481 })1361 })
1482- .child(1362+
1483- div()
1484- .id("bench-select-all")
1485- .absolute()
1486- .right(px(4.))
1487- .top_0()
1488- .h_full()
1489- .flex()
1490- .items_center()
1491- .gap(px(3.))
1492- .px(px(3.))
1493- .rounded(px(2.))
1494- .tooltip(move |_, cx| cx.new(|_| Tip(select_all_tip.clone())).into())
1495- .when(!select_all.yes(), |d| d.opacity(0.4).cursor_not_allowed())
1496- .when(select_all.yes(), |d| {
1497- d.cursor_pointer()
1498- .hover(|s| s.bg(rgb(DARK_RAISED())).text_color(rgb(INK1())))
1499- .on_click(cx.listener(|this, _: &ClickEvent, window, cx| {
1500- this.act(ActionId::SelectAll, window, cx)
1501- }))
1502- })
1503- .type_style(type_scale::mono(
1504- type_scale::CHORD_METADATA_MIN_PX,
1505- gpui::FontWeight::MEDIUM,
1506- ))
1507- .text_color(rgb(INK3()))
1508- .child("all")
1509- .child(all_chord),
1510- ),
1511 )1363 )
1512 .child(1364 .child(
1513 div()1365 div()
crates/app/src/ui/overlays.rsmodified+15 -0
@@ -375,6 +375,21 @@ impl Player {
375 event.position(),375 event.position(),
376 cx,376 cx,
377 );377 );
378+ } else if matches!(menu.on, MenuOn::Head)
379+ && matches!(
380+ action,
381+ ActionId::Mix
382+ | ActionId::RemoveVideoLane
383+ | ActionId::RemoveAudioLane
384+ )
385+ {
386+ // The head's own verbs, which left the
387+ // head itself for this menu (cleanse
388+ // round 2): they act on the lane the
389+ // hand named, the way the head's
390+ // buttons did, not on the last of the
391+ // kind the bare stroke reaches.
392+ this.act_lane(action, menu.lane, cx);
378 } else {393 } else {
379 this.act(action, window, cx);394 this.act(action, window, cx);
380 }395 }
crates/app/src/ui/stance.rsmodified+30 -30
@@ -136,15 +136,12 @@ pub(crate) const LEDGER_H: f32 = 28.;
136 /// role [`BENCH_H`] plays for the bench.136 /// role [`BENCH_H`] plays for the bench.
137 pub(crate) const DOCK_W: f32 = 280.;137 pub(crate) const DOCK_W: f32 = 280.;
138 /// What [`bench`] spends above `bench_stance::render`'s own content: the138 /// What [`bench`] spends above `bench_stance::render`'s own content: the
139-/// `bench` div's own `.border_t_1()` (1px) + its `py(4.)` top padding +139+/// `bench` div's own `.border_t_1()` (1px) + its `py(4.)` top padding, and
140-/// the section head's real line box -- `type_scale::head()` sizes text at140+/// nothing else since the `BENCH` section head went (cleanse round 2 -- the
141-/// `SECTION_HEAD_PX` (12) but never calls `.line_height()`, so gpui's141+/// ruler row starts the region and the geography says what it is). `1 + 4`
142-/// default `TextStyle::line_height` (the golden ratio, `gpui::phi()` ==142+/// = `5`. Named and `pub(crate)` rather than an inline subtraction, so
143-/// `1.618034`, not 1x the font size) is what it actually draws:143+/// `layout::BENCH_MIN_H` can derive from the real chrome.
144-/// `round(12. * 1.618034)` = `round(19.416408)` = `19`.144+pub(crate) const BENCH_CHROME_H: f32 = 5.;
145-/// `1 + 4 + 19` = `24`. Named and `pub(crate)` rather than an inline
146-/// subtraction, so `layout::BENCH_MIN_H` can derive from the real chrome.
147-pub(crate) const BENCH_CHROME_H: f32 = 24.;
148 145
149 /// The lowest a menu's top edge may sit and still land inside the146 /// The lowest a menu's top edge may sit and still land inside the
150 /// bench/ledger/dock footprint below the screen (DESIGN §5, §9, §11 check 6):147 /// bench/ledger/dock footprint below the screen (DESIGN §5, §9, §11 check 6):
@@ -517,16 +514,6 @@ fn scale_plate(player: &Player) -> impl IntoElement {
517 .child(div().text_color(rgb(INK1())).child(value))514 .child(div().text_color(rgb(INK1())).child(value))
518 }515 }
519 516
520-/// A section head, uppercase, `ink3` -- DESIGN §3's scale for the label
521-/// that names a region before anything else lives in it.
522-fn section_head(label: &str) -> impl IntoElement {
523- div()
524- .flex_none()
525- .type_style(type_scale::head())
526- .text_color(rgb(INK3()))
527- .child(label.to_uppercase())
528-}
529-
530 /// A room verb at the ledger's right end (DESIGN §4, §5 as amended517 /// A room verb at the ledger's right end (DESIGN §4, §5 as amended
531 /// 2026-09-09 -- user decision "option C"): the name in `ink3`, its chord518 /// 2026-09-09 -- user decision "option C"): the name in `ink3`, its chord
532 /// beside it, read live off the keymap so a rebind can never leave the519 /// beside it, read live off the keymap so a rebind can never leave the
@@ -724,7 +711,6 @@ fn bench(
724 .flex_col()711 .flex_col()
725 .px(px(12.))712 .px(px(12.))
726 .py(px(4.))713 .py(px(4.))
727- .child(section_head("bench"))
728 .child(bench_stance::render(player, bench_h - BENCH_CHROME_H, cx))714 .child(bench_stance::render(player, bench_h - BENCH_CHROME_H, cx))
729 }715 }
730 716
@@ -733,16 +719,14 @@ fn bench(
733 fn ledger(player: &Player, position: f64, cx: &mut Context<Player>) -> impl IntoElement {719 fn ledger(player: &Player, position: f64, cx: &mut Context<Player>) -> impl IntoElement {
734 let name = match player.project_path.as_os_str().is_empty() {720 let name = match player.project_path.as_os_str().is_empty() {
735 true => "untitled".to_string(),721 true => "untitled".to_string(),
736- false => file_name(&player.project_path),722+ false => stem(&player.project_path),
737 };723 };
738- let identity = format!(724+ // The project's own name, extension dropped (`files::stem`, the bench's
739- "{name} · {}",725+ // plates read with the same helper) and the middot the state word hangs
740- if player.autosave_dirty {726+ // off -- the word itself is a child of its own, because when the project
741- "unsaved"727+ // is unsaved it is not a word but Save's door (below).
742- } else {728+ let identity = format!("{name} ·");
743- "saved"729+ let dirty = player.autosave_dirty;
744- }
745- );
746 let last_action = player.notices.back().cloned().unwrap_or_else(|| "—".into());730 let last_action = player.notices.back().cloned().unwrap_or_else(|| "—".into());
747 // With the floating plate gone (user 2026-08-27, "we also have notifier731 // With the floating plate gone (user 2026-08-27, "we also have notifier
748 // at the ledger section"), this strip is the one notice surface left --732 // at the ledger section"), this strip is the one notice surface left --
@@ -770,7 +754,6 @@ fn ledger(player: &Player, position: f64, cx: &mut Context<Player>) -> impl Into
770 .items_center()754 .items_center()
771 .gap(px(14.))755 .gap(px(14.))
772 .px(px(12.))756 .px(px(12.))
773- .child(section_head("ledger"))
774 // MOCK-SPEC.md "Ledger": "All mono" -- project identity, last757 // MOCK-SPEC.md "Ledger": "All mono" -- project identity, last
775 // action, export progress and position are all what the film/project758 // action, export progress and position are all what the film/project
776 // says, not the room's own voice.759 // says, not the room's own voice.
@@ -783,6 +766,23 @@ fn ledger(player: &Player, position: f64, cx: &mut Context<Player>) -> impl Into
783 .text_color(rgb(INK1()))766 .text_color(rgb(INK1()))
784 .child(identity),767 .child(identity),
785 )768 )
769+ // Saved is a state and reads as one; unsaved is a thing to *do*, and
770+ // this is Save's home now that the time band no longer carries it
771+ // (cleanse round 2) -- the same room-verb ghost the four verbs at the
772+ // strip's other end are built from, so its chord, its hover plate and
773+ // its hitmap door all come from one place.
774+ .child(match dirty {
775+ true => room_ghost(player, "unsaved", ActionId::Save, false, cx).into_any_element(),
776+ false => div()
777+ .flex_none()
778+ .type_style(type_scale::mono(
779+ type_scale::CHORD_METADATA_MIN_PX,
780+ gpui::FontWeight::MEDIUM,
781+ ))
782+ .text_color(rgb(INK1()))
783+ .child("saved")
784+ .into_any_element(),
785+ })
786 .child(786 .child(
787 div()787 div()
788 .flex_1()788 .flex_1()