Merge branch 'worktree-agent-a7fe7b6b9d6662677'
Browse files at this commit2 changed files +148 -35
- crates/app/src/main.rs +8 -0
- crates/app/src/ui/spine_stance.rs +140 -35
crates/app/src/main.rsmodified+8 -0
| @@ -511,6 +511,13 @@ struct Player { | |||
| 511 | /// list). Cleared by [`Player::close_card`], the one reset list every | 511 | /// 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 to | 521 | /// 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 window | 522 | /// 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 the | 523 | /// 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+140 -35
| @@ -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 pairs | 257 | /// 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 each | 258 | /// (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,6 +350,18 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | |||
| 281 | cx, | 350 | cx, |
| 282 | ), | 351 | ), |
| 283 | )) | 352 | )) |
| 353 | + // Everything past the walk-cut pair above is CUT's low-frequency | ||
| 354 | + // tail (stride-10 walks, ±1 trim, trim-to-playhead, loop-trim) -- | ||
| 355 | + // collapsed to a hairline, revealed on hover of this zone. | ||
| 356 | + .child(collapsible( | ||
| 357 | + "spine-zone-cut-more", | ||
| 358 | + SpineZone::CutMore, | ||
| 359 | + player, | ||
| 360 | + div() | ||
| 361 | + .flex() | ||
| 362 | + .flex_col() | ||
| 363 | + .items_center() | ||
| 364 | + .gap(px(1.)) | ||
| 284 | .child(pair( | 365 | .child(pair( |
| 285 | glyph( | 366 | glyph( |
| 286 | "spine-cut-prev-ten", | 367 | "spine-cut-prev-ten", |
| @@ -303,9 +384,9 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | |||
| 303 | )) | 384 | )) |
| 304 | .child(trim_control(player.loop_trim.is_some(), player, cx)) | 385 | .child(trim_control(player.loop_trim.is_some(), player, cx)) |
| 305 | .child(pair( | 386 | .child(pair( |
| 306 | - // Trim-to-playhead (debt #42): the keyboard's own version of the | 387 | + // Trim-to-playhead (debt #42): the keyboard's own version |
| 307 | - // pointer's drag-to-a-spot trim, beside the nudge pair it shares | 388 | + // of the pointer's drag-to-a-spot trim, beside the nudge |
| 308 | - // its primitive with. | 389 | + // pair it shares its primitive with. |
| 309 | glyph( | 390 | glyph( |
| 310 | "spine-trim-in-playhead", | 391 | "spine-trim-in-playhead", |
| 311 | "[▮", | 392 | "[▮", |
| @@ -333,16 +414,23 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | |||
| 333 | false, | 414 | false, |
| 334 | player, | 415 | player, |
| 335 | cx, | 416 | cx, |
| 417 | + )), | ||
| 418 | + cx, | ||
| 336 | )) | 419 | )) |
| 337 | - // VIEW group, added this task: ZoomIn/ZoomOut/ZoomFit (keymap.rs) had | 420 | + // VIEW group: ZoomIn/ZoomOut/ZoomFit/ToggleSnap all read the |
| 338 | - // real, already-working handlers (`Player::zoom`/`zoom_fit`, wired | 421 | + // timeline at a scale rather than cutting it -- real handlers with |
| 339 | - // into the legacy `ui/toolbar.rs`) but no home anywhere in the | 422 | + // a darkroom home, but well under EDIT/CUT's every-cut cadence |
| 340 | - // darkroom -- a DESIGN §9 "nothing lives only on a key" violation. | 423 | + // (DESIGN §6), so the whole group collapses under one hairline |
| 341 | - // Placed between CUT and TRACK per §11 check 1 (task frequency): | 424 | + // rather than carrying its own always-visible "view" word. |
| 342 | - // reading the timeline at a different scale happens many times a | 425 | + .child(collapsible( |
| 343 | - // session (more than the once-per-project lane add below it), but | 426 | + "spine-zone-view", |
| 344 | - // less than walking/trimming cuts above it. | 427 | + SpineZone::View, |
| 345 | - .child(group_head("view")) | 428 | + player, |
| 429 | + div() | ||
| 430 | + .flex() | ||
| 431 | + .flex_col() | ||
| 432 | + .items_center() | ||
| 433 | + .gap(px(1.)) | ||
| 346 | .child(pair( | 434 | .child(pair( |
| 347 | glyph( | 435 | glyph( |
| 348 | "spine-zoom-out", | 436 | "spine-zoom-out", |
| @@ -372,11 +460,10 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | |||
| 372 | player, | 460 | player, |
| 373 | cx, | 461 | cx, |
| 374 | )) | 462 | )) |
| 375 | - // ToggleSnap: decides where a drag lands, which is what the eye | 463 | + // ToggleSnap: decides where a drag lands, which is what the |
| 376 | - // reads the zoom scale against -- placed as the VIEW group's last | 464 | + // eye reads the zoom scale against -- kept beside the zoom |
| 377 | - // row, beside the zoom controls above it, rather than off in CUT | 465 | + // controls it shares this zone with. Active fill mirrors |
| 378 | - // where nothing else answers "what scale/behaviour am I looking | 466 | + // loop-trim's own on/off convention. |
| 379 | - // at". Active fill mirrors loop-trim's own on/off convention. | ||
| 380 | .child(glyph( | 467 | .child(glyph( |
| 381 | "snap", | 468 | "snap", |
| 382 | "Sn", | 469 | "Sn", |
| @@ -385,8 +472,19 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | |||
| 385 | false, | 472 | false, |
| 386 | player, | 473 | player, |
| 387 | cx, | 474 | cx, |
| 475 | + )), | ||
| 476 | + cx, | ||
| 388 | )) | 477 | )) |
| 389 | - .child(group_head("track")) | 478 | + // TRACK: once-per-project lane adds, collapsed whole. |
| 479 | + .child(collapsible( | ||
| 480 | + "spine-zone-track", | ||
| 481 | + SpineZone::Track, | ||
| 482 | + player, | ||
| 483 | + div() | ||
| 484 | + .flex() | ||
| 485 | + .flex_col() | ||
| 486 | + .items_center() | ||
| 487 | + .gap(px(1.)) | ||
| 390 | .child(pair( | 488 | .child(pair( |
| 391 | glyph( | 489 | glyph( |
| 392 | "spine-add-video", | 490 | "spine-add-video", |
| @@ -407,12 +505,12 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | |||
| 407 | cx, | 505 | cx, |
| 408 | ), | 506 | ), |
| 409 | )) | 507 | )) |
| 410 | - // The subtitle lane pair: add beside remove, one row, the same | 508 | + // The subtitle lane pair: add beside remove, one row, the |
| 411 | - // "+letter"/"−letter" grammar +V/+A above it already reads in. Import | 509 | + // same "+letter"/"−letter" grammar +V/+A above it already |
| 412 | - // (`↓S`) left this rail entirely -- it is an import, so it lives in | 510 | + // reads in. Import (`↓S`) left this rail entirely -- it is |
| 413 | - // the dock's own IMPORT list beside "Add files" (`dock_stance`), | 511 | + // an import, so it lives in the dock's own IMPORT list |
| 414 | - // where an editor already goes to bring a file into the room. That | 512 | + // beside "Add files" (`dock_stance`), where an editor |
| 415 | - // move is what takes this group from three crowded rows to two. | 513 | + // already goes to bring a file into the room. |
| 416 | .child(pair( | 514 | .child(pair( |
| 417 | glyph( | 515 | glyph( |
| 418 | "spine-add-subtitle", | 516 | "spine-add-subtitle", |
| @@ -441,18 +539,23 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | |||
| 441 | false, | 539 | false, |
| 442 | player, | 540 | player, |
| 443 | cx, | 541 | cx, |
| 542 | + )), | ||
| 543 | + cx, | ||
| 444 | )) | 544 | )) |
| 445 | - // ROOM, cut to the three acts that are *acts* rather than settings | 545 | + // ROOM: the three acts that are *acts* rather than settings (user |
| 446 | - // (user 2026-08-21: "the spine menu is too crowded and looks weird | 546 | + // 2026-08-21: "the spine menu is too crowded"). Theme, proxies and |
| 447 | - // also not fitting" -- measured at 1280x720 the rail overflowed its | 547 | + // auto-proxies stayed off this rail entirely (settings_stance). |
| 448 | - // own height and the settings glyph, the last row, could only be | 548 | + // Once-a-session/once-a-project cadence -- collapsed whole, same as |
| 449 | - // reached by scrolling the spine). Theme, proxies and auto-proxies | 549 | + // VIEW/TRACK above it. |
| 450 | - // were the three that are *preferences*, not verbs: they are rows on | 550 | + .child(collapsible( |
| 451 | - // the settings page now (`settings_stance`), which is where an | 551 | + "spine-zone-room", |
| 452 | - // editor already goes to change what the room is rather than what | 552 | + SpineZone::Room, |
| 453 | - // the film is -- so nothing lost a visible home (DESIGN §9) and the | 553 | + player, |
| 454 | - // rail lost three rows. | 554 | + div() |
| 455 | - .child(group_head("room")) | 555 | + .flex() |
| 556 | + .flex_col() | ||
| 557 | + .items_center() | ||
| 558 | + .gap(px(1.)) | ||
| 456 | .child(pair( | 559 | .child(pair( |
| 457 | glyph( | 560 | glyph( |
| 458 | "spine-settings", | 561 | "spine-settings", |
| @@ -481,6 +584,8 @@ pub(crate) fn render(player: &Player, cx: &mut Context<Player>) -> impl IntoElem | |||
| 481 | true, | 584 | true, |
| 482 | player, | 585 | player, |
| 483 | cx, | 586 | cx, |
| 587 | + )), | ||
| 588 | + cx, | ||
| 484 | )) | 589 | )) |
| 485 | .child(div().flex_1()) | 590 | .child(div().flex_1()) |
| 486 | } | 591 | } |