iOS: inline Move to Group context-menu picker for workspaces - #9779
Conversation
Long-pressing a workspace row now offers a Move to Group submenu (one item per group on the workspace's Mac, current membership checked and disabled) plus Remove from Group, so a workspace can join a group without drag-and-drop. Selection routes through the same MobileWorkspaceMovePolicy intent + optimistic joinGroupAtEnd path as dropping a row onto a group, and reuses drag gating, so the picker can never offer a move the drop path would reject. Covers both the UIKit table pipeline and the SwiftUI row context menu. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughAdds a public group-move menu model for iOS workspaces. The UI displays valid group targets and removal actions in context menus. Workspace list callbacks route selections to group joining or removal. Tests and localized strings cover the new behavior. ChangesWorkspace group movement
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning, 1 inconclusive)
✅ Passed checks (22 passed)
✨ Finishing Touches 💡 1📝 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 |
Moving a workspace into a group on iOS previously required drag-and-drop, which is fiddly on the phone and impossible when a drag is hard to start (long lists, collapsed groups). Long-pressing a workspace row now shows a Move to Group submenu with one entry per workspace group on that Mac; the current group renders checked and disabled, and grouped workspaces also get Remove from Group.
Selection routes through the exact drag-and-drop path:
MobileWorkspaceMovePolicy.normalizedIntentfor validity, the optimisticjoinGroupAtEndmove chain, and the existingworkspace.moveRPC, so the picker can never offer a move the drop path would reject, and gating (pending-move cap, search/filter flattening, foreground-Mac-only mutations in All Computers) is identical. A new pure model,MobileWorkspaceGroupMoveMenu, computes the entries (same-Mac filtering with the aggregation empty-vs-nil stamp quirk handled) and is unit-tested; the picker appears in both row pipelines (UIKit table coordinator context menu and the SwiftUI row.contextMenu).Anchor workspaces get no picker (an anchor moves with its group, matching the host's
workspace.moverejection).Remove from Groupmaps toworkspace.movewithoutgroup_id, which the host resolves as ungroup + move to end of the root list — the same order the optimistic prediction applies locally.Localization:
mobile.workspace.moveToGroupandmobile.workspace.removeFromGroupadded to the iOS catalog (en, ja), matching the macOS sidebar's existingcontextMenu.workspaceGroup.moveTo/.removestrings.Tests: 9 new
MobileWorkspaceGroupMoveMenuTests(all 247 CmuxMobileShellModel tests green locally) and a coordinator test asserting the submenu structure per capability/anchor/grouped state.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Touches workspace list mutation UX and extends the grouped move path, but actions still go through the established policy, optimistic ordering, and
workspace.moveRPC with capability and Mac-scoping gates.Overview
Adds a Move to Group context-menu path on iOS workspace rows so grouping no longer depends on drag-and-drop alone.
A new
MobileWorkspaceGroupMoveMenumodel builds picker entries (same-Mac groups, current group checked/disabled, Remove from Group when valid) usingMobileWorkspaceMovePolicy.normalizedIntent, matching drag-and-drop rules. Anchor workspaces get no menu; orphangroupIDvalues cannot remove until the group exists in the snapshot.joinGroupAtEndnow accepts an optional group id (nil= leave group) and is shared by drop-into-group and the menu. The UIKit table coordinator and SwiftUIWorkspaceNavigationRowboth wire lazygroupMoveMenu/moveToGroupcallbacks with the same reorder gating as drags. English and Japanese strings were added for the new menu labels.Reviewed by Cursor Bugbot for commit b6d07f4. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Adds an inline “Move to Group” context-menu picker on iOS so a workspace can join or leave a group without drag-and-drop. Keeps move behavior identical to drag-and-drop, including gating and ordering.
MobileWorkspaceMovePolicy+ optimisticjoinGroupAtEnd+workspace.moveRPC, so invalid moves are never offered..contextMenu.mobile.workspace.moveToGroupandmobile.workspace.removeFromGroup, plus unit/UI tests for menu logic and structure.Written for commit b6d07f4. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes
Tests