forge
Explore
Log in

Don't you dare go Hollow

Merge branch 'worktree-agent-a7fe7b6b9d6662677'

Browse files at this commit

42cd182e92cfb0acce8ef489b893d86d2b1bbdb5Ahmet Kaan GümüşParent: 067620b2db0208
crates/app/src/main.rsmodified+8 -0
@@ -511,6 +511,13 @@ struct Player {
511 /// list). Cleared by [`Player::close_card`], the one reset list every511 /// list). Cleared by [`Player::close_card`], the one reset list every
512 /// opener routes through.512 /// opener routes through.
513 settings_open: bool,513 settings_open: bool,
514+ /// Which spine section, if any, currently sits under the pointer
515+ /// (density reduction, user feedback 2026-08-27): the low-frequency
516+ /// glyphs of that section render expanded while this is `Some`, and
517+ /// collapse to a hairline the instant the pointer leaves
518+ /// ([`crate::ui::spine_stance`]). Never gates a chord -- every action
519+ /// still fires from the keyboard whether its section is expanded or not.
520+ spine_hover: Option<crate::ui::spine_stance::SpineZone>,
514 /// Where the actions list is scrolled to. Held here rather than left to521 /// Where the actions list is scrolled to. Held here rather than left to
515 /// the wheel alone: forty actions are four times what a 360 px window522 /// the wheel alone: forty actions are four times what a 360 px window
516 /// shows, and the rows past the fold have to be reachable from the523 /// shows, and the rows past the fold have to be reachable from the
@@ -966,6 +973,7 @@ fn main() {
966 keymap: keymap.clone(),973 keymap: keymap.clone(),
967 keys_open: false,974 keys_open: false,
968 settings_open: false,975 settings_open: false,
976+ spine_hover: None,
969 keys_scroll: ScrollHandle::new(),977 keys_scroll: ScrollHandle::new(),
970 lanes_scroll: ScrollHandle::new(),978 lanes_scroll: ScrollHandle::new(),
971 eq_scroll: ScrollHandle::new(),979 eq_scroll: ScrollHandle::new(),
crates/app/src/ui/spine_stance.rsmodified+294 -189
@@ -185,6 +185,75 @@ fn trim_control(active: bool, player: &Player, cx: &mut Context<Player>) -> impl
185 )185 )
186 }186 }
187 187
188+/// Which spine section is expanded under the pointer (density reduction,
189+/// user feedback 2026-08-27: "feels complex" against the always-visible
190+/// ~40-glyph rail). `CutMore` is the low-frequency tail of the CUT group
191+/// (stride-10 walks, ±1 trim, trim-to-playhead, loop-trim) sitting under
192+/// the burst-use walk-cut pair, which stays visible on its own; VIEW,
193+/// TRACK and ROOM collapse whole since every row in them is once-per-scene
194+/// or rarer next to EDIT/CUT's every-cut cadence (DESIGN §6).
195+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
196+pub(crate) enum SpineZone {
197+ CutMore,
198+ View,
199+ Track,
200+ Room,
201+}
202+
203+/// A collapsed section: one hairline, no prose, no repeated group word
204+/// (DESIGN §8's rejected-instructional-copy rule applies to labels too --
205+/// a collapsed group reads as a seam in the rail, not a sentence).
206+fn hairline() -> impl IntoElement {
207+ div()
208+ .flex_none()
209+ .w(px(20.))
210+ .h(px(1.))
211+ .my(px(5.))
212+ .bg(rgba(DARK_SEAM()))
213+}
214+
215+/// A section that is a hairline at rest and its full row set on hover
216+/// (task: "hover the collapsed group's zone -> its glyphs expand in
217+/// place; leave -> collapse"). The wrapping div is the hover target and
218+/// carries the hover state onto [`Player::spine_hover`] rather than any
219+/// local widget state, since gpui re-renders the whole spine on
220+/// `cx.notify()` and this is the one flag the whole rail reads. Every
221+/// glyph inside `rows` keeps its own `cx.listener` click handler, so a
222+/// verb revealed by hover is exactly as clickable as an always-visible one
223+/// once it is on screen -- collapsing only removes it from the layout, it
224+/// never disables the handler.
225+fn collapsible<T: IntoElement>(
226+ id: &'static str,
227+ zone: SpineZone,
228+ player: &Player,
229+ rows: T,
230+ cx: &mut Context<Player>,
231+) -> impl IntoElement + use<T> {
232+ let hovered = player.spine_hover == Some(zone);
233+ div()
234+ .id(id)
235+ .flex_none()
236+ .w_full()
237+ .flex()
238+ .flex_col()
239+ .items_center()
240+ .on_hover(cx.listener(move |this, now_hovered: &bool, _window, cx| {
241+ this.spine_hover = if *now_hovered {
242+ Some(zone)
243+ } else if this.spine_hover == Some(zone) {
244+ None
245+ } else {
246+ this.spine_hover
247+ };
248+ cx.notify();
249+ }))
250+ .child(if hovered {
251+ rows.into_any_element()
252+ } else {
253+ hairline().into_any_element()
254+ })
255+}
256+
188 /// Two commands side by side in one row -- the opposite-direction pairs257 /// Two commands side by side in one row -- the opposite-direction pairs
189 /// (walk cuts, no-aim trim) that share a row in the mock rather than each258 /// (walk cuts, no-aim trim) that share a row in the mock rather than each
190 /// eating a full row of the spine's own height.259 /// eating a full row of the spine's own height.
@@ -281,205 +350,241 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem
281 cx,350 cx,
282 ),351 ),
283 ))352 ))
284- .child(pair(353+ // Everything past the walk-cut pair above is CUT's low-frequency
285- glyph(354+ // tail (stride-10 walks, ±1 trim, trim-to-playhead, loop-trim) --
286- "spine-cut-prev-ten",355+ // collapsed to a hairline, revealed on hover of this zone.
287- "‹10",356+ .child(collapsible(
288- ActionId::WalkCutPrev10,357+ "spine-zone-cut-more",
289- false,358+ SpineZone::CutMore,
290- false,
291- player,
292- cx,
293- ),
294- glyph(
295- "spine-cut-next-ten",
296- "10›",
297- ActionId::WalkCutNext10,
298- false,
299- false,
300- player,
301- cx,
302- ),
303- ))
304- .child(trim_control(player.loop_trim.is_some(), player, cx))
305- .child(pair(
306- // Trim-to-playhead (debt #42): the keyboard's own version of the
307- // pointer's drag-to-a-spot trim, beside the nudge pair it shares
308- // its primitive with.
309- glyph(
310- "spine-trim-in-playhead",
311- "[▮",
312- ActionId::TrimInToPlayhead,
313- false,
314- false,
315- player,
316- cx,
317- ),
318- glyph(
319- "spine-trim-out-playhead",
320- "▮]",
321- ActionId::TrimOutToPlayhead,
322- false,
323- false,
324- player,
325- cx,
326- ),
327- ))
328- .child(glyph(
329- "spine-loop-trim",
330- "↻",
331- ActionId::LoopTrim,
332- player.loop_trim.is_some(),
333- false,
334- player,
335- cx,
336- ))
337- // VIEW group, added this task: ZoomIn/ZoomOut/ZoomFit (keymap.rs) had
338- // real, already-working handlers (`Player::zoom`/`zoom_fit`, wired
339- // into the legacy `ui/toolbar.rs`) but no home anywhere in the
340- // darkroom -- a DESIGN §9 "nothing lives only on a key" violation.
341- // Placed between CUT and TRACK per §11 check 1 (task frequency):
342- // reading the timeline at a different scale happens many times a
343- // session (more than the once-per-project lane add below it), but
344- // less than walking/trimming cuts above it.
345- .child(group_head("view"))
346- .child(pair(
347- glyph(
348- "spine-zoom-out",
349- "−",
350- ActionId::ZoomOut,
351- false,
352- false,
353- player,
354- cx,
355- ),
356- glyph(
357- "spine-zoom-in",
358- "+",
359- ActionId::ZoomIn,
360- false,
361- false,
362- player,
363- cx,
364- ),
365- ))
366- .child(glyph(
367- "spine-zoom-fit",
368- "⊡",
369- ActionId::ZoomFit,
370- false,
371- false,
372 player,359 player,
360+ div()
361+ .flex()
362+ .flex_col()
363+ .items_center()
364+ .gap(px(1.))
365+ .child(pair(
366+ glyph(
367+ "spine-cut-prev-ten",
368+ "‹10",
369+ ActionId::WalkCutPrev10,
370+ false,
371+ false,
372+ player,
373+ cx,
374+ ),
375+ glyph(
376+ "spine-cut-next-ten",
377+ "10›",
378+ ActionId::WalkCutNext10,
379+ false,
380+ false,
381+ player,
382+ cx,
383+ ),
384+ ))
385+ .child(trim_control(player.loop_trim.is_some(), player, cx))
386+ .child(pair(
387+ // Trim-to-playhead (debt #42): the keyboard's own version
388+ // of the pointer's drag-to-a-spot trim, beside the nudge
389+ // pair it shares its primitive with.
390+ glyph(
391+ "spine-trim-in-playhead",
392+ "[▮",
393+ ActionId::TrimInToPlayhead,
394+ false,
395+ false,
396+ player,
397+ cx,
398+ ),
399+ glyph(
400+ "spine-trim-out-playhead",
401+ "▮]",
402+ ActionId::TrimOutToPlayhead,
403+ false,
404+ false,
405+ player,
406+ cx,
407+ ),
408+ ))
409+ .child(glyph(
410+ "spine-loop-trim",
411+ "↻",
412+ ActionId::LoopTrim,
413+ player.loop_trim.is_some(),
414+ false,
415+ player,
416+ cx,
417+ )),
373 cx,418 cx,
374 ))419 ))
375- // ToggleSnap: decides where a drag lands, which is what the eye420+ // VIEW group: ZoomIn/ZoomOut/ZoomFit/ToggleSnap all read the
376- // reads the zoom scale against -- placed as the VIEW group's last421+ // timeline at a scale rather than cutting it -- real handlers with
377- // row, beside the zoom controls above it, rather than off in CUT422+ // a darkroom home, but well under EDIT/CUT's every-cut cadence
378- // where nothing else answers "what scale/behaviour am I looking423+ // (DESIGN §6), so the whole group collapses under one hairline
379- // at". Active fill mirrors loop-trim's own on/off convention.424+ // rather than carrying its own always-visible "view" word.
380- .child(glyph(425+ .child(collapsible(
381- "snap",426+ "spine-zone-view",
382- "Sn",427+ SpineZone::View,
383- ActionId::ToggleSnap,
384- player.snap,
385- false,
386 player,428 player,
429+ div()
430+ .flex()
431+ .flex_col()
432+ .items_center()
433+ .gap(px(1.))
434+ .child(pair(
435+ glyph(
436+ "spine-zoom-out",
437+ "−",
438+ ActionId::ZoomOut,
439+ false,
440+ false,
441+ player,
442+ cx,
443+ ),
444+ glyph(
445+ "spine-zoom-in",
446+ "+",
447+ ActionId::ZoomIn,
448+ false,
449+ false,
450+ player,
451+ cx,
452+ ),
453+ ))
454+ .child(glyph(
455+ "spine-zoom-fit",
456+ "⊡",
457+ ActionId::ZoomFit,
458+ false,
459+ false,
460+ player,
461+ cx,
462+ ))
463+ // ToggleSnap: decides where a drag lands, which is what the
464+ // eye reads the zoom scale against -- kept beside the zoom
465+ // controls it shares this zone with. Active fill mirrors
466+ // loop-trim's own on/off convention.
467+ .child(glyph(
468+ "snap",
469+ "Sn",
470+ ActionId::ToggleSnap,
471+ player.snap,
472+ false,
473+ player,
474+ cx,
475+ )),
387 cx,476 cx,
388 ))477 ))
389- .child(group_head("track"))478+ // TRACK: once-per-project lane adds, collapsed whole.
390- .child(pair(479+ .child(collapsible(
391- glyph(480+ "spine-zone-track",
392- "spine-add-video",481+ SpineZone::Track,
393- "+V",
394- ActionId::AddVideoLane,
395- false,
396- false,
397- player,
398- cx,
399- ),
400- glyph(
401- "spine-add-audio",
402- "+A",
403- ActionId::AddAudioLane,
404- false,
405- false,
406- player,
407- cx,
408- ),
409- ))
410- // The subtitle lane pair: add beside remove, one row, the same
411- // "+letter"/"−letter" grammar +V/+A above it already reads in. Import
412- // (`↓S`) left this rail entirely -- it is an import, so it lives in
413- // the dock's own IMPORT list beside "Add files" (`dock_stance`),
414- // where an editor already goes to bring a file into the room. That
415- // move is what takes this group from three crowded rows to two.
416- .child(pair(
417- glyph(
418- "spine-add-subtitle",
419- "+S",
420- ActionId::AddSubtitleLane,
421- false,
422- false,
423- player,
424- cx,
425- ),
426- glyph(
427- "spine-remove-subtitle",
428- "−S",
429- ActionId::RemoveSubtitleLane,
430- false,
431- false,
432- player,
433- cx,
434- ),
435- ))
436- .child(glyph(
437- "spine-toggle-subtitles",
438- "CC",
439- ActionId::ToggleSubtitles,
440- player.subs_on,
441- false,
442 player,482 player,
483+ div()
484+ .flex()
485+ .flex_col()
486+ .items_center()
487+ .gap(px(1.))
488+ .child(pair(
489+ glyph(
490+ "spine-add-video",
491+ "+V",
492+ ActionId::AddVideoLane,
493+ false,
494+ false,
495+ player,
496+ cx,
497+ ),
498+ glyph(
499+ "spine-add-audio",
500+ "+A",
501+ ActionId::AddAudioLane,
502+ false,
503+ false,
504+ player,
505+ cx,
506+ ),
507+ ))
508+ // The subtitle lane pair: add beside remove, one row, the
509+ // same "+letter"/"−letter" grammar +V/+A above it already
510+ // reads in. Import (`↓S`) left this rail entirely -- it is
511+ // an import, so it lives in the dock's own IMPORT list
512+ // beside "Add files" (`dock_stance`), where an editor
513+ // already goes to bring a file into the room.
514+ .child(pair(
515+ glyph(
516+ "spine-add-subtitle",
517+ "+S",
518+ ActionId::AddSubtitleLane,
519+ false,
520+ false,
521+ player,
522+ cx,
523+ ),
524+ glyph(
525+ "spine-remove-subtitle",
526+ "−S",
527+ ActionId::RemoveSubtitleLane,
528+ false,
529+ false,
530+ player,
531+ cx,
532+ ),
533+ ))
534+ .child(glyph(
535+ "spine-toggle-subtitles",
536+ "CC",
537+ ActionId::ToggleSubtitles,
538+ player.subs_on,
539+ false,
540+ player,
541+ cx,
542+ )),
443 cx,543 cx,
444 ))544 ))
445- // ROOM, cut to the three acts that are *acts* rather than settings545+ // ROOM: the three acts that are *acts* rather than settings (user
446- // (user 2026-08-21: "the spine menu is too crowded and looks weird546+ // 2026-08-21: "the spine menu is too crowded"). Theme, proxies and
447- // also not fitting" -- measured at 1280x720 the rail overflowed its547+ // auto-proxies stayed off this rail entirely (settings_stance).
448- // own height and the settings glyph, the last row, could only be548+ // Once-a-session/once-a-project cadence -- collapsed whole, same as
449- // reached by scrolling the spine). Theme, proxies and auto-proxies549+ // VIEW/TRACK above it.
450- // were the three that are *preferences*, not verbs: they are rows on550+ .child(collapsible(
451- // the settings page now (`settings_stance`), which is where an551+ "spine-zone-room",
452- // editor already goes to change what the room is rather than what552+ SpineZone::Room,
453- // the film is -- so nothing lost a visible home (DESIGN §9) and the
454- // rail lost three rows.
455- .child(group_head("room"))
456- .child(pair(
457- glyph(
458- "spine-settings",
459- "St",
460- ActionId::Settings,
461- player.settings_open,
462- true,
463- player,
464- cx,
465- ),
466- glyph(
467- "spine-screenshot",
468- "Sh",
469- ActionId::Screenshot,
470- false,
471- true,
472- player,
473- cx,
474- ),
475- ))
476- .child(glyph(
477- "spine-fullscreen",
478- "FS",
479- ActionId::Fullscreen,
480- false,
481- true,
482 player,553 player,
554+ div()
555+ .flex()
556+ .flex_col()
557+ .items_center()
558+ .gap(px(1.))
559+ .child(pair(
560+ glyph(
561+ "spine-settings",
562+ "St",
563+ ActionId::Settings,
564+ player.settings_open,
565+ true,
566+ player,
567+ cx,
568+ ),
569+ glyph(
570+ "spine-screenshot",
571+ "Sh",
572+ ActionId::Screenshot,
573+ false,
574+ true,
575+ player,
576+ cx,
577+ ),
578+ ))
579+ .child(glyph(
580+ "spine-fullscreen",
581+ "FS",
582+ ActionId::Fullscreen,
583+ false,
584+ true,
585+ player,
586+ cx,
587+ )),
483 cx,588 cx,
484 ))589 ))
485 .child(div().flex_1())590 .child(div().flex_1())