Repository navigation
Add workspace-only focus history setting - #8654
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe PR adds a configurable focus-history scope setting, exposes it in App settings, applies it to workspace and dock navigation, routes related shortcuts accordingly, and adds model, catalog, UI, and session coverage. ChangesFocus history scope
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant SettingsUI
participant TabManager
participant Workspace
participant DockSplitStore
participant FocusHistoryModel
User->>SettingsUI: disable pane and tab focus history
SettingsUI->>TabManager: update setting
TabManager->>FocusHistoryModel: use workspacesOnly scope
TabManager->>Workspace: provide settings source
Workspace->>DockSplitStore: create with settings
DockSplitStore->>FocusHistoryModel: use configured scope
User->>DockSplitStore: invoke focus-history shortcut
DockSplitStore->>FocusHistoryModel: navigate back or forward
FocusHistoryModel-->>DockSplitStore: skip same-workspace entries
Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (23 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Greptile SummaryThis PR adds a setting that limits focus-history navigation to workspaces. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (14): Last reviewed commit: "Import Foundation in history scope tests" | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cmuxTests/TabManagerSessionSnapshotTests.swift`:
- Around line 138-151: Update
testRestoredWorkspaceDockUsesInjectedFocusHistorySetting to inject false for
focusHistoryIncludesPanesAndTabs instead of true, and assert the restored
workspace dock reports false. Keep the existing injected
UserDefaultsSettingsClient and snapshot/restore flow unchanged so the test
distinguishes injected settings from the default.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: d8fe91ea-5715-460c-b7bd-7f0f98691562
📒 Files selected for processing (3)
Sources/TabManager+DetachedWorkspace.swiftSources/TabManager.swiftcmuxTests/TabManagerSessionSnapshotTests.swift
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Adds an App setting that switches focus-history navigation between panes/tabs/workspaces and workspaces only. The runtime reads the setting on every history action, so changing it applies immediately without clearing recorded history. Dock-focused history shortcuts fall through to workspace navigation in workspace-only mode.
Tests:
swift testinPackages/macOS/CmuxWorkspacesswift testinPackages/macOS/CmuxSettingsswift testinPackages/macOS/CmuxSettingsUIhistwsNeed help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Adds a setting to scope focus-history navigation. Default is workspaces only; changes apply instantly across the app and Dock, and Dock back/forward falls back to workspace navigation when pane/tab history is off.
app.focusHistoryIncludesPanesAndTabs, default off) inCmuxSettings/CmuxSettingsUI; searchable with curated synonyms and localized (EN/JA).CmuxWorkspaces:FocusHistoryModelaccepts a livenavigationScope(FocusHistoryNavigationScope) read on each action. Workspaces-only mode skips same-workspace entries, collapses menu items to workspaces, uses the workspace’s remembered panel, and preserves forward workspace history after pane focus.TabManager,Workspace, andDockSplitStorederive scope from settings and bumpfocusHistoryRevisionwhen it changes; restored/detached workspaces and the window Dock inherit the setting; Dock focus-history shortcuts fall back to workspace navigation in workspaces-only mode.cmux.json/schema: addedapp.focusHistoryIncludesPanesAndTabsmapping, schema entry, and default template.Written for commit 1398848. Summary will update on new commits.
Summary by CodeRabbit