feat(expose): zoom out scope with g while Exposé is open - #134
Conversation
Pure, DI-testable scope ladder (worktree → project → global): ExposeScope, nextExposeScope (clamped at global), initialExposeScope (derives the start rung from launch context), and loadExposeScopeItems (resolves tiles/label/ sublabel per rung). Consumed by the Exposé TUI in a follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Wire the scope ladder into the TUI: g zooms worktree → project → global (clamped), reloading tiles/labels/sublabels and re-seeking the selection without leaving the overlay. Scope is ephemeral — recomputed from the launch context each open, never persisted. Escape/q still just close the popup (no navigation); only Enter/1-9 jump. Tile select is now per-item (openTarget when the item carries a projectRoot, else runWindowSwitch), so a tile picked after zooming to global jumps across projects. Empty rungs render an in-overlay message so g still zooms out from them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 1 hour, 44 minutes, and 3 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. 📝 WalkthroughWalkthroughA "zoom ladder" scope model is added to the Exposé TUI: new types ( ChangesExposé Scope Zoom Ladder
Sequence Diagram(s)sequenceDiagram
participant User
participant runTmuxExpose
participant initialExposeScope
participant loadExposeScopeItems
participant nextExposeScope
participant TmuxRender
User->>runTmuxExpose: launch Exposé (Ctrl+A g)
runTmuxExpose->>initialExposeScope: compute starting scope from context/config
initialExposeScope-->>runTmuxExpose: ExposeScope
runTmuxExpose->>loadExposeScopeItems: load items for scope
loadExposeScopeItems-->>runTmuxExpose: ExposeScopeView
runTmuxExpose->>TmuxRender: render tiles + help (with "g zoom out" if not global)
User->>runTmuxExpose: press g
runTmuxExpose->>nextExposeScope: advance scope
nextExposeScope-->>runTmuxExpose: wider scope
runTmuxExpose->>loadExposeScopeItems: reload items for new scope
loadExposeScopeItems-->>runTmuxExpose: ExposeScopeView
runTmuxExpose->>TmuxRender: re-render with updated tiles/labels
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
render() clamped index to visibleCount-1, leaving it at -1 when a rung has no agents. Selection was only kept safe by selectTile's !item guard; clamp to 0 so the index never goes negative. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Sub-agent review — findings (1 fixed, 2 by-design) CodeRabbit found nothing actionable; the concurrent sub-agent raised 3 low-severity items:
|
Summary
Adds progressive zoom-out inside the Exposé overlay. While Exposé is open, pressing
gwidens the scope one rung along a single ladder:The launch context only sets the starting rung (agent → worktree, dashboard → project, meta dashboard → global);
gwalks up from there. This unifies the three existing entry points (Ctrl-A gin an agent / on the dashboard / on the meta dashboard) under one concept.Behavior guarantees
Ctrl-A gstarts back at the context default.display-popup); you stay on the pane you triggered it from. OnlyEnter/1-9navigate.projectRoot(global scope) jumps cross-project viaopenTarget; otherwise it uses the same-projectrunWindowSwitch. So a tile picked after zooming to global correctly jumps across projects.gstill zooms out from them.Implementation
src/tmux/expose-model.ts: pure, DI-testableExposeScopeladder —nextExposeScope(clamped),initialExposeScope(start rung from context),loadExposeScopeItems(tiles/label/sublabel per rung). Full unit tests.src/tmux/expose.ts: mutable scope +ghandler +reload()+ per-item select + empty-state render; README line.No tmux/binding changes — plain
galready reaches the popup's stdin.Verification
yarn typecheck,yarn lint,yarn test(1236 passed),yarn build— all green. Built via plan-execute with Explore plan-audit + impl-audit per phase (all clean).🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Ctrl+A ghotkey to access Exposé with zoom functionality; usegkey to zoom out through scope levels (worktree → project → global) with per-session state that resets on reopen.Ctrl+A Ctrl+Ahotkey to send literal Ctrl+A.Documentation