diff --git a/DESIGN.md b/DESIGN.md index cad184d..34d1557 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -151,7 +151,9 @@ ruler answers presses itself), and the ledger's first word is the project. `all ruler's right edge for the ruler's own right-click menu; the lane head's `≋` mix and `×` remove leave the head for the head's own right-click menu, where they still act on the lane that was clicked. Every one of them keeps its chord and its KEYS row: nothing lost a door, each one moved -to the thing it acts on, which is the "option C" rule below applied a second time. +to the thing it acts on, which is the "option C" rule below applied a second time. Save moves +the same way: the time band's ghost — parked there only because the ledger was another +builder's file at the time — is deleted, and the ledger's own state word is its door. **Amendment (2026-09-09), user decision "option C":** there is no rail. The 56px spine — every command as a ghost glyph + chord down the left edge — is deleted, and the picture, time band, diff --git a/crates/app/src/files.rs b/crates/app/src/files.rs index 844a974..3b73f89 100644 --- a/crates/app/src/files.rs +++ b/crates/app/src/files.rs @@ -147,8 +147,8 @@ pub(crate) fn is_project(path: &std::path::Path) -> bool { /// A path's name without its extension, for every surface that shows what a /// file *is* rather than what it is stored as (cleanse round 2: the bench's -/// name plates, the ledger's project identity, the dock's rows). One place, -/// so those three can never come to disagree about the same file's name. +/// name plates and the ledger's project identity). One place, so the two can +/// never come to disagree about the same file's name. pub(crate) fn stem(path: &std::path::Path) -> String { path.file_stem().map_or_else( || file_name(path), diff --git a/crates/app/src/interact.rs b/crates/app/src/interact.rs index 4c1f5a4..2551204 100644 --- a/crates/app/src/interact.rs +++ b/crates/app/src/interact.rs @@ -258,20 +258,20 @@ pub(crate) fn drag_scrim(cx: &mut Context) -> Div { /// 2026-09-09: "panes should be enlargable and shrinkable" -- they already /// were). The hairline is painted *by the band*, not by the strip, so the /// whole band lights it: a line raised only by the pixels that already grab -/// the seam tells a hand nothing. The bench's band is deeper still -/// ([`BENCH_GRAB_H`]) -- the row under its seam is the bench's own section -/// head, and that is where a hand aiming at "the top of the timeline" lands. +/// the seam tells a hand nothing. The bench's band ([`BENCH_GRAB_H`]) is every +/// other seam's reach: the section head under it is gone (cleanse round 2) and +/// the ruler that starts the bench now answers presses itself, so a deeper +/// band would eat scrubs at the film's own top edge. /// /// A double press resets the seam to the window's own share /// ([`Splits::clear`]): the cheap way back from a layout dragged somewhere /// unusable, and the one every editor's dividers answer to. pub(crate) fn divider(split: Split, held: bool, cx: &mut Context) -> Div { let across = matches!(split, Split::Timeline | Split::Bench); - // A row seam parts the picture from a panel whose own first row is its - // section head -- empty land -- so the bench's band reaches down through - // it ([`BENCH_GRAB_H`]). Every other seam keeps [`GRAB_W`]: the dock's - // neighbour is a list whose rows start at its very edge, and the legacy - // timeline's is the edit toolbar's buttons. + // Named per seam anyway ([`BENCH_GRAB_H`] is [`GRAB_W`] since the bench + // lost its section head): every neighbour's first row carries content the + // hand may want instead -- the bench's ruler scrubs, the dock's rows start + // at its very edge, the legacy timeline's are the edit toolbar's buttons. let grab = match split { Split::Bench => BENCH_GRAB_H, _ => GRAB_W, diff --git a/crates/app/src/tests/layout.rs b/crates/app/src/tests/layout.rs index 97be38b..20cbff6 100644 --- a/crates/app/src/tests/layout.rs +++ b/crates/app/src/tests/layout.rs @@ -3188,6 +3188,49 @@ fn select_all_left_the_ruler_for_the_rulers_own_menu() { ); } +/// The rest of cleanse round 2's bench + ledger, which is all about *one* +/// saying per thing: the head is a dot and a name (its verbs left, checked +/// above), a source's name is drawn once per source -- the audio half of a +/// linked insert has no plate, because the picture plate directly above it +/// and the shared dot already say whose it is -- names lose their extension +/// through one helper, and the ledger's state word is Save's only door now +/// (the time band's parking-spot ghost, filed there because the ledger was a +/// concurrent builder's file, is deleted). +#[test] +fn one_name_per_source_one_stem_helper_and_one_save_door() { + let bench = src_text("ui/bench_stance.rs"); + assert!( + bench.contains(".filter(|_| !(audio && clip.link.is_some()))"), + "the audio half of a linked insert wears a second name plate again" + ); + assert!( + bench.contains("stem(&s.path)") && !bench.contains("file_name(&s.path)"), + "a name plate shows the file's extension again" + ); + let stance = src_text("ui/stance.rs"); + assert!( + stance.contains("stem(&player.project_path)"), + "the ledger shows the project's extension again" + ); + assert!( + stance.contains(r#"room_ghost(player, "unsaved", ActionId::Save"#), + "the ledger's unsaved state is not Save's door -- it is a word again" + ); + assert!( + !src_text("ui/timeband_stance.rs").contains("ActionId::Save"), + "Save has two doors: the ledger's state word and the time band's ghost" + ); + // The helper itself, since three surfaces read one file's name through + // it: a plain name loses its extension, a name with none is itself, and + // a path with no name at all still reads as something. + use crate::files::{file_name, stem}; + use std::path::Path; + assert_eq!(stem(Path::new("/x/he_is_not_the_only_one.mp4")), "he_is_not_the_only_one"); + assert_eq!(stem(Path::new("/x/untitled")), "untitled"); + assert_eq!(stem(Path::new("/x/a.b.edith")), "a.b"); + assert_eq!(stem(Path::new("/")), file_name(Path::new("/"))); +} + /// DESIGN §4/§5: the hero timecode leads the time band and the ledger carries /// position. The ruler's left plate was a third resting copy of the same /// reading -- it stays only for the state change it belongs to, a live scrub. diff --git a/crates/app/src/ui/stance.rs b/crates/app/src/ui/stance.rs index 63107a0..7676f6a 100644 --- a/crates/app/src/ui/stance.rs +++ b/crates/app/src/ui/stance.rs @@ -767,7 +767,8 @@ fn ledger(player: &Player, position: f64, cx: &mut Context) -> impl Into .child(identity), ) // Saved is a state and reads as one; unsaved is a thing to *do*, and - // this is Save's home now that the time band no longer carries it + // this is Save's home; the time band's parking-spot ghost, filed there only + // because the ledger was a concurrent builder's file, is deleted // (cleanse round 2) -- the same room-verb ghost the four verbs at the // strip's other end are built from, so its chord, its hover plate and // its hitmap door all come from one place. diff --git a/crates/app/src/ui/timeband_stance.rs b/crates/app/src/ui/timeband_stance.rs index d8d9595..682f897 100644 --- a/crates/app/src/ui/timeband_stance.rs +++ b/crates/app/src/ui/timeband_stance.rs @@ -906,50 +906,6 @@ pub(crate) fn render( .when(layers.marks, |el| el.child(range_marks(player, cx))) .child(cut_readout(player, position)) .child(contact_strip(player, position, cx)) - .child(save_verb(player, cx)) .child(export_chip(player, cx)) } -/// `Save` (homeless per this task's audit): not boxed -- DESIGN §4 reserves -/// the room's one border for the commit-class Export beside it -- but filed -/// right next to it anyway. `keymap.rs`'s own `Category::File` already -/// files Save beside Export and Screenshot on the strength of what each one -/// writes, and the ledger this task named as Save's natural home -/// (`name.edith · saved`/`unsaved`) lives in `stance.rs`, a concurrent -/// builder's file this task does not touch -- so the verb lands here -/// instead, a ghost sharing the export chip's own end-of-band land rather -/// than competing with the ledger strip below it for the same state. -fn save_verb(player: &Player, cx: &mut Context) -> impl IntoElement { - let label_style = label(type_scale::LABEL_ROW_PX, FontWeight::MEDIUM); - let chord_style = mono(type_scale::CHORD_METADATA_MIN_PX, FontWeight::MEDIUM); - div() - .id("stance-tb-save") - .flex_none() - .flex() - .items_center() - .gap(px(4.)) - .cursor_pointer() - .hover(|s| s.text_color(rgb(INK1()))) - .text_color(rgb(INK2())) - .on_click(cx.listener(|this, _: &ClickEvent, window, cx| { - this.act(ActionId::Save, window, cx); - })) - .tooltip(crate::ui::widgets::action_hover(player, ActionId::Save)) - .children(hitmap::action( - ActionId::Save, - player.enable(ActionId::Save, None).yes(), - )) - .child( - div() - .font(label_style.font) - .text_size(label_style.size) - .child("Save"), - ) - .child( - div() - .font(chord_style.font) - .text_size(chord_style.size) - .text_color(rgb(INK3())) - .child(player.keymap.chord(ActionId::Save)), - ) -}