sidebar toggle: panes glide with the sidebar on cmd b

LU
1mo ago
+2080-144

summary

stacked on #18334 (organize/drag). this is the cmd b sidebar toggle glide, split out as lawrence suggested.

when the sidebar hides or shows, every pane now glides to its own docked edges on the same spring as the sidebar, instead of the old rigid slide:

  • the titlebar title and the minimal mode tab bar inset glide with the slide
  • each pane's whole subtree (terminals, browser, file views) moves and clips to its own rect, so nothing leaks into the next pane. divider strips stand in for the real dividers during the slide
  • each tab bar is laid out once at its pane's width for the whole slide, so tabs and their scroll offset hold still and fade at the pane's moving edge, the same way bonsplit fades them at rest
  • the action lane (new terminal, browser, split buttons) rides each pane's trailing edge, still and flush, on both hide and show
  • one layout commit and one terminal resize per toggle

needs the bonsplit change in manaflow-ai/bonsplit280 (vendor/bonsplit points at it).

testing

  • tested by hand by lucas on a tagged dev build: hide and show, several panes, several tabs, long titles
  • labs/GlideLab pixel checks (edges.py plus a trailing flush check) on the tabs, 3, mix, 2x2, browser, file, 20-80, nest-v, mix4 layouts and light mode, both directions, normal and 4x slow speed

known leftovers

  • a one frame snap when you toggle while a split is still animating
  • the moving button picture can look a bit darker on translucent tab bar themes
  • lab only: a 75 pt docked pane is narrower than its toolbar, and a 0.7 to 1 pt landing offset now and then (both same as before this pr)
  • rprompt text is clipped during the glide (terminals resize once, at the end)
  • still to check by hand: fullscreen, reduce motion, two displays, dock/float, peek

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Reworks the cmd+B sidebar toggle so each pane glides to its own docked edges on the same spring as the sidebar, replacing the previous rigid slide of the whole content root. The titlebar title, minimal-mode tab bar inset, and each pane's trailing action lane glide in step, content is clipped to each pane's rect so nothing leaks into neighbors, and tab bars are laid out once at the pane's width so tabs and their scroll offset hold still and fade at the moving edge. The live right sidebar is held still against the moving root instead of snapshotted, so file views don't flicker brighter mid-slide. The browser toolbar holds its compact state through a slide and fades the change on landing, so its tools don't pop in or out mid-motion. One layout commit and one terminal resize occur per toggle, and closing the window mid-slide drops the slide cleanly instead of leaving a stale layout observer for the app's lifetime. The workspace card now runs flush to the window's bottom and trailing edges, so no dead strip appears under a browser page; the compact toolbar's import chip shows as a square icon, and the omnibar clips its text rather than ellipsizing, so neither shifts at the slide's landing.

Fixes

  • Press-time picture capture is about halved by skipping the unused tab bar strip picture and caching class name checks.
  • Each glide on a layer now gets its own animation key, fixing divider stand-in strips that started off-position and only caught up at landing.
  • The real dividers are hidden with an empty mask for the slide, since AppKit redraws them during a show.
  • Requires the bonsplit change in manaflow-ai/bonsplit280 (vendor/bonsplit points to it).

Known leftovers

  • One-frame snap when toggling while a split is still animating.
  • Moving button picture can look darker on translucent tab bar themes.
  • rprompt text is clipped during the glide (terminals resize once at the end).
  • Fullscreen, reduce motion, two displays, dock/float, and peek still need manual testing.

Tested by hand on a dev build and with GlideLab pixel checks across multiple layouts, speeds, and light mode.


[!NOTE]
Medium Risk
Large Core Animation and layout-timing changes across window chrome, Bonsplit panes, and portal geometry; depends on vendor Bonsplit slide-width APIs and has known edge cases (mid-split toggle, fullscreen/peek not fully verified).

Overview
Replaces the cmd+B sidebar toggle rigid content-root slide with per-pane motion on the same spring: panes, portal-hosted terminals/browsers, split dividers, tab action lanes, and titlebar title (via SidebarSlideGlideHost) each glide/clip between hidden and docked layouts using new capture/layout/glide machinery (SidebarSlidePaneLayout, SidebarSlidePaneChrome, SidebarSlidePaneGlide, SidebarToggleSlideSession).

SidebarToggleAnimator now captures docked geometry at hide press, rebuilds mid-slide on split resize (restart), syncs minimal-mode tab bar inset on dock commits, exposes isSliding / slideDidLand so UI (e.g. browser toolbar compact state, omnibar clipping) holds steady until the slide lands. Right sidebar column stays live (inverse spring + masks) instead of a snapshot overlay.

Chrome polish: workspace card drops bottom/trailing pane insets and bottom-leading rounding; traffic-light tab inset respects docked vs hidden; browser import chip goes icon-only in compact mode; portal registry types loosened for slide introspection (entriesByWebViewId, Entry). DEBUG probes/timings extended; unit tests cover glide math, action-lane width, and slide restart.

Reviewed by Cursor Bugbot for commit c51366e99a618c88712a72b4a1db97b33372862a. Bugbot is set up for automated code reviews on this repo. Configure here.