From 8a685418146e1e049d0154ef476fd08485c8510f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 9 Sep 2026 22:56:21 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20remove(app):=20the=20spine=20?= =?UTF-8?q?=E2=80=94=20a=20verb's=20geography=20is=20the=20thing=20it=20ac?= =?UTF-8?q?ts=20on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User decision 2026-09-09, "option C": nothing on screen. The 56px rail and `ui/spine_stance.rs` are deleted; the room root is centre | dock and the picture, time band, bench and ledger take the width. Every verb is now its key, a right-click on the thing it acts on, or a hover plate — the KEYS tab is the one list left. The four verbs that act on the ROOM have no thing to be right-clicked on, so they sit at the ledger's right end before the position, each wearing its chord off the keymap and its hover plate off the shared tooltip helper: `CC t · settings ^, · keys ? · full f11`. `CC` reads ink1 + fill while subtitles are shown, the state the rail's glyph carried; `keys ?` wears no second `?`, the same rule. Persisted layout is untouched: `split_bounds`/`split_size` measure the dock from the window's right edge and the bench from its height — no formula ever offset by the rail. DESIGN.md §3/§4/§5/§9/§12 rewritten in the same diff. The eighteen actions whose only pointer door was the rail are named with their owning lane in the parity sweep's exemption list, and the sweep now fails on a stale exemption so the debt cannot go quiet (three already-covered entries deleted by it). --- DESIGN.md | 73 ++-- crates/app/src/tests/cards.rs | 12 +- crates/app/src/tests/editing.rs | 14 +- crates/app/src/tests/layout.rs | 262 +++++++++----- crates/app/src/ui/mod.rs | 1 - crates/app/src/ui/spine_stance.rs | 563 ------------------------------ crates/app/src/ui/stance.rs | 149 ++++---- 7 files changed, 328 insertions(+), 746 deletions(-) delete mode 100644 crates/app/src/ui/spine_stance.rs diff --git a/DESIGN.md b/DESIGN.md index 7e1b27c..d3f1794 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -36,7 +36,7 @@ Surfaces (dark-only; no light theme, ever): | Token | Value | Role | |---|---|---| | `canvas` | `#050607` | app ground, bench background | -| `panel` | `#0E1013` | spine, dock, ledger, plates' parent surfaces | +| `panel` | `#0E1013` | dock, ledger, plates' parent surfaces | | `raised` | `#14171B` – `#17191D` | hover fill step, active verb fill | | `hairline` | `#22262B` | 1px separations *within* a panel | | seam | `rgba(0,0,0,.7)` | 1px panel-to-panel boundary | @@ -91,9 +91,9 @@ align. (Export). If a second boxed control ever appears on one surface, one of them is wrong. - **Readouts are plates:** dark (`canvas`-on-`panel`) rectangles carrying mono text. Notices, menus, chips, cues, and tooltips are all the same plate. -- **Every command wears its chord**, everywhere it appears — spine, menus, verbs, the `?` - overlay. Nothing lives only in a menu; nothing lives only on a key. (This kills the - shortcut-sync defect class permanently: the UI *is* the shortcut sheet.) +- **Every command wears its chord**, everywhere it appears — right-click menus, regional verbs, + the ledger's room verbs, the KEYS tab. Nothing lives only in a menu; nothing lives only on a + key. (This kills the shortcut-sync defect class permanently: the UI *is* the shortcut sheet.) - **The most-read element anchors its region** — timecode leads the time band; the film leads the room. - Radii: 0 for lanes/clips/room chrome · 2px plates · 3px verbs/controls · 4–6px floating @@ -105,23 +105,23 @@ align. Fixed geography; nothing moves, nothing occludes the picture: ``` -┌──┬──────────────────────────────┬──────┐ -│ │ SCREEN │ │ -│sp│ (picture — top, never │ dock │ -│in│ occluded) │ Src/ │ -│e │ │ Clip │ -│ ├──────────────────────────────┤ tabs │ -│56│ TIME BAND: timecode → ghost │ │ -│px│ transport → cut readout → │ │ -│ │ contact strip → [Export] │ │ -│ ├──────────────────────────────┤ │ -│ │ BENCH (lanes V/A/S) │ │ -│ ├──────────────────────────────┤ │ -│ │ LEDGER (project · state) │ │ -└──┴──────────────────────────────┴──────┘ +┌─────────────────────────────────┬──────┐ +│ SCREEN │ │ +│ (picture — top, never │ dock │ +│ occluded) │ Src/ │ +│ │ Clip │ +├─────────────────────────────────┤ KEYS │ +│ TIME BAND: timecode → ghost │ tabs │ +│ transport → cut readout → │ │ +│ contact strip → [Export] │ │ +├─────────────────────────────────┤ │ +│ BENCH (lanes V/A/S) │ │ +├─────────────────────────────────┤ │ +│ LEDGER (project · state · room │ │ +│ verbs · position) │ │ +└─────────────────────────────────┴──────┘ ``` -- **Spine** (56px, left): every command as ghost glyph + chord, grouped by task frequency. - **Screen**: the picture. Never covered — not by drawers, notices, drags, or menus. Two-up OUT|IN judging renders *in* the screen at rest on a cut. - **Time band**: timecode leads; ghost transport; cut readout (`14/37`); the **contact strip** @@ -129,10 +129,22 @@ Fixed geography; nothing moves, nothing occludes the picture: jumps, drag pans); boxed **Export** at the end. - **Bench**: lanes. Clip anatomy = ink spine (3px left edge) + real thumbnails/waveform in the source's ink + name plate + splice gaps in lamp white. -- **Ledger**: project identity (`name.edith · saved`), last action, export progress, position. - State lives here, notices rise from here. -- **Dock** (right, the only side panel): Sources tab (assembly: filter, usage chips, import) and - Clip tab (verbs: Speed / Colour / Transform / EQ as ghost verbs over param rows). +- **Ledger**: project identity (`name.edith · saved`), last action, export progress, and at the + right end, before the position: the **room verbs** as ghosts (`CC t · settings ^, · keys ? · + full f11`) — the four commands that act on the room itself and so have no thing under the + cursor to be right-clicked on. `ink3` + chord, hover raises to `ink2` with the room's own + plate, `CC` reads `ink1` + fill while subtitles are shown. State lives here, notices rise + from here. +- **Dock** (right, the only side panel): Sources tab (assembly: filter, usage chips, import), + Clip tab (verbs: Speed / Colour / Transform / EQ as ghost verbs over param rows) and KEYS tab. + +**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, +bench and ledger take its width. Nothing on screen lists the room's commands, because **the +geography of a verb is the thing it acts on**: a verb reaches its target by right-click on that +target, by its key, and says its own name through the hover plate under the pointer. The one +list left is the dock's **KEYS** tab (§9), and the one exception is the ledger's room verbs +above — those four act on the room, which is not a thing the cursor can be over. Session continuity: a room reopens exactly as left — playhead, subject cut, viewport, dock tab. @@ -235,10 +247,15 @@ string over ~4 words that instructs rather than reports state is a defect. room would refuse right now greys to `ink4` like any refused verb (§8) rather than vanishing. `?` swings the dock to that tab and a second `?` (or `escape`, or a press on another tab) swings it back — a toggle, not a hold and not a modal: nothing about the KEYS tab owns the - keyboard, so the film keeps playing and every other stroke keeps meaning what the spine says it - means. The spine's `?` glyph wears no chord badge, because its chord *is* its glyph. The - ceiling above is unchanged: the 56 homeless actions still owe a geographic home, and this tab - is what they read from until they get one. + keyboard, so the film keeps playing and every other stroke keeps meaning what the keymap says + it means. The ledger's `keys ?` ghost is the tab's pointer door and wears no second `?`, + because its chord *is* its own name — the rule the deleted rail's last glyph was given. + + **Amendment (2026-09-09), user decision "option C":** the rail the fifteen chord-wearing + glyphs stood on is deleted (§5). The ceiling above is unchanged in *count* but changes in + *shape*: a homeless action's geographic home is now the right-click menu of the thing it acts + on, its key, and the hover plate — not a widget parked on a rail. The KEYS tab is what every + action still reads from. ## 10. The joy layer @@ -281,7 +298,7 @@ If a feature fails the checklist, either the feature changes or this document do 1. Token substrate in `crates/app/src/ui/theme.rs` (extend the 34-role system; keep the `no_colour_is_written_outside_the_theme` guard green). -2. The stance behind a flag (spine / screen / time band / bench / ledger / dock skeleton). +2. The stance behind a flag (screen / time band / bench / ledger / dock skeleton). 3. Cut machinery (`,` `.` `[` `]` `/`, two-up, readout) — before cosmetics. 4. Dock (Sources assembly + Clip verbs). 5. Ink extraction + grading pipeline; source dots; selection ink. diff --git a/crates/app/src/tests/cards.rs b/crates/app/src/tests/cards.rs index 0c402f9..2edac27 100644 --- a/crates/app/src/tests/cards.rs +++ b/crates/app/src/tests/cards.rs @@ -1850,7 +1850,7 @@ fn maximizing_a_card_grows_its_box_without_moving_where_a_value_sits_in_it() { /// room each mount site is fed after the fix: [`dock_stance`]'s un-maximized /// mount is handed the dock's own real width (not the window's, the "480 in /// 280" shape of the width-clip bug), and a maximized card is handed -/// `stance-centre`'s width -- the window minus the spine and the dock it +/// `stance-centre`'s width -- the window minus the dock it /// escaped -- which must come out *larger*, not smaller, than the docked /// room it replaces. A future change that re-nests the maximize mount back /// inside the dock, or hands it the dock's width again, fails this. @@ -1859,11 +1859,9 @@ fn a_maximized_cards_room_is_bigger_than_the_docked_rooms_not_smaller() { use crate::SPLIT_W; use crate::layout::{Split, split_size}; - // Mirrors `ui/stance.rs`'s private `SPINE_W` (56.) and `layout::SPLIT_W` - // (the one divider between `stance-centre` and the dock): recomputed - // rather than imported, same as this test file's other private-constant - // checks, so a change to either number is felt here too. - const SPINE_W: f32 = 56.; + // `layout::SPLIT_W` is the one divider between `stance-centre` and the + // dock; the 56px rail that used to eat the centre's left edge is gone + // (2026-09-09, "option C"), so the centre is everything but the dock. for window_w in [960., 1280., 1920.] { let window = size(px(window_w), px(720.)); @@ -1872,7 +1870,7 @@ fn a_maximized_cards_room_is_bigger_than_the_docked_rooms_not_smaller() { // now feeds its un-maximized cards as their "room". let dock_w = split_size(Split::Dock, None, 2, window, false); let docked_room_w = dock_w; - let maximized_room_w = window_w - SPINE_W - SPLIT_W - dock_w; + let maximized_room_w = window_w - SPLIT_W - dock_w; assert!( maximized_room_w > docked_room_w, diff --git a/crates/app/src/tests/editing.rs b/crates/app/src/tests/editing.rs index d0cc8f0..14af5bb 100644 --- a/crates/app/src/tests/editing.rs +++ b/crates/app/src/tests/editing.rs @@ -1307,10 +1307,16 @@ fn every_action_is_reachable_without_the_keyboard() { "{action:?} is reachable by keyboard only" ); } - // The snap has a door of its own as well as its row on the card: the - // button beside the zoom, which says which way it is set as well as - // setting it. - assert!(element("snap"), "no snap button beside the zoom"); + // The snap's own door was the rail's `⌗` glyph, and the rail is deleted + // (DESIGN §5 as amended 2026-09-09, user decision "option C"). Its + // replacement -- a right-click row on the ruler it snaps against -- is + // LANE R2's parity work, so the assertion is inverted rather than + // dropped: it names the owner and fails the moment that door lands, at + // which point this goes back to `assert!(element("snap"), ...)`. + assert!( + !element("snap"), + "LANE R2 landed a snap door -- restore this to assert!(element(\"snap\"))" + ); // And the card is a door the pointer can open: the panel's own button. assert!(element("keys"), "no way to open the actions card"); // The card-local strokes have the same rule, and each of them is a thing diff --git a/crates/app/src/tests/layout.rs b/crates/app/src/tests/layout.rs index 8b51057..3ba334c 100644 --- a/crates/app/src/tests/layout.rs +++ b/crates/app/src/tests/layout.rs @@ -1212,7 +1212,7 @@ fn the_subtitles_toggle_says_what_is_placed_and_never_the_picked_row() { /// The door this editor answers "don't make me import the film again" with, /// and it is in the dock's IMPORT section beside the other two imports -/// (`ui/dock_stance.rs`'s own doc comment: it moved off the spine's crowded +/// (`ui/dock_stance.rs`'s own doc comment: it moved off the old rail's crowded /// TRACK group here): reads a file's subtitle tracks onto the open timeline /// -- a release's `.mkv`, an `.srt` beside it -- while the file itself /// joins nothing. It is the *action* and not a second implementation of it, @@ -2030,14 +2030,15 @@ fn every_seam_in_the_layout_has_a_divider_on_it() { ); } -/// DESIGN.md §12 step 2: the stance skeleton draws its six regions -- spine, -/// screen, time band, bench, ledger, dock -- in the order §5's diagram lays -/// them out, and `Player::render` actually reaches it when the flag is on. +/// DESIGN.md §12 step 2 as amended 2026-09-09 (user decision "option C"): +/// the stance skeleton draws its five regions -- screen, time band, bench, +/// ledger, dock -- in the order §5's diagram lays them out, and +/// `Player::render` actually reaches it when the flag is on. The sixth, the +/// 56px rail, is deleted -- the room root is centre | dock. #[test] -fn the_stance_renders_its_six_regions_in_the_documented_order() { +fn the_stance_renders_its_five_regions_in_the_documented_order() { let stance = src_text("ui/stance.rs"); let order = [ - "stance-spine", "stance-screen", "stance-time-band", "stance-bench", @@ -2054,7 +2055,7 @@ fn the_stance_renders_its_six_regions_in_the_documented_order() { .collect(); assert!( defined.windows(2).all(|w| w[0] < w[1]), - "the six regions are not defined in DESIGN §5's order: {defined:?}" + "the five regions are not defined in DESIGN §5's order: {defined:?}" ); // Defined in order is not composed in order -- `render()` has to call @@ -2066,7 +2067,6 @@ fn the_stance_renders_its_six_regions_in_the_documented_order() { // regions player/window state to read, so their call sites carry // arguments now. Order is what this asserts, not arity. let calls = [ - "spine(", "screen(", "time_band(", "bench(", @@ -2424,7 +2424,7 @@ fn hdr_reference_rows_read_content_light_and_use_the_established_empty_state() { /// The parity class this user has reported four separate times: "some /// options are only reachable via keyboard shortcut". A source scan (this /// binary has no `TestAppContext` to click through) over every darkroom -/// surface -- the spine, the dock, the bench/timeband transport, the +/// surface -- the dock, the bench/timeband transport, the /// settings page, the maximized cards and the clip context menu /// (`menus.rs`'s `MENU_ITEMS`, rendered mouse-and-chord-visible by /// `overlays.rs`) -- for a literal `ActionId::` mention. An @@ -2447,16 +2447,7 @@ fn hdr_reference_rows_read_content_light_and_use_the_established_empty_state() { fn every_action_has_a_darkroom_widget_home_or_explicit_owner() { use crate::ActionId; const EXPLICITLY_OWNED_ELSEWHERE: &[(ActionId, &str)] = &[ - ( - ActionId::RemoveVideoLane, - "lane-header remove parity owns video-lane controls", - ), - ( - ActionId::RemoveAudioLane, - "lane-header remove parity owns audio-lane controls", - ), (ActionId::Crossfade, "fade parity owns crossfade controls"), - (ActionId::Dissolve, "fade parity owns dissolve controls"), ( ActionId::FocusPanels, "keyboard-only by design: a mouse already focuses whatever it \ @@ -2480,6 +2471,112 @@ fn every_action_has_a_darkroom_widget_home_or_explicit_owner() { accelerator for cycling that existing selection, not a new door -- legacy had no \ toolbar button for it either", ), + // The rail's own eighteen. Deleting the spine (DESIGN §5 as amended + // 2026-09-09, user decision "option C") took the only pointer door + // each of these had; LANE R2's right-click parity is what gives them + // a new one, on the thing each acts on. The staleness check below + // deletes the exemption the moment that lands, so this cannot become + // a permanent hole. + ( + ActionId::Undo, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::Redo, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::WalkCutPrev, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::WalkCutNext, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::WalkCutNext10, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::WalkCutPrev10, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::TrimIn, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::TrimOut, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::TrimInToPlayhead, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::TrimOutToPlayhead, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::LoopTrim, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::ZoomIn, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::ZoomOut, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::ZoomFit, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::ToggleSnap, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::AddVideoLane, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::AddAudioLane, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::AddSubtitleLane, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::RemoveSubtitleLane, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), + ( + ActionId::Screenshot, + "the 56px rail these stood on is deleted (DESIGN §5, 2026-09-09, user \"option C\"); \ + LANE R2 owns the right-click row on the thing each acts on", + ), ]; let darkroom = [ "ui/bench_stance.rs", @@ -2487,7 +2584,6 @@ fn every_action_has_a_darkroom_widget_home_or_explicit_owner() { "ui/dock_stance.rs", "ui/overlays.rs", "ui/settings_stance.rs", - "ui/spine_stance.rs", "ui/stance.rs", "ui/timeband_stance.rs", "menus.rs", @@ -2500,6 +2596,14 @@ fn every_action_has_a_darkroom_widget_home_or_explicit_owner() { .find(|(owned, _)| *owned == action) { assert!(!owner.is_empty(), "ActionId::{action:?} needs an owner"); + // An exemption is a debt, not a licence: once the owning lane + // has mounted the action, the entry has to go, or the sweep + // goes blind on an action that is covered. + assert!( + !darkroom.contains(&format!("ActionId::{action:?}")), + "ActionId::{action:?} has a darkroom home now -- delete its \ + EXPLICITLY_OWNED_ELSEWHERE entry ({owner})" + ); continue; } let name = format!("{action:?}"); @@ -2654,8 +2758,8 @@ fn hitmap_names_every_darkroom_pointer_entry_surface() { /// An external file drag (gpui `ExternalPaths`, Wayland `text/uri-list`) has /// to be heard over the DOCK -- the Sources/library panel -- and not only -/// over the centre column: the dock and the spine are the centre's flex -/// siblings, so the handler `stance-centre` used to carry covered none of +/// over the centre column: the dock is the centre's flex sibling, so the +/// handler `stance-centre` used to carry covered none of /// the library panel, which is exactly the shipped "drag and drop file /// import is not working on library panel" defect. The listener therefore /// belongs to the room root (`stance-room`), above every region, and it must @@ -2953,63 +3057,6 @@ fn a_dock_ring_never_moves_what_it_rings() { ); } -/// The spine is 56px and every pair must fit inside it. Measured at -/// 1280x720 the full-size halves did not: hitmap `action.WalkCutPrev10 -/// x=-5 w=31`, `action.AddVideoLane x=-2 w=28` -- the `‹10` glyph was cut -/// at the window's own left edge. Fixed by subtraction (13px + 1px padding -/// for the paired halves, 3px row gap), so this scan is what keeps a new -/// pair from being written at the full row size again. -#[test] -fn every_paired_spine_glyph_is_drawn_at_the_narrow_size() { - let src = src_text("ui/spine_stance.rs"); - // Inside every `pair(...)` call, both halves come from `small`. - let mut rest = src.as_str(); - let mut pairs = 0; - while let Some(at) = rest.find("pair(") { - let after = &rest[at..]; - // The definition and the doc comments are not call sites. - if rest[..at].ends_with("fn ") || rest[..at].ends_with('`') { - rest = &after[5..]; - continue; - } - let mut depth = 0i32; - let mut end = after.len(); - for (i, c) in after.char_indices() { - match c { - '(' => depth += 1, - ')' => { - depth -= 1; - if depth == 0 { - end = i; - break; - } - } - _ => {} - } - } - let body = &after[..end]; - assert!( - !body.contains("glyph("), - "a spine pair draws a full-size glyph, which lays out past the \ - 56px rail: {}", - &body[..body.len().min(120)] - ); - pairs += 1; - rest = &after[end..]; - } - assert!(pairs >= 8, "the spine's pairs went missing ({pairs} found)"); - // And `small` is the narrow one: one step down the §3 scale, 1px sides. - assert!( - src.contains("type_scale::CHORD_METADATA_MIN_PX") - && src.contains("let pad = if paired { 1. } else { 3. };"), - "the paired size/padding subtraction is gone from spine_stance" - ); - assert!( - src.contains(".gap(px(3.))\n .child(left)"), - "the pair row's own gap grew again" - ); -} - /// DESIGN §9 as amended 2026-09-09: the keys list is the dock's third tab, /// not a plate over the bench. The overlay the user asked about ("clicking /// them opens a menu ... probably location problem") is gone with its scrim, @@ -3054,14 +3101,59 @@ fn the_keys_list_is_a_dock_tab_and_the_plate_is_gone() { ); } -/// The user's screenshot: the spine ended with `?` over `?`. A ghost whose -/// primary chord IS its glyph wears no badge; every other one still does. +/// The user's screenshot: the old rail ended with `?` over `?`. The rule +/// outlived the rail -- a ledger room ghost whose primary chord IS its own +/// name wears no badge; every other one still does. +#[test] +fn a_room_ghost_wears_no_chord_that_repeats_its_name() { + let src = src_text("ui/stance.rs"); + assert!( + src.contains(".when(player.keymap.chord(action) != name, |el| {"), + "a room ghost draws its chord badge even when the badge repeats its name" + ); +} + +/// DESIGN §5 as amended 2026-09-09 (user decision "option C"): there is no +/// rail. The room root is centre | dock, `spine_stance` is deleted, and the +/// four verbs that act on the ROOM -- the only ones with no thing under the +/// cursor to be right-clicked -- live at the ledger's right end, each +/// wearing its chord, `CC` carrying the shown/hidden state the rail's glyph +/// used to. #[test] -fn the_spine_question_mark_wears_no_second_question_mark() { +fn the_ledger_carries_the_rooms_four_verbs_and_no_rail_remains() { let src = src_text("ui/stance.rs"); + for gone in ["stance-spine", "spine_stance", "SPINE_W", "fn spine("] { + assert!(!src.contains(gone), "the rail is still in the stance: {gone}"); + } + let ledger = &src[src.find("fn ledger(").expect("the ledger strip") + ..src.find("/// The dock:").expect("the dock frame")]; + for (name, action) in [ + ("CC", "ActionId::ToggleSubtitles"), + ("settings", "ActionId::Settings"), + ("keys", "ActionId::ShowActions"), + ("full", "ActionId::Fullscreen"), + ] { + assert!( + ledger.contains(&format!("\"{name}\",")) && ledger.contains(action), + "the ledger lost its {name} room verb" + ); + } + // Before the position timecode, which stays the strip's last word. + assert!( + ledger.find("room_ghost(").expect("a room verb") + < ledger.find(".child(tc),").expect("the position"), + "the room verbs drew after the position timecode" + ); + // Each wears its chord, live off the keymap (DESIGN §4), and `CC` reads + // active while subtitles are shown. + let ghost = &src[src.find("fn room_ghost(").expect("the room ghost")..]; + assert!( + ghost.contains("player.keymap.chord(action)") && ghost.contains("widgets::action_hover"), + "a room verb lost its live chord or its hover plate" + ); assert!( - src.contains(".when(player.keymap.chord(action) != glyph, |el| {"), - "the spine ghost draws its chord badge even when the badge repeats the glyph" + ledger.contains("player.subs_on"), + "`CC` no longer shows whether subtitles are shown" ); } @@ -3173,7 +3265,9 @@ fn the_time_band_never_paints_outside_its_own_column() { /// rung, and the sheddable groups go in a fixed order (chords, then the /// monitoring cluster, then sync/loop, then the range marks), never all at /// once. Thresholds are the measured group widths; this pins their order and -/// the 1280x720 column (939px measured, spine 56 + dock 285) landing on the +/// the 1280x720 column (939px measured when a 56px rail still stood left of +/// it; the rail is gone since 2026-09-09, so the same window measures ~989px) +/// landing on the /// marks-only rung, which is what makes Export fit there (it ended at x=991 /// inside a column ending at 995, against x=1113 under the dock before). #[test] diff --git a/crates/app/src/ui/mod.rs b/crates/app/src/ui/mod.rs index ae75f1d..98a54cd 100644 --- a/crates/app/src/ui/mod.rs +++ b/crates/app/src/ui/mod.rs @@ -11,7 +11,6 @@ pub mod library; pub mod overlays; pub mod preview; pub mod settings_stance; -pub mod spine_stance; pub mod stance; pub mod theme; pub mod timeband_stance; diff --git a/crates/app/src/ui/spine_stance.rs b/crates/app/src/ui/spine_stance.rs deleted file mode 100644 index 83fc56c..0000000 --- a/crates/app/src/ui/spine_stance.rs +++ /dev/null @@ -1,563 +0,0 @@ -//! The spine's own content (DESIGN.md §5, MOCK-SPEC.md "Spine"): grouped -//! task-frequency clusters, each row a glyph stacked over its own chord -- -//! not the flat ungrouped list of glyph-beside-chord rows the shipped room -//! drew. `stance.rs::spine()` keeps the panel frame (width, surface, -//! border); this module owns the rows inside it. - -use crate::ui::hitmap; -use crate::ui::type_scale::{self, Typeset}; -use crate::*; - -/// The glyph icon is a room verb, so it uses the label role rather than a -/// bespoke size: Archivo at `LABEL_ROW_PX`. - -/// A group head: uppercase Archivo 700 in `ink3`, +0.14em tracking -/// (DESIGN §3) -- reused as its own small fn rather than `stance::section_head` -/// because that one is private to its module and carries a different -/// vertical rhythm (a region label, not a spine group head). -fn group_head(label: &str) -> impl IntoElement { - div() - .flex_none() - .pt(px(6.)) - .line_height(relative(1.1)) - .type_style(type_scale::head()) - .text_color(rgb(INK3())) - .child(label.to_uppercase()) -} - -/// One command: glyph over its chord, centred (MOCK-SPEC.md "Spine" -- -/// "Not glyph-beside-chord on one line"). The chord is read live off -/// [`Keymap::display`], never a literal, so a rebind can never leave the -/// spine showing a stroke that no longer fires it. Ghost grammar (DESIGN -/// §4): borderless, hover is one fill step, active is `ink1` + fill, and a -/// refused verb greys with its reason on hover rather than disappearing -/// (DESIGN §8) -- the same oracle door `dock_stance::ghost_verb` opens. -/// `quiet` demotes a row a whole ink step (DESIGN §2's ink-demotion rule, -/// applied per this task's charter to the once-a-session/once-a-project -/// acts -- theme, proxies, screenshot, fullscreen -- rather than to a -/// re-inking gesture): glyph reads `ink3` instead of `ink2`, its chord -/// `ink4` instead of `ink3`, so the ROOM group sits visibly quieter than -/// the burst-use groups above it without a second widget shape. -fn glyph( - id: &'static str, - glyph: &'static str, - action: ActionId, - active: bool, - quiet: bool, - player: &Player, - cx: &mut Context, -) -> impl IntoElement + use<> { - glyph_sized(false, id, glyph, action, active, quiet, player, cx) -} - -/// The paired half of [`glyph`]: same control, one step down the §3 scale -/// (13px, the chord size) and 1px of side padding instead of 3. Two -/// full-size halves plus their padding measured 66px against a 56px rail -/// and laid out at negative x -- `‹10` was cut at the window's own left -/// edge (hitmap `action.WalkCutPrev10 x=-5 w=31`). Subtraction, not a wider -/// spine: the pair now fits inside the column with room on both sides. -fn small( - id: &'static str, - glyph: &'static str, - action: ActionId, - active: bool, - quiet: bool, - player: &Player, - cx: &mut Context, -) -> impl IntoElement + use<> { - glyph_sized(true, id, glyph, action, active, quiet, player, cx) -} - -#[allow(clippy::too_many_arguments)] -fn glyph_sized( - paired: bool, - id: &'static str, - glyph: &'static str, - action: ActionId, - active: bool, - quiet: bool, - player: &Player, - cx: &mut Context, -) -> impl IntoElement + use<> { - let size = if paired { - type_scale::CHORD_METADATA_MIN_PX - } else { - type_scale::LABEL_ROW_PX - }; - let pad = if paired { 1. } else { 3. }; - let enabled = player.enable(action, None); - // The badge shows the primary chord only (FAULT 1: a chord badge is a - // compact token, not a sentence); the tooltip keeps every stroke an - // action answers to, and the keys overlay ([`crate::ui::stance`]) is - // still where the full truth lives. - let full = player.keymap.display(action); - // The room's one hover shape (`widgets::tip_line`): the name first, then - // the strokes -- `display`'s every stroke here rather than the compact - // badge, since the spine's glyph is already showing the compact one. - let say = crate::ui::widgets::tip_line(action.label(), &full, enabled.why()); - let compact = player.keymap.chord(action); - let on = enabled.yes(); - div() - .id(id) - .flex_none() - .flex() - .flex_col() - .items_center() - .gap(px(1.)) - .px(px(pad)) - .py(px(1.)) - .rounded(px(3.)) - .when(active, |d| d.bg(rgb(DARK_RAISED()))) - .tooltip(move |_, cx| cx.new(|_| Tip(say.clone())).into()) - .when(!on, |d| d.opacity(0.4).cursor_not_allowed()) - .when(on, |d| { - d.cursor_pointer() - .hover(|s| s.bg(rgb(DARK_RAISED())).text_color(rgb(INK1()))) - .on_click( - cx.listener(move |this, _: &ClickEvent, window, cx| { - this.act(action, window, cx) - }), - ) - }) - .children(hitmap::action(action, on)) - .child( - div() - .line_height(relative(1.05)) - // FAULT 1: the glyph is the loudest thing in its row -- BOLD, - // not the MEDIUM weight the chord beneath it also wears. - .type_style(type_scale::label(size, gpui::FontWeight::BOLD)) - .text_color(rgb(if active { - INK1() - } else if quiet { - INK3() - } else { - INK2() - })) - .child(glyph), - ) - .child( - div() - .line_height(relative(1.05)) - .type_style(type_scale::mono( - type_scale::CHORD_METADATA_MIN_PX, - gpui::FontWeight::MEDIUM, - )) - .text_color(rgb(if quiet { INK4() } else { INK3() })) - .child(compact), - ) -} - -/// The trim control (MOCK-SPEC "Spine"): one row read as ONE control with -/// two strokes, not two identical `±1` boxes each carrying its own `[`/`]` -/// chord underneath (the shipped defect this replaces). `−1`/`+1` distinguish -/// the two strokes visually where a doubled `±1` couldn't; the chord line -/// beneath is shared and shows both strokes together (`[ ]`), the way the -/// mock's single `±1` / `[ ]` pair reads as one thing, not two. -fn trim_control(active: bool, player: &Player, cx: &mut Context) -> impl IntoElement { - let half = |id: &'static str, txt: &'static str, action: ActionId, cx: &mut Context| { - let enabled = player.enable(action, None); - let full = player.keymap.display(action); - let say = crate::ui::widgets::tip_line(action.label(), &full, enabled.why()); - let on = enabled.yes(); - div() - .id(id) - .flex_none() - .px(px(1.)) - .rounded(px(3.)) - .tooltip(move |_, cx| cx.new(|_| Tip(say.clone())).into()) - .when(!on, |d| d.opacity(0.4).cursor_not_allowed()) - .when(on, |d| { - d.cursor_pointer() - .hover(|s| s.bg(rgb(DARK_RAISED())).text_color(rgb(INK1()))) - .on_click(cx.listener(move |this, _: &ClickEvent, window, cx| { - this.act(action, window, cx) - })) - }) - .children(hitmap::action(action, on)) - .child( - div() - .line_height(relative(1.05)) - // Paired, so the same step down the scale `small` takes. - .type_style(type_scale::label( - type_scale::CHORD_METADATA_MIN_PX, - gpui::FontWeight::BOLD, - )) - .text_color(rgb(if active { INK1() } else { INK2() })) - .child(txt), - ) - }; - div() - .flex_none() - .flex() - .flex_col() - .items_center() - .gap(px(1.)) - .px(px(3.)) - .py(px(1.)) - .rounded(px(3.)) - .when(active, |d| d.bg(rgb(DARK_RAISED()))) - .child( - div() - .flex() - .items_center() - .gap(px(2.)) - .child(half("spine-trim-in", "−1", ActionId::TrimIn, cx)) - .child(half("spine-trim-out", "+1", ActionId::TrimOut, cx)), - ) - .child( - div() - .line_height(relative(1.05)) - .type_style(type_scale::mono( - type_scale::CHORD_METADATA_MIN_PX, - gpui::FontWeight::MEDIUM, - )) - .text_color(rgb(INK3())) - .child("[ ]"), - ) -} - -/// A compact section: always visible (hide-until-hover for controls is a -/// rejected pattern -- user 2026-08-27, "simplify it not hide the things"; -/// see DESIGN.md §8). Rare-cadence groups (CUT's tail, VIEW, TRACK, ROOM) -/// stay on the rail permanently, just tighter (smaller row gap, no extra -/// group head where they're the tail of one already named above them) so -/// they read quieter than EDIT/CUT's every-cut rows without disappearing. -fn compact_group(id: &'static str, rows: T) -> impl IntoElement + use { - div() - .id(id) - .flex_none() - .w_full() - .flex() - .flex_col() - .items_center() - .gap(px(1.)) - .child(rows) -} - -/// Two commands side by side in one row -- the opposite-direction pairs -/// (walk cuts, no-aim trim) that share a row in the mock rather than each -/// eating a full row of the spine's own height. -fn pair(left: impl IntoElement, right: impl IntoElement) -> impl IntoElement { - div() - .flex_none() - .flex() - .w_full() - .items_center() - .justify_center() - // 3px, and both halves come from `small` (13px, 1px padding): two - // full-size halves plus 4px measured 66px against the 56px rail and - // laid out at negative x (hitmap `action.AddVideoLane x=-2 w=28`). - .gap(px(3.)) - .child(left) - .child(right) -} - -/// The spine's rows, grouped by task frequency (DESIGN §5, §11 check 1): -/// EDIT (split, delete, undo -- every edit), CUT (walk/trim/loop-trim -- -/// every cut), TRACK (add a lane -- once per project, cheapest land at the -/// bottom of the frequent group). `?` stays on `stance::spine`'s own frame, -/// not duplicated here. -/// -/// Gap, named rather than shipped as a dead control: the mock's LEAN row -/// (`⊡` / `\`, "lean/zen mode") has no [`ActionId`] anywhere in -/// `keymap.rs` -- `Fullscreen` is the nearest existing action but it is a -/// different verb (the platform's own fullscreen, bound to `f11`, not a -/// zen/lean UI mode) so reusing it under the mock's glyph would be exactly -/// the fake-control this task's own instructions forbid. Left out; the -/// group and its bottom anchor do not exist here. -pub(crate) fn render(player: &Player, cx: &mut Context) -> impl IntoElement { - div() - .id("spine-stance-rows") - .flex_1() - .min_h(px(0.)) - .w_full() - .flex() - .flex_col() - .items_center() - // FAULT 1: rows close under their group head, real space (the group - // head's own `pt`) only between one group and the next -- not one - // uniform gap stretching every row down the window. The gap itself - // is now the smallest gpui will draw (1px) rather than the 2px that - // still read as "spread" against the mock's tight top-third rail. - .gap(px(1.)) - .overflow_y_scroll() - .child(group_head("edit")) - .child(glyph( - "spine-split", - "||", - ActionId::Cut, - false, - false, - player, - cx, - )) - .child(glyph( - "spine-delete", - "⊂⊃", - ActionId::Delete, - false, - false, - player, - cx, - )) - .child(pair( - small("spine-undo", "↺", ActionId::Undo, false, false, player, cx), - // Redo had a legacy toolbar button (`toolbar.rs:347`) but no - // darkroom home -- Undo got a glyph here and Redo did not. - // Same row, same door (`this.act`), the pair anatomy the - // cut-prev/cut-next row below already uses. - small("spine-redo", "⟳", ActionId::Redo, false, false, player, cx), - )) - .child(group_head("cut")) - .child(pair( - small( - "spine-cut-prev", - "‹", - ActionId::WalkCutPrev, - false, - false, - player, - cx, - ), - small( - "spine-cut-next", - "›", - ActionId::WalkCutNext, - false, - false, - player, - cx, - ), - )) - // Everything past the walk-cut pair above is CUT's low-frequency - // tail (stride-10 walks, ±1 trim, trim-to-playhead, loop-trim) -- - // always visible (no hover-gating, DESIGN §8/user 2026-08-27), just - // `quiet`-demoted a step so it reads under the burst-use pair above - // it rather than competing with it for weight. - .child(compact_group( - "spine-zone-cut-more", - div() - .flex() - .flex_col() - .items_center() - .gap(px(1.)) - .child(pair( - small( - "spine-cut-prev-ten", - "‹10", - ActionId::WalkCutPrev10, - false, - true, - player, - cx, - ), - small( - "spine-cut-next-ten", - "10›", - ActionId::WalkCutNext10, - false, - true, - player, - cx, - ), - )) - .child(trim_control(player.loop_trim.is_some(), player, cx)) - .child(pair( - // Trim-to-playhead (debt #42): the keyboard's own version - // of the pointer's drag-to-a-spot trim, beside the nudge - // pair it shares its primitive with. - small( - "spine-trim-in-playhead", - "[▮", - ActionId::TrimInToPlayhead, - false, - true, - player, - cx, - ), - small( - "spine-trim-out-playhead", - "▮]", - ActionId::TrimOutToPlayhead, - false, - true, - player, - cx, - ), - )) - .child(glyph( - "spine-loop-trim", - "↻", - ActionId::LoopTrim, - player.loop_trim.is_some(), - true, - player, - cx, - )), - )) - // VIEW group: ZoomIn/ZoomOut/ZoomFit/ToggleSnap all read the - // timeline at a scale rather than cutting it -- real handlers with - // a darkroom home, but well under EDIT/CUT's every-cut cadence - // (DESIGN §6), so it gets its own plain head and `quiet` rows - // rather than a heavier full-size group. - .child(group_head("view")) - .child(compact_group( - "spine-zone-view", - div() - .flex() - .flex_col() - .items_center() - .gap(px(1.)) - .child(pair( - small( - "spine-zoom-out", - "−", - ActionId::ZoomOut, - false, - true, - player, - cx, - ), - small( - "spine-zoom-in", - "+", - ActionId::ZoomIn, - false, - true, - player, - cx, - ), - )) - .child(glyph( - "spine-zoom-fit", - "⊡", - ActionId::ZoomFit, - false, - true, - player, - cx, - )) - // ToggleSnap: decides where a drag lands, which is what the - // eye reads the zoom scale against -- kept beside the zoom - // controls it shares this zone with. Active fill mirrors - // loop-trim's own on/off convention. - .child(glyph( - "snap", - "Sn", - ActionId::ToggleSnap, - player.snap, - true, - player, - cx, - )), - )) - // TRACK: once-per-project lane adds -- own head, `quiet` rows. - .child(group_head("track")) - .child(compact_group( - "spine-zone-track", - div() - .flex() - .flex_col() - .items_center() - .gap(px(1.)) - .child(pair( - small( - "spine-add-video", - "+V", - ActionId::AddVideoLane, - false, - true, - player, - cx, - ), - small( - "spine-add-audio", - "+A", - ActionId::AddAudioLane, - false, - true, - player, - cx, - ), - )) - // The subtitle lane pair: add beside remove, one row, the - // same "+letter"/"−letter" grammar +V/+A above it already - // reads in. Import (`↓S`) left this rail entirely -- it is - // an import, so it lives in the dock's own IMPORT list - // beside "Add files" (`dock_stance`), where an editor - // already goes to bring a file into the room. - .child(pair( - small( - "spine-add-subtitle", - "+S", - ActionId::AddSubtitleLane, - false, - true, - player, - cx, - ), - small( - "spine-remove-subtitle", - "−S", - ActionId::RemoveSubtitleLane, - false, - true, - player, - cx, - ), - )) - .child(glyph( - "spine-toggle-subtitles", - "CC", - ActionId::ToggleSubtitles, - player.subs_on, - true, - player, - cx, - )), - )) - // ROOM: the three acts that are *acts* rather than settings (user - // 2026-08-21: "the spine menu is too crowded"). Theme, proxies and - // auto-proxies stayed off this rail entirely (settings_stance). - // Once-a-session/once-a-project cadence -- own head, `quiet` rows, - // same as VIEW/TRACK above it, always visible. - .child(group_head("room")) - .child(compact_group( - "spine-zone-room", - div() - .flex() - .flex_col() - .items_center() - .gap(px(1.)) - .child(pair( - small( - "spine-settings", - "St", - ActionId::Settings, - player.settings_open, - true, - player, - cx, - ), - small( - "spine-screenshot", - "Sh", - ActionId::Screenshot, - false, - true, - player, - cx, - ), - )) - .child(glyph( - "spine-fullscreen", - "FS", - ActionId::Fullscreen, - false, - true, - player, - cx, - )), - )) - .child(div().flex_1()) -} diff --git a/crates/app/src/ui/stance.rs b/crates/app/src/ui/stance.rs index 6f214ee..4eaa7f7 100644 --- a/crates/app/src/ui/stance.rs +++ b/crates/app/src/ui/stance.rs @@ -12,7 +12,6 @@ use crate::ui::bench_stance; use crate::ui::dock_stance; use crate::ui::hitmap; use crate::ui::settings_stance; -use crate::ui::spine_stance; use crate::ui::timeband_stance; use crate::ui::type_scale::{self, Typeset}; use crate::*; @@ -118,8 +117,6 @@ impl Player { } } -/// Left rail, full height (DESIGN §5). -pub(crate) const SPINE_W: f32 = 56.; /// Fixed strip under the screen: timecode, transport, cut readout, contact /// strip, Export -- all placeholder at this step. Kept `pub(crate)` for /// `layout::split_bounds`'s bench ceiling, the same one-door reason @@ -422,44 +419,47 @@ fn section_head(label: &str) -> impl IntoElement { .child(label.to_uppercase()) } -/// A ghost command (DESIGN §4): borderless glyph (`ink2`) + dim chord -/// (`ink3`), read live off the keymap so a rebind can never leave the spine -/// showing a stroke that no longer fires it. -fn ghost( +/// A room verb at the ledger's right end (DESIGN §4, §5 as amended +/// 2026-09-09 -- user decision "option C"): the name in `ink3`, its chord +/// beside it, read live off the keymap so a rebind can never leave the +/// strip showing a stroke that no longer fires it. Hover raises the plate +/// (`ink2` + `raised`) the same way every other verb in the room does; +/// active reads `ink1` + fill, the state the deleted rail's glyphs carried. +fn room_ghost( player: &Player, - glyph: &str, + name: &'static str, action: ActionId, + active: bool, cx: &mut Context, ) -> impl IntoElement { div() - .id("keys") + .id(name) .flex_none() .flex() - .flex_col() .items_center() - .gap(px(2.)) - .py(px(6.)) + .gap(px(4.)) + .px(px(5.)) + .py(px(2.)) .rounded(px(3.)) .cursor_pointer() - .hover(|s| s.bg(rgb(DARK_RAISED())).text_color(rgb(INK1()))) + .when(active, |d| d.bg(rgb(DARK_RAISED()))) + .hover(|s| s.bg(rgb(DARK_RAISED())).text_color(rgb(INK2()))) .tooltip(crate::ui::widgets::action_hover(player, action)) .on_click(cx.listener(move |this, _: &ClickEvent, window, cx| this.act(action, window, cx))) - .type_style(type_scale::label( - type_scale::LABEL_ROW_PX, + .type_style(type_scale::mono( + type_scale::CHORD_METADATA_MIN_PX, gpui::FontWeight::MEDIUM, )) - .text_color(rgb(INK2())) - // The pointer's way to this glyph has to be findable by name like - // every other ghost's (`spine_stance`), or a hand -- and the harness - // -- can only reach the KEYS tab through its dock tab. + .text_color(rgb(if active { INK1() } else { INK3() })) + // The pointer's way to this verb has to be findable by name -- with + // the rail gone this is the hitmap entry for each of the four, and + // for `keys` it is the only `ShowActions` control in the room. .children(hitmap::action(action, true)) - .child(glyph.to_string()) - // Every command wears its chord (DESIGN §4) -- except the one whose - // glyph already IS its stroke: `?` over `?` read as two question - // marks on the rail and the user asked why ("why two ? exists"). - // A badge that only repeats the glyph says nothing, so it is not - // drawn; every other ghost still wears its chord under it. - .when(player.keymap.chord(action) != glyph, |el| { + .child(name) + // Every command wears its chord (DESIGN §4) -- except one whose name + // already IS its stroke, the `?` over `?` rule the rail's last ghost + // was given ("why two ? exists"). + .when(player.keymap.chord(action) != name, |el| { el.child( div() .type_style(type_scale::mono( @@ -467,36 +467,22 @@ fn ghost( gpui::FontWeight::MEDIUM, )) .text_color(rgb(INK3())) - // FAULT 1: the badge shows the primary chord, compact -- - // same rule as every glyph in `spine_stance`. .child(player.keymap.chord(action)), ) }) } -/// The spine: 56px, left, full height. Frame only -- grouped rows, task -/// frequency, glyph-over-chord grammar and every click all live in -/// [`crate::ui::spine_stance`] now (MOCK-SPEC.md "Spine"); this fn keeps -/// the panel's own surface and the `?` row, which stays part of the frame -/// since it swings the dock to its KEYS tab right here rather than through -/// `act`. -fn spine(player: &Player, cx: &mut Context) -> impl IntoElement { +/// The separator between two room verbs -- the ledger's own mono middot, +/// the same one the project identity already reads with. +fn verb_dot() -> impl IntoElement { div() - .id("stance-spine") .flex_none() - .w(px(SPINE_W)) - .h_full() - .bg(rgb(DARK_PANEL())) - .border_r_1() - .border_color(rgba(DARK_SEAM())) - .flex() - .flex_col() - .items_center() - .py(px(8.)) - .gap(px(4.)) - .child(section_head("spine")) - .child(spine_stance::render(player, cx)) - .child(ghost(player, "?", ActionId::ShowActions, cx)) + .type_style(type_scale::mono( + type_scale::CHORD_METADATA_MIN_PX, + gpui::FontWeight::MEDIUM, + )) + .text_color(rgb(INK3())) + .child("·") } /// The picture region: top of the centre column, takes the remaining space, @@ -555,7 +541,7 @@ fn screen( /// readout, the contact strip, boxed Export at the end (DESIGN §5, /// MOCK-SPEC.md "Time band"). Frame only -- every row and the Export chip's /// click live in [`crate::ui::timeband_stance`] now, the same split -/// `spine_stance`/`bench_stance`/`dock_stance` already make for their +/// `bench_stance`/`dock_stance` already make for their /// regions. fn time_band(player: &mut Player, position: f64, cx: &mut Context) -> impl IntoElement { // The position comes from `render`, the same one the screen and the ledger @@ -638,7 +624,7 @@ fn bench( /// Thin strip at the bottom of the centre column: project identity, last /// action, export progress, position. Notices rise from here (DESIGN §5, §8). -fn ledger(player: &Player, position: f64) -> impl IntoElement { +fn ledger(player: &Player, position: f64, cx: &mut Context) -> impl IntoElement { let name = match player.project_path.as_os_str().is_empty() { true => "untitled".to_string(), false => file_name(&player.project_path), @@ -717,6 +703,51 @@ fn ledger(player: &Player, position: f64) -> impl IntoElement { .text_color(rgb(INK2())) .child(e) })) + // The room's four verbs (DESIGN §5 as amended 2026-09-09, user + // decision "option C"): with the rail deleted, nothing on screen + // lists commands -- the KEYS tab is the list, every other verb is a + // key or a right-click on the thing -- except these four, which act + // on the room itself and so have no thing to be right-clicked on. + // They sit at the strip's right end, before the position, each + // wearing its chord. + .child( + div() + .flex_none() + .flex() + .items_center() + .gap(px(6.)) + .child(room_ghost( + player, + "CC", + ActionId::ToggleSubtitles, + player.subs_on, + cx, + )) + .child(verb_dot()) + .child(room_ghost( + player, + "settings", + ActionId::Settings, + player.settings_open, + cx, + )) + .child(verb_dot()) + .child(room_ghost( + player, + "keys", + ActionId::ShowActions, + player.keys_open, + cx, + )) + .child(verb_dot()) + .child(room_ghost( + player, + "full", + ActionId::Fullscreen, + false, + cx, + )) + ) .child( div() .flex_none() @@ -786,7 +817,7 @@ fn mouse_exit_listener(cx: &mut Context) -> impl IntoElement { .size(px(0.)) } -/// The whole stance: spine, screen, time band, bench, ledger, dock, in the +/// The whole stance: screen, time band, bench, ledger, dock, in the /// order DESIGN §5 draws them, over the same key handler the legacy tree /// uses (DESIGN §12 step 3): the darkroom draws its own regions but answers /// to the one keymap. @@ -852,7 +883,7 @@ pub(crate) fn render( // was clicked into (`dock_stance.rs` sets `dock_filter_edit` on // that click regardless of which tree is drawing the row), a // letter typed anywhere else in the room keeps meaning whatever - // the spine says it means. + // the keymap says it means. if this.dock_filter_edit { if key == "escape" || key == "enter" { this.dock_filter_edit = false; @@ -971,8 +1002,8 @@ pub(crate) fn render( // hearing it once a `Split::Dock`/`Split::Bench` drag has started. // A file dropped from outside the window (gpui's `ExternalPaths`, // Wayland's `text/uri-list`) lands on the room itself, not on the - // centre column: the dock's Sources panel and the spine are the - // centre's flex siblings, so a handler mounted there heard no drop + // centre column: the dock's Sources panel is the centre's flex + // sibling, so a handler mounted there heard no drop // over the library at all -- the shipped "drag and drop import does // not work on the library panel" defect. Here it is the one surface // under every region, so a drop anywhere in the darkroom is heard. @@ -995,7 +1026,6 @@ pub(crate) fn render( .bg(rgb(DARK_CANVAS())) .children(hitmap::frame()) .child(mouse_exit_listener(cx)) - .child(spine(player, cx)) .child( div() .id("stance-centre") @@ -1012,7 +1042,7 @@ pub(crate) fn render( .child(time_band(player, position, cx)) .child(divider(Split::Bench, player.split_drag == Some(Split::Bench), cx)) .child(bench(player, bench_h, window, cx)) - .child(ledger(player, position)) + .child(ledger(player, position, cx)) .when(player.settings_open, |el| { el.child(settings_stance::render(player, window_size, cx)) }) @@ -1052,8 +1082,9 @@ pub(crate) fn render( // `stance-centre`. Their anchors are *window* coordinates -- a // `MouseDownEvent::position` -- while an absolutely placed child of // the centre column is laid out from that column's own origin and - // ends where it ends: the spine shifted every clip menu right by - // `SPINE_W`, and the dock, painted after the centre, covered every + // ends where it ends: the rail that used to stand left of the centre + // shifted every clip menu right by its own 56px, and the dock, + // painted after the centre, covered every // pixel past x = width - dock. That is the shipped "can not remove a // media from library" defect (the library plate was built, placed and // never visible) and the clip menu whose chords were cut off mid-word