forge
Explore
Log in

Don't you dare go Hollow

Merge branch 'worktree-agent-aea4a704971d1657f'

Browse files at this commit

23fb9904d7f529feb73e7925bd80b8316e085762Ahmet Kaan GümüşParent: 40c76d95c3c705
# Conflicts:
#	DESIGN.md
#	crates/app/src/tests/layout.rs
DESIGN.mdmodified+26 -8
@@ -116,10 +116,10 @@ Fixed geography; nothing moves, nothing occludes the picture:
116 │ (with the in/out grips) │ │116 │ (with the in/out grips) │ │
117 │ → [Export] │ │117 │ → [Export] │ │
118 ├─────────────────────────────────┤ │118 ├─────────────────────────────────┤ │
119-│ BENCH (lanes V/A/S) │ │119+│ ruler · lanes • V1 • A1 • S1 │ │
120 ├─────────────────────────────────┤ │120 ├─────────────────────────────────┤ │
121-│ LEDGER (project · state · room │ │121+│ name · saved | last action | │ │
122-│ verbs · position) │ │122+│ room verbs · position │ │
123 └─────────────────────────────────┴──────┘123 └─────────────────────────────────┴──────┘
124 ```124 ```
125 125
@@ -139,15 +139,22 @@ all left it — each keeps its chord and its KEYS-tab row, the ruler menu keeps
139 on the ruler, the marks became the strip's grips, and the ledger already says `saved`/`unsaved ·139 on the ruler, the marks became the strip's grips, and the ledger already says `saved`/`unsaved ·
140 ^s`. The picture's `scale 0.59` corner readout is deleted with them: fit is `^0`, and the number140 ^s`. The picture's `scale 0.59` corner readout is deleted with them: fit is `^0`, and the number
141 was a state nobody acts on.141 was a state nobody acts on.
142-- **Bench**: lanes. Clip anatomy = ink spine (3px left edge) + real thumbnails/waveform in the142+- **Bench**: the ruler row, then lanes. Clip anatomy = ink spine (3px left edge) + real
143- source's ink + name plate + splice gaps in lamp white.143+ thumbnails/waveform in the source's ink + name plate + splice gaps in lamp white. A lane head
144-- **Ledger**: project identity (`name.edith · saved`), last action, export progress, and at the144+ is a source dot and the lane's name (`• V1`, 60px) and nothing else; the name plate carries
145+ the file's name without its extension (`files::stem`), and only once per source — the audio
146+ half of a linked insert has no plate, because the picture plate directly above it and the
147+ shared dot already say whose it is.
148+- **Ledger**: project identity (`name · saved`, extension dropped), last action, export
149+ progress, and at the
145 right end, before the position: the **room verbs** as ghosts (`CC t · settings ^, · keys ? ·150 right end, before the position: the **room verbs** as ghosts (`CC t · settings ^, · keys ? ·
146 full f11`) — the four commands that act on the room itself and so have no thing under the151 full f11`) — the four commands that act on the room itself and so have no thing under the
147 cursor to be right-clicked on. `ink3` + chord, hover raises to `ink2` with the room's own152 cursor to be right-clicked on. `ink3` + chord, hover raises to `ink2` with the room's own
148 plate, `CC` reads `ink1` + fill while subtitles are shown. State lives here, notices rise153 plate, `CC` reads `ink1` + fill while subtitles are shown. State lives here, notices rise
149- from here.154+ from here. When the project is unsaved the state word is not a word but a door:
150-- **Dock** (right, the only side panel): SOURCES tab, CLIP tab, KEYS tab.155+ `unsaved ^s`, the same room-verb ghost, and clicking it saves — this is Save's home.
156+- **Dock** (right, the only side panel): SOURCES tab and CLIP tab; the keys list is dock-body
157+ state behind `?` / the ledger's `keys ?`, not a tab (user 2026-09-09).
151 **Cleanse round 2 (2026-09-10):** SOURCES is a filter and *one* list. The filter is the glass158 **Cleanse round 2 (2026-09-10):** SOURCES is a filter and *one* list. The filter is the glass
152 alone (`⌕`, no placeholder word); the list holds every source together — picture, sound and159 alone (`⌕`, no placeholder word); the list holds every source together — picture, sound and
153 subtitle tracks — in arrival order, with no `Media / Audio / Text` sub-tabs, no sort row, no160 subtitle tracks — in arrival order, with no `Media / Audio / Text` sub-tabs, no sort row, no
@@ -161,6 +168,17 @@ was a state nobody acts on.
161 CLIP tab: the per-clip verbs (Speed / Colour / Transform / EQ / Silence / Mix / Fit) as plain168 CLIP tab: the per-clip verbs (Speed / Colour / Transform / EQ / Silence / Mix / Fit) as plain
162 ghost rows — label + chord, no head styling — over the param rows they open.169 ghost rows — label + chord, no head styling — over the param rows they open.
163 170
171+**Amendment (2026-09-10), "cleanse round 2":** the `BENCH` and `LEDGER` section heads are
172+deleted — the geography says what a region is, and a label above it is a second saying. The
173+ruler row is the bench's own top edge (the seam's grab band no longer reaches past it, since the
174+ruler answers presses itself), and the ledger's first word is the project. `all ^a` leaves the
175+ruler's right edge for the ruler's own right-click menu; the lane head's `≋` mix and `×` remove
176+leave the head for the head's own right-click menu, where they still act on the lane that was
177+clicked. Every one of them keeps its chord and its KEYS row: nothing lost a door, each one moved
178+to the thing it acts on, which is the "option C" rule below applied a second time. Save moves
179+the same way: the time band's ghost — parked there only because the ledger was another
180+builder's file at the time — is deleted, and the ledger's own state word is its door.
181+
164 **Amendment (2026-09-09), user decision "option C":** there is no rail. The 56px spine — every182 **Amendment (2026-09-09), user decision "option C":** there is no rail. The 56px spine — every
165 command as a ghost glyph + chord down the left edge — is deleted, and the picture, time band,183 command as a ghost glyph + chord down the left edge — is deleted, and the picture, time band,
166 bench and ledger take its width. Nothing on screen lists the room's commands, because **the184 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 and the ledger's project identity). One place, so the two can
151+/// 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/interact.rsmodified+8 -8
@@ -258,20 +258,20 @@ pub(crate) fn drag_scrim(cx: &mut Context<Player>) -> Div {
258 /// 2026-09-09: "panes should be enlargable and shrinkable" -- they already258 /// 2026-09-09: "panes should be enlargable and shrinkable" -- they already
259 /// were). The hairline is painted *by the band*, not by the strip, so the259 /// were). The hairline is painted *by the band*, not by the strip, so the
260 /// whole band lights it: a line raised only by the pixels that already grab260 /// whole band lights it: a line raised only by the pixels that already grab
261-/// the seam tells a hand nothing. The bench's band is deeper still261+/// the seam tells a hand nothing. The bench's band ([`BENCH_GRAB_H`]) is every
262-/// ([`BENCH_GRAB_H`]) -- the row under its seam is the bench's own section262+/// other seam's reach: the section head under it is gone (cleanse round 2) and
263-/// head, and that is where a hand aiming at "the top of the timeline" lands.263+/// the ruler that starts the bench now answers presses itself, so a deeper
264+/// band would eat scrubs at the film's own top edge.
264 ///265 ///
265 /// A double press resets the seam to the window's own share266 /// A double press resets the seam to the window's own share
266 /// ([`Splits::clear`]): the cheap way back from a layout dragged somewhere267 /// ([`Splits::clear`]): the cheap way back from a layout dragged somewhere
267 /// unusable, and the one every editor's dividers answer to.268 /// unusable, and the one every editor's dividers answer to.
268 pub(crate) fn divider(split: Split, held: bool, cx: &mut Context<Player>) -> Div {269 pub(crate) fn divider(split: Split, held: bool, cx: &mut Context<Player>) -> Div {
269 let across = matches!(split, Split::Timeline | Split::Bench);270 let across = matches!(split, Split::Timeline | Split::Bench);
270- // A row seam parts the picture from a panel whose own first row is its271+ // Named per seam anyway ([`BENCH_GRAB_H`] is [`GRAB_W`] since the bench
271- // section head -- empty land -- so the bench's band reaches down through272+ // lost its section head): every neighbour's first row carries content the
272- // it ([`BENCH_GRAB_H`]). Every other seam keeps [`GRAB_W`]: the dock's273+ // hand may want instead -- the bench's ruler scrubs, the dock's rows start
273- // neighbour is a list whose rows start at its very edge, and the legacy274+ // at its very edge, the legacy timeline's are the edit toolbar's buttons.
274- // timeline's is the edit toolbar's buttons.
275 let grab = match split {275 let grab = match split {
276 Split::Bench => BENCH_GRAB_H,276 Split::Bench => BENCH_GRAB_H,
277 _ => GRAB_W,277 _ => GRAB_W,
crates/app/src/layout.rsmodified+8 -13
@@ -320,19 +320,14 @@ pub(crate) const SPLIT_W: f32 = 6.;
320 /// the strip's far side), not the six transparent pixels in front of it.320 /// the strip's far side), not the six transparent pixels in front of it.
321 pub(crate) const GRAB_W: f32 = 14.;321 pub(crate) const GRAB_W: f32 = 14.;
322 322
323-/// The bench seam's own band, deeper than [`GRAB_W`] because it may be: what323+/// The bench seam's own band. It used to be deeper than [`GRAB_W`] because
324-/// lies under the seam is `ui::stance::bench`'s own section head -- 24 px of324+/// what lay under the seam was `ui::stance::bench`'s own section head -- 24 px
325-/// border, padding and the word "bench", with nothing in it to press -- so the325+/// with nothing in it to press, so the band reached down through it. That head
326-/// band reaches down through it instead of stopping 7 px past the line. Driven326+/// is gone (cleanse round 2): the ruler row is the bench's top edge now, and
327-/// at 2560x1440 against a real `bench=207`: with the 14 px band the seam327+/// the ruler *is* pressable (it scrubs), so a band reaching into it would take
328-/// answered a press only within +/-7 px of the line the eye sees and was silent328+/// presses meant for the film. Back to every other seam's reach: `-1 .. +13`
329-/// on the `BENCH` label row below it, which is the visible top edge of the329+/// of strip, `-7 .. +7` of the seam.
330-/// timeline and so the thing a hand aims at ("library resizes but timeline330+pub(crate) const BENCH_GRAB_H: f32 = GRAB_W;
331-/// doesn't" -- a real `stance-splits` holds `dock=277`, a dragged dock, beside
332-/// a `bench=207` that is a press with no drag in it). 20 px hung one row above
333-/// the strip covers the line, the six pixels in front of it and the whole head
334-/// row: `-1 .. +19` of strip, `-7 .. +13` of the seam.
335-pub(crate) const BENCH_GRAB_H: f32 = 20.;
336 331
337 /// The most of the window one side column may be dragged to. A third each, so332 /// The most of the window one side column may be dragged to. A third each, so
338 /// the picture keeps the middle at every size -- the rule [`library_w`] and333 /// the picture keeps the middle at every size -- the rule [`library_w`] and
crates/app/src/menus.rsmodified+5 -1
@@ -260,7 +260,11 @@ pub(crate) const MENU_ITEMS: [ActionId; 16] = [
260 /// undo pair, which is the one thing every editor expects on empty canvas.260 /// undo pair, which is the one thing every editor expects on empty canvas.
261 /// Not a junk drawer (§9): nothing here acts on a clip, and everything here261 /// Not a junk drawer (§9): nothing here acts on a clip, and everything here
262 /// acts on the thing the pointer is over.262 /// acts on the thing the pointer is over.
263-pub(crate) const BENCH_ITEMS: [ActionId; 10] = [263+pub(crate) const BENCH_ITEMS: [ActionId; 11] = [
264+ // The `all` control left the ruler's right edge (cleanse round 2): this
265+ // row is where the pointer reaches "select everything" now, and `^a`
266+ // still fires it.
267+ ActionId::SelectAll,
264 ActionId::WalkCutPrev,268 ActionId::WalkCutPrev,
265 ActionId::WalkCutNext,269 ActionId::WalkCutNext,
266 ActionId::WalkCutPrev10,270 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+89 -75
@@ -1607,17 +1607,30 @@ fn darkroom_lane_header_verbs_are_targeted_and_visible() {
1607 Enable::Hidden(_)1607 Enable::Hidden(_)
1608 ));1608 ));
1609 1609
1610+ // The head itself carries a dot, a name and -- on a subtitle lane -- its
1611+ // eye, and nothing else (cleanse round 2). Its mix and its remove are rows
1612+ // in its own right-click menu instead, and they still reach the lane the
1613+ // hand named rather than the last of the kind a bare stroke walks to:
1614+ // `overlays.rs` routes those rows through the same `act_lane` door the
1615+ // head's buttons used.
1610 let bench = src_text("ui/bench_stance.rs");1616 let bench = src_text("ui/bench_stance.rs");
1611- for door in [1617+ for gone in ["\"bench-mix-lane\"", "\"bench-remove-lane\"", "lane.{}.remove"] {
1612- "\"bench-mix-lane\"",1618+ assert!(!bench.contains(gone), "the lane head still wears {gone}");
1613- "\"bench-show-sub-lane\"",1619+ }
1614- "\"bench-remove-lane\"",1620+ for door in ["\"bench-show-sub-lane\"", "this.show_sub_lane(lane, cx)"] {
1615- "this.act_lane(ActionId::Mix, lane, cx)",
1616- "this.show_sub_lane(lane, cx)",
1617- "this.act_lane(action, lane, cx)",
1618- ] {
1619 assert!(bench.contains(door), "lane header lost {door}");1621 assert!(bench.contains(door), "lane header lost {door}");
1620 }1622 }
1623+ assert!(
1624+ lane_items(Lane::A1).contains(&ActionId::Mix)
1625+ && lane_items(Lane::A1).contains(&ActionId::RemoveAudioLane)
1626+ && lane_items(Lane::V1).contains(&ActionId::RemoveVideoLane)
1627+ && !lane_items(Lane::V1).contains(&ActionId::Mix),
1628+ "a head verb left the head with no row in the head's own menu"
1629+ );
1630+ assert!(
1631+ src_text("ui/overlays.rs").contains("this.act_lane(action, menu.lane, cx)"),
1632+ "the head menu lane verbs no longer act on the lane that was clicked"
1633+ );
1621 // Cleanse round 2 (2026-09-10): the monitoring cluster left the band1634 // Cleanse round 2 (2026-09-10): the monitoring cluster left the band
1622 // (chord + KEYS row only). What the band still owes a pointer is the1635 // (chord + KEYS row only). What the band still owes a pointer is the
1623 // export range's two grips on the contact strip.1636 // export range's two grips on the contact strip.
@@ -1865,18 +1878,17 @@ fn the_whole_bench_stack_fits_its_own_floor_with_the_ledger_seam_clear() {
1865 use crate::BENCH_MIN_H;1878 use crate::BENCH_MIN_H;
1866 use crate::ui::bench_stance::{LANE_MIN_H, ROW_GAP, RULER_H};1879 use crate::ui::bench_stance::{LANE_MIN_H, ROW_GAP, RULER_H};
1867 use crate::ui::stance::BENCH_CHROME_H;1880 use crate::ui::stance::BENCH_CHROME_H;
1868- use crate::ui::type_scale::SECTION_HEAD_PX;
1869 1881
1870 const BENCH_BORDER_T: f32 = 1.;1882 const BENCH_BORDER_T: f32 = 1.;
1871 const BENCH_PY_TOP: f32 = 4.;1883 const BENCH_PY_TOP: f32 = 4.;
1872- let section_head_line_h = (SECTION_HEAD_PX * 1.618_034).round();1884+ // No section head any more (cleanse round 2): the border and the padding
1873- let real_chrome = BENCH_BORDER_T + BENCH_PY_TOP + section_head_line_h;1885+ // are the whole of what `stance::bench` draws above the ruler.
1886+ let real_chrome = BENCH_BORDER_T + BENCH_PY_TOP;
1874 assert_eq!(1887 assert_eq!(
1875 BENCH_CHROME_H, real_chrome,1888 BENCH_CHROME_H, real_chrome,
1876 "BENCH_CHROME_H ({BENCH_CHROME_H}) does not match what `stance::bench` \1889 "BENCH_CHROME_H ({BENCH_CHROME_H}) does not match what `stance::bench` \
1877 actually draws above the content ({real_chrome}px: {BENCH_BORDER_T}px \1890 actually draws above the content ({real_chrome}px: {BENCH_BORDER_T}px \
1878- border + {BENCH_PY_TOP}px padding + {section_head_line_h}px label line \1891+ border + {BENCH_PY_TOP}px padding) -- bench_stance::render gets handed the wrong box_h and lays its \
1879- box) -- bench_stance::render gets handed the wrong box_h and lays its \
1880 rows out past its own real space"1892 rows out past its own real space"
1881 );1893 );
1882 1894
@@ -2570,11 +2582,6 @@ fn every_action_has_a_darkroom_widget_home_or_explicit_owner() {
2570 became the contact strip's own grips, and clearing both at once is \2582 became the contact strip's own grips, and clearing both at once is \
2571 not a thing on the film to point at",2583 not a thing on the film to point at",
2572 ),2584 ),
2573- (
2574- ActionId::Save,
2575- "KEYS tab + key: the ledger says `saved`/`unsaved · ^s`, which is the \
2576- state this verb is about (cleanse round 2)",
2577- ),
2578 (2585 (
2579 ActionId::Screenshot,2586 ActionId::Screenshot,
2580 "the picture the frame is written from is the *watched* frame and \2587 "the picture the frame is written from is the *watched* frame and \
@@ -2713,9 +2720,7 @@ fn hitmap_names_every_darkroom_pointer_entry_surface() {
2713 "clip.{}.{}.{}.trim-{}",2720 "clip.{}.{}.{}.trim-{}",
2714 "clip.{}.{}.{}.dissolve",2721 "clip.{}.{}.{}.dissolve",
2715 "lane.{}.reorder",2722 "lane.{}.reorder",
2716- "lane.{}.mix",
2717 "lane.{}.eye",2723 "lane.{}.eye",
2718- "lane.{}.remove",
2719 ] {2724 ] {
2720 assert!(2725 assert!(
2721 bench.contains(needle),2726 bench.contains(needle),
@@ -2943,28 +2948,24 @@ fn the_seam_paints_nothing_until_a_pointer_finds_it() {
2943 );2948 );
2944 }2949 }
2945 2950
2946-/// The band the hand actually gets, in seam coordinates -- driven at2951+/// The band the hand actually gets, in seam coordinates. It once reached 13px
2947-/// 2560x1440 with a real `bench=207` before this diff: a press answered only2952+/// past the line to cover the `BENCH` label row a hand aimed at; that row is
2948-/// within +/-7 px of the line the eye sees, and the `BENCH` label row under it2953+/// gone (cleanse round 2) and the ruler under the seam answers presses of its
2949-/// -- the visible top edge of the timeline, the thing a hand aims at -- was2954+/// own (it scrubs), so the bench seam takes every other seam's reach and no
2950-/// silent. The band is hung one row above the [`SPLIT_W`] strip, so its reach2955+/// more -- a deeper band would eat scrubs at the film's own top edge.
2951-/// past the line is `grab - 1 - SPLIT_W`.
2952 #[test]2956 #[test]
2953-fn the_bench_seam_reaches_into_the_row_a_hand_aims_at() {2957+fn the_bench_seam_reaches_no_further_than_every_other_seam() {
2954 let above = 1.;2958 let above = 1.;
2955 let reach = |grab: f32| grab - above - crate::layout::SPLIT_W;2959 let reach = |grab: f32| grab - above - crate::layout::SPLIT_W;
2956- // Every other seam is unchanged: its neighbour's own first row carries
2957- // content (the dock's rows, the legacy toolbar's buttons).
2958 assert_eq!(reach(crate::layout::GRAB_W), 7.);2960 assert_eq!(reach(crate::layout::GRAB_W), 7.);
2959- // The bench's reaches through the 24 px section head far enough to cover2961+ assert_eq!(
2960- // the label row a hand lands on, and no further than the head itself.2962+ reach(crate::layout::BENCH_GRAB_H),
2961- let past = reach(crate::layout::BENCH_GRAB_H);2963+ 7.,
2962- assert!(2964+ "the bench band reaches past the ruler row, which answers presses itself"
2963- (10. ..=crate::ui::stance::BENCH_CHROME_H).contains(&past),
2964- "the bench band reaches {past}px past the seam"
2965 );2965 );
2966 }2966 }
2967 2967
2968+
2968 /// The clamp table, driven: the seam refuses exactly two things, and neither2969 /// The clamp table, driven: the seam refuses exactly two things, and neither
2969 /// is anywhere near where a hand drags. Measured live at 2560x1440 --2970 /// is anywhere near where a hand drags. Measured live at 2560x1440 --
2970 /// `bench=105` at the floor, `bench=1164` at the ceiling.2971 /// `bench=105` at the floor, `bench=1164` at the ceiling.
@@ -3267,60 +3268,73 @@ fn the_ledger_carries_the_rooms_four_verbs_and_no_rail_remains() {
3267 );3268 );
3268 }3269 }
3269 3270
3270-/// The ruler's right edge was soup: `bench-select-all` sits `right(4.)` over3271+/// The `all` control left the ruler (cleanse round 2, DESIGN §5): the ruler
3271-/// the tick band while tick suppression only guarded the LEFT plate, so the3272+/// row is the bench's own top edge and carries ticks and the playhead alone.
3272-/// `00:20` label drew straight under the `all` chord. The control's band is3273+/// Every removed control keeps a door -- `^a` still fires it, and the ruler's
3273-/// reserved now -- a label whose right edge would enter it is dropped, the3274+/// own right-click menu ([`BENCH_ITEMS`]) is where the pointer reaches it --
3274-/// mirror of the left rule.3275+/// so this checks the control is gone AND that the row exists, not just the
3276+/// deletion.
3275 #[test]3277 #[test]
3276-fn the_ruler_reserves_a_band_for_its_select_all_control() {3278+fn select_all_left_the_ruler_for_the_rulers_own_menu() {
3277- use crate::ui::bench_stance::{SELECT_ALL_PAD, char_w};3279+ use crate::ActionId;
3278- use crate::ui::type_scale::{CHORD_METADATA_MIN_PX, FLOOR_PX};3280+ use crate::menus::BENCH_ITEMS;
3279 let bench = src_text("ui/bench_stance.rs");3281 let bench = src_text("ui/bench_stance.rs");
3282+ for gone in ["bench-select-all", "select_all_band", "SELECT_ALL_PAD"] {
3283+ assert!(!bench.contains(gone), "the ruler still carries {gone}");
3284+ }
3280 assert!(3285 assert!(
3281- bench.contains("x + label_w <= bed_w - all_w"),3286+ BENCH_ITEMS.contains(&ActionId::SelectAll),
3282- "the tick loop no longer keeps the select-all band clear"3287+ "`all` left the ruler with no menu row behind it"
3283 );3288 );
3284- // The rule itself, with the shipped widths: `all` + `^a` at the chord3289+ // And the band it reserved is the ticks' again: nothing subtracts a
3285- // size, a `00:20` label at the floor size, a 850 px bed.3290+ // control's width from the bed's right edge any more.
3286- let all_w = ("all".len() + "^a".len()) as f32 * char_w(CHORD_METADATA_MIN_PX) + SELECT_ALL_PAD;
3287- let label_w = "00:20".len() as f32 * char_w(FLOOR_PX);
3288- let clear = |x: f32| x + label_w <= 850. - all_w;
3289- assert!(!clear(820.), "a tick at the right edge still draws under `all`");
3290 assert!(3291 assert!(
3291- !clear(850. - all_w - label_w + 1.),3292+ bench.contains("if x >= plate_w && x + label_w <= bed_w {"),
3292- "the band's own edge leaks"3293+ "the tick loop still keeps a band clear for a control that is gone"
3293 );3294 );
3294- assert!(clear(700.), "the rule eats ticks that clear the band");
3295 }3295 }
3296 3296
3297-/// Clicking `all` selected all AND scrubbed: the control lives inside3297+/// The rest of cleanse round 2's bench + ledger, which is all about *one*
3298-/// `bench-ruler`, whose `on_mouse_down` seeks, and the press reached it (the3298+/// saying per thing: the head is a dot and a name (its verbs left, checked
3299-/// playhead jumped 00:00:11:12 -> 00:00:20:14). The scrub refuses the3299+/// above), a source's name is drawn once per source -- the audio half of a
3300-/// control's reserved band now -- a `stop_propagation` on the control is what3300+/// linked insert has no plate, because the picture plate directly above it
3301-/// this looks like at first and it does NOT work: gpui builds the control's3301+/// and the shared dot already say whose it is -- names lose their extension
3302-/// own click out of that same mouse-down, so stopping it drops the selection3302+/// through one helper, and the ledger's state word is Save's only door now
3303-/// (measured live, run 20260909-174243-jZzccm/after-all.png: nothing but the3303+/// (the time band's parking-spot ghost, filed there because the ledger was a
3304-/// hover changed).3304+/// concurrent builder's file, is deleted).
3305 #[test]3305 #[test]
3306-fn a_press_on_the_select_all_band_does_not_scrub_the_ruler() {3306+fn one_name_per_source_one_stem_helper_and_one_save_door() {
3307- use crate::ui::bench_stance::select_all_band;
3308 let bench = src_text("ui/bench_stance.rs");3307 let bench = src_text("ui/bench_stance.rs");
3309- let at = bench.find(r#".id("bench-ruler")"#).expect("no ruler");
3310- let listener = &bench[at..at + bench[at..].find(".children(ticks").expect("its ticks")];
3311 assert!(3308 assert!(
3312- listener.contains("bed_w - band") && listener.contains("select_all_band("),3309+ bench.contains(".filter(|_| !(audio && clip.link.is_some()))"),
3313- "the ruler's scrub takes the select-all band's presses again: {listener}"3310+ "the audio half of a linked insert wears a second name plate again"
3311+ );
3312+ assert!(
3313+ bench.contains("stem(&s.path)") && !bench.contains("file_name(&s.path)"),
3314+ "a name plate shows the file's extension again"
3315+ );
3316+ let stance = src_text("ui/stance.rs");
3317+ assert!(
3318+ stance.contains("stem(&player.project_path)"),
3319+ "the ledger shows the project's extension again"
3320+ );
3321+ assert!(
3322+ stance.contains(r#"room_ghost(player, "unsaved", ActionId::Save"#),
3323+ "the ledger's unsaved state is not Save's door -- it is a word again"
3314 );3324 );
3315 assert!(3325 assert!(
3316- !bench[at..].contains("cx.stop_propagation()"),3326+ !src_text("ui/timeband_stance.rs").contains("ActionId::Save"),
3317- "a press stopped inside the ruler also swallows the control's own click"3327+ "Save has two doors: the ledger's state word and the time band's ghost"
3318 );3328 );
3319- // The rule the listener runs, at the shipped widths: a 850 px bed, `^a`.3329+ // The helper itself, since three surfaces read one file's name through
3320- let band = select_all_band("^a");3330+ // it: a plain name loses its extension, a name with none is itself, and
3321- assert!(band > 30. && band < 70., "the band is not a control's width: {band}");3331+ // a path with no name at all still reads as something.
3322- assert!(850. - 4. >= 850. - band, "a press on the control still seeks");3332+ use crate::files::{file_name, stem};
3323- assert!(500. < 850. - band, "a press mid-ruler stopped seeking");3333+ use std::path::Path;
3334+ assert_eq!(stem(Path::new("/x/he_is_not_the_only_one.mp4")), "he_is_not_the_only_one");
3335+ assert_eq!(stem(Path::new("/x/untitled")), "untitled");
3336+ assert_eq!(stem(Path::new("/x/a.b.edith")), "a.b");
3337+ assert_eq!(stem(Path::new("/")), file_name(Path::new("/")));
3324 }3338 }
3325 3339
3326 /// DESIGN §4/§5: the hero timecode leads the time band and the ledger carries3340 /// DESIGN §4/§5: the hero timecode leads the time band and the ledger carries
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
@@ -376,6 +376,21 @@ impl Player {
376 event.position(),376 event.position(),
377 cx,377 cx,
378 );378 );
379+ } else if matches!(menu.on, MenuOn::Head)
380+ && matches!(
381+ action,
382+ ActionId::Mix
383+ | ActionId::RemoveVideoLane
384+ | ActionId::RemoveAudioLane
385+ )
386+ {
387+ // The head's own verbs, which left the
388+ // head itself for this menu (cleanse
389+ // round 2): they act on the lane the
390+ // hand named, the way the head's
391+ // buttons did, not on the last of the
392+ // kind the bare stroke reaches.
393+ this.act_lane(action, menu.lane, cx);
379 } else {394 } else {
380 this.act(action, window, cx);395 this.act(action, window, cx);
381 }396 }
crates/app/src/ui/stance.rsmodified+31 -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):
@@ -436,16 +433,6 @@ pub(crate) fn picture_bottom(player: &Player) -> Option<f32> {
436 fitted_bottom(PICTURE_BOUNDS.with(Rc::clone).get(), image.size(0))433 fitted_bottom(PICTURE_BOUNDS.with(Rc::clone).get(), image.size(0))
437 }434 }
438 435
439-/// A section head, uppercase, `ink3` -- DESIGN §3's scale for the label
440-/// that names a region before anything else lives in it.
441-fn section_head(label: &str) -> impl IntoElement {
442- div()
443- .flex_none()
444- .type_style(type_scale::head())
445- .text_color(rgb(INK3()))
446- .child(label.to_uppercase())
447-}
448-
449 /// A room verb at the ledger's right end (DESIGN §4, §5 as amended436 /// A room verb at the ledger's right end (DESIGN §4, §5 as amended
450 /// 2026-09-09 -- user decision "option C"): the name in `ink3`, its chord437 /// 2026-09-09 -- user decision "option C"): the name in `ink3`, its chord
451 /// beside it, read live off the keymap so a rebind can never leave the438 /// beside it, read live off the keymap so a rebind can never leave the
@@ -630,7 +617,6 @@ fn bench(
630 .flex_col()617 .flex_col()
631 .px(px(12.))618 .px(px(12.))
632 .py(px(4.))619 .py(px(4.))
633- .child(section_head("bench"))
634 .child(bench_stance::render(player, bench_h - BENCH_CHROME_H, cx))620 .child(bench_stance::render(player, bench_h - BENCH_CHROME_H, cx))
635 }621 }
636 622
@@ -639,16 +625,14 @@ fn bench(
639 fn ledger(player: &Player, position: f64, cx: &mut Context<Player>) -> impl IntoElement {625 fn ledger(player: &Player, position: f64, cx: &mut Context<Player>) -> impl IntoElement {
640 let name = match player.project_path.as_os_str().is_empty() {626 let name = match player.project_path.as_os_str().is_empty() {
641 true => "untitled".to_string(),627 true => "untitled".to_string(),
642- false => file_name(&player.project_path),628+ false => stem(&player.project_path),
643 };629 };
644- let identity = format!(630+ // The project's own name, extension dropped (`files::stem`, the bench's
645- "{name} · {}",631+ // plates read with the same helper) and the middot the state word hangs
646- if player.autosave_dirty {632+ // off -- the word itself is a child of its own, because when the project
647- "unsaved"633+ // is unsaved it is not a word but Save's door (below).
648- } else {634+ let identity = format!("{name} ·");
649- "saved"635+ let dirty = player.autosave_dirty;
650- }
651- );
652 let last_action = player.notices.back().cloned().unwrap_or_else(|| "—".into());636 let last_action = player.notices.back().cloned().unwrap_or_else(|| "—".into());
653 // With the floating plate gone (user 2026-08-27, "we also have notifier637 // With the floating plate gone (user 2026-08-27, "we also have notifier
654 // at the ledger section"), this strip is the one notice surface left --638 // at the ledger section"), this strip is the one notice surface left --
@@ -676,7 +660,6 @@ fn ledger(player: &Player, position: f64, cx: &mut Context<Player>) -> impl Into
676 .items_center()660 .items_center()
677 .gap(px(14.))661 .gap(px(14.))
678 .px(px(12.))662 .px(px(12.))
679- .child(section_head("ledger"))
680 // MOCK-SPEC.md "Ledger": "All mono" -- project identity, last663 // MOCK-SPEC.md "Ledger": "All mono" -- project identity, last
681 // action, export progress and position are all what the film/project664 // action, export progress and position are all what the film/project
682 // says, not the room's own voice.665 // says, not the room's own voice.
@@ -689,6 +672,24 @@ fn ledger(player: &Player, position: f64, cx: &mut Context<Player>) -> impl Into
689 .text_color(rgb(INK1()))672 .text_color(rgb(INK1()))
690 .child(identity),673 .child(identity),
691 )674 )
675+ // Saved is a state and reads as one; unsaved is a thing to *do*, and
676+ // this is Save's home; the time band's parking-spot ghost, filed there only
677+ // because the ledger was a concurrent builder's file, is deleted
678+ // (cleanse round 2) -- the same room-verb ghost the four verbs at the
679+ // strip's other end are built from, so its chord, its hover plate and
680+ // its hitmap door all come from one place.
681+ .child(match dirty {
682+ true => room_ghost(player, "unsaved", ActionId::Save, false, cx).into_any_element(),
683+ false => div()
684+ .flex_none()
685+ .type_style(type_scale::mono(
686+ type_scale::CHORD_METADATA_MIN_PX,
687+ gpui::FontWeight::MEDIUM,
688+ ))
689+ .text_color(rgb(INK1()))
690+ .child("saved")
691+ .into_any_element(),
692+ })
692 .child(693 .child(
693 div()694 div()
694 .flex_1()695 .flex_1()