Repository navigation
Keep Cloud manual input focus aligned with the active pane - #16271
Conversation
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. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (3)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 (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughTerminal input handling invokes a panel callback for cloud manual-mirror sessions. The callback checks whether the session is active, focuses the panel in its current workspace, and runs explicit-input handling. Pointer-down focus activation delegates to the workspace’s terminal-input focus method. ChangesCloud Manual-Mirror Focus Routing
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant TerminalPanel
participant WorkspaceAttentionFlashRouting
participant WorkspaceCloudManualMirror
participant Workspace
TerminalPanel->>WorkspaceAttentionFlashRouting: process explicit input
WorkspaceAttentionFlashRouting->>TerminalPanel: invoke manual-mirror callback
TerminalPanel->>WorkspaceCloudManualMirror: run bound convergence callback
WorkspaceCloudManualMirror->>Workspace: resolve current workspace and focus panel
WorkspaceCloudManualMirror->>WorkspaceCloudManualMirror: call onExplicitInput
Suggested reviewers: Merge Risk: ⚪ Minimal · up to Cloud terminal input continues to deliver its existing effects while focusing the panel in its current workspace, including after a move. No material merge blocker was identified. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change preserves workspace ownership and active-session checks, with no demonstrated security bypass. Risk is limited, but the trust assumptions for programmatic terminal input remain unverified. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 23 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (23 passed)
Full details: Description checkExplanation The description explains the problem, fix, and validation, but it does not use the required Summary, Testing, Changelog, Demo Video, or Checklist sections. It also does not include the required demo evidence for this behavior change.
✨ 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 |
|
All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
e5fdab1 to
c3cf1d7
Compare
There was a problem hiding this comment.
All reported issues were addressed across 5 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Dogfood tours of
|
CI failure attributionCI failed on
Matched log linesNot re-run automatically: Written by |
|
Merge receipt for
Labeled |
…ver ran (#16539) * test(cloud): find Cloud header actions through accessibility, not NSButton #16202 added the wide/narrow Cloud header tests and merged without the app-host suite running. They searched the hosting view's subviews for NSButton, but the header's refresh, new machine and overflow controls are SwiftUI views that AppKit never backs with an NSButton, so both tests found nothing at either width. The inline buttons now carry accessibility identifiers, and both tests walk the accessibility tree with the CloudTreeHeaderActionsTests helpers, the way the other Cloud header tests already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FrR7YbsQtGw2eFtDeyiTcK * test(cloud): focus the destination terminal before moved-panel input #16271 added "Cloud terminal input reasserts the active pane" and merged without the app-host suite running. After moving the Cloud panel into a new workspace with focus: false, the test expected the destination's own terminal to stay focused. Bonsplit's createTab selects the tab it creates, so the moved panel is already the selected tab of the destination's only pane, and the precondition never held. The test now focuses the destination's local terminal first, so the next explicit input still proves the moved panel's hook pulls focus back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FrR7YbsQtGw2eFtDeyiTcK * test(cloud): enable SwiftUI accessibility and poll in the header width tests The header tests read SwiftUI's accessibility tree once, after a 50ms run loop tick, without accessibilityEnabled, and found no elements. Mirror CloudTreeHeaderActionsTests: enable accessibility on the root and poll with AppKitTestEventPump until the tree is published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FrR7YbsQtGw2eFtDeyiTcK * test(cloud): disable the two never-passing header width tests Both came from #16202, which merged without an app-host run. Even with accessibility enabled and a 5s poll, the standalone NSHostingView exposes no SwiftUI accessibility elements, so they fail on every run. Disable them with the reason so the rest of main's suite is green; the focus test fix in this PR stays active. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FrR7YbsQtGw2eFtDeyiTcK --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Problem
A Cloud manual-mirror terminal can accept a key or paste while its portal focus callback is one reconciliation turn behind. The remote pane then receives input while the adjacent local pane remains the workspace's focused panel, leaving the active pane border and keyboard ownership out of sync.
Fix
Workspace.focusPanelFromTerminalInput.Validation
python3 scripts/verify-local.py --affected mf/main(3/3)swiftc -parse Sources/Workspace.swift Sources/GhosttyNSView+PointerFocusActivation.swift Sources/Surfaces/CmuxTuiSurfaceProvider+ManualMirror.swift cmuxTests/SurfacePaneFactoryFocusTests.swiftgit diff --checkRelated to #15972.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit