Commit Graph

1 Commits

Author SHA1 Message Date
gsxdsm 21a01c7d6b
Mobile: worktree-list sidebar for tablet/foldable layouts (#5505)
* Add worktree-list sidebar for mobile tablet/foldable layouts

On wide canvases (tablet/foldable, >=700pt) the per-host worktree list now
renders as a persistent left sidebar with the routed screens (terminal,
source control, review, accounts, tasks) shown in a detail pane to its
right — mirroring the desktop's sidebar + center layout. Phones keep the
existing single-pane stack navigation unchanged.

- Reuse the existing worktree-list screen as the sidebar via an `embedded`
  mode (props for hostId/action, mount-driven fetch since a sidebar is never
  the focused route, hide-sidebar control in place of the back button, and
  open-into-detail-pane navigation that replaces rather than stacks).
- The default host route renders an empty WorkspaceDetailPlaceholder on wide
  layouts (the list lives in the sidebar) and the full screen on phones, so
  exactly one instance mounts either way.
- Hide button collapses the sidebar to give the detail pane full width; an
  elevated reveal tab brings it back.
- Detail-pane screen transitions use `animation: 'none'` while the split is
  active so workspaces swap instantly instead of sliding and flashing the
  screen beneath.
- Drag the sidebar's right edge to resize (clamped 280-560pt, detail pane
  kept >=320pt, tap-transparent so list rows still work); width persists via
  AsyncStorage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Address PR review feedback (#5505)

- Clamp the restored/persisted sidebar width against the current window and
  re-clamp when the window shrinks, so a width saved on a larger device can't
  starve the detail pane below MIN_DETAIL_WIDTH. Extract a shared
  clampSidebarToWindow helper reused by load, window-resize, and drag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Polish mobile tablet sidebar

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-06-16 16:50:38 -07:00