Repository navigation
Route workspace.last through the Focus Last toggle - #14760
Conversation
The socket command behind `cmux last-window` and the tmux `-` target called TabManager.navigateBack(), so repeated calls walked further back through history, while the app's Focus Last shortcut and History menu item toggle between the two most recent positions. workspace.last now calls navigateToLastFocused() and reports not_found only when that navigation fails, so the CLI and the app behave identically. Adds a cmuxTests case that drives workspace.last through the control coordinator twice and expects it to toggle back to the start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe ChangesLast workspace toggle
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Workspace history toggles as intended, and pane-only history does not resolve as a different workspace. No actionable merge-blocking risk remains. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The command now toggles between recently focused workspaces instead of walking backward through history. It uses the existing workspace routing and does not appear to grant new access. If the last-focused workspace has disappeared, however, the command can fail where it previously could select an older workspace. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 23 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (23 passed)
Full details: Description checkExplanation The description explains the problem, resulting behavior, implementation, and added test. It omits the required Demo Video and Checklist sections, and it does not state an executed test command or test result.
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Pane-scoped history can make the toggle land on another pane in the current workspace; keep reporting not_found there so tmux - targets never resolve to the current workspace. Also fix the test's JSONValue.int argument type (Int64). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge receipt for
|
git 2.55 starts `git maintenance run --auto --detach` after commit, fetch, and clone. The detached child can still be writing into a fixture repo's .git when TemporaryDirectory removes it, which failed CI fast guards on #14760 with "Directory not empty: '.git'". Set maintenance.auto=false through GIT_CONFIG_COUNT for every git child of test_ci_change_areas.py. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
e196ab6 Fix spontaneous Computer Use onboarding during permission refresh (manaflow-ai#14752) 6ba2583 ci: stop git auto maintenance in CI routing test fixture repos (manaflow-ai#14765) db9580b ci: let a refused owned job's siblings finish instead of cancelling them (manaflow-ai#14766) 8ea76f8 Route workspace.last through the Focus Last toggle (manaflow-ai#14760) # Conflicts: # .github/workflows/ci-macos.yml
Summary
Follow-up to #14700 (Focus Last). The
workspace.lastsocket command, which backscmux last-windowand the tmux-/!/^window target, calledTabManager.navigateBack(). Repeated calls walked further back through focus history, while the app's Focus Last shortcut and History menu item toggle between the two most recent positions.controlSelectLastWorkspacenow callsTabManager.navigateToLastFocused(), the same entry point the app uses, and returnsnot_foundwhen that navigation fails or leaves the selected workspace unchanged (pane-scoped history can toggle to another pane in the same workspace; tmux-targets must not resolve to the current workspace). The CLI and the app now behave identically:last-windowtwice returns to where you started.Test
FocusHistoryScopeTests.workspaceLastSocketCommandTogglesLikeFocusLastselects three workspaces, then drivesworkspace.lastthroughControlCommandCoordinatortwice. The first call lands on the second workspace, the second returns to the third (the oldnavigateBackpath would have gone to the first).🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Routes the
workspace.lastsocket command — which backscmux last-windowand the tmux-target — through the same Focus Last toggle the app uses, so repeated calls flip between the two most recent workspaces instead of walking further back through focus history.not_foundis now returned when the toggle can't move or stays in the current workspace (pane-scoped history), so tmux-targets never resolve to the current workspace, matching the app's shortcut and History menu behavior.Written for commit 8e89466. Summary will update on new commits.
Summary by CodeRabbit