Skip to content

test: give the Cloud Desktop fixture a routable window for pane drops - #14304

Merged
teamleaderleo merged 4 commits into
mainfrom
test/cloud-desktop-drop-routable-window
Sep 25, 2026
Merged

teamleaderleo merged 4 commits into
mainfrom
test/cloud-desktop-drop-routable-window

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

"A queued Desktop click retains its same-VM destination like a drop" fails its drop on main in all four argument cases (every main run since 35979983434, including PR run 36023014704): the catalog keeps one projection and CloudDesktopOpenFixture.swift:155 didCommit is false.

The drop targets .split(targetPane:). SurfacePaneFactory.anchorSurface resolves that pane through TerminalController.v2LocatePane, which walks listMainWindowSummaries, and that list skips a registered context without a window. VaultPaneAppFixture registers its context with window: nil, so the lookup returns nil, the factory throws paneNotFound, and handleSurfaceResourceDrop's Task swallows the error. The click half of the test targets .workspace(_, .split), never locates a pane, and still passes.

This is a fixture gap, not a product regression: no routing or factory code changed. The suite failed 4/4 when #14076's changed-suites lane ran it alone (job 107549099765, reported green because that lane does not gate), and it hung once on main before #14076 (run 35862070143). Earlier full shards passed it, so the outcome depended on what ran before it.

The fixture now gives its context a task-owned NSWindow, forgets the route and closes the window on teardown, and requires the pane lookup before dropping so a routing failure is reported at the lookup instead of after the 10 s commit deadline. Once the window is routable, the suite's opens and drops would focus it (focusMainWindow -> makeKeyAndOrderFront), so the fixture's own delegate gets a visibility controller with activation suppressed, and the suite expects the window to stay hidden and not key around every action. That stub needs AppDelegate.mainWindowVisibilityController to be internal instead of private; nothing else in Sources/ changes. #13938 makes the same registration and the same one-word access change as part of a larger PR; this lands the test fix alone.

It also removes the test from scripts/ci/app-host-known-failures.json (tracked in #13879), so the changed-suites ratchet requires it to pass instead of tolerating it. That tolerance is why #14076's lane went green with the suite failing.

Validation: not built on this Mac. This diff routes CloudDesktopOpenActionTests into the app-host changed-suites lane; that run is the proof.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Fixes the Cloud Desktop fixture so "A queued Desktop click retains its same-VM destination like a drop" passes on main instead of timing out.

The drop's v2LocatePane lookup returned nil because the fixture registered its context without a window, and the drop's Task swallowed the resulting paneNotFound error. The fixture now gives its context a task-owned NSWindow that is never shown, stubs the visibility controller with activation suppressed so focus requests can't reveal it, and forgets the route and closes the window on teardown. The suite asserts the window stays hidden and never key after every action, including right after fixture init, and drop requires the pane lookup, route, and drop acceptance to match the fixture before proceeding. capturesClickDestination is removed from the known-failure catalog so the changed-suites run must actually pass. This is a fixture gap, not a product regression.

Written for commit 77b1305. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Tests
    • Expanded automated checks for opening desktop content in a hidden window, including verification that the intended pane receives the drop and the window remains hidden.
    • Removed a previously recorded test failure for capturing click destinations.

"A queued Desktop click retains its same-VM destination like a drop"
fails its drop on main (every case since run 35979983434): the catalog
keeps one projection and the commit wait times out after 10s.

The drop targets `.split(targetPane:)`. SurfacePaneFactory resolves that
pane's anchor through TerminalController.v2LocatePane, which walks
listMainWindowSummaries. That list skips any registered context without
a window, and VaultPaneAppFixture registers its context with
`window: nil`. So the lookup returns nil, the factory throws
paneNotFound, and handleSurfaceResourceDrop's Task swallows the error.
The click path is unaffected because it targets `.workspace(_, .split)`
and never locates a pane.

The same suite failed 4/4 run on its own in #14076's changed-suites lane
and hung once on main before that (run 35862070143), so it depended on
test order rather than on a product change.

Give the fixture's context a task-owned NSWindow that is never shown,
forget its route on close, and require the pane lookup before the drop
so a routing failure is reported where it happens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 08d578d8-9240-4c0b-b7c3-e6da0c84208a

📥 Commits

Reviewing files that changed from the base of the PR and between 664561d and 77b1305.

📒 Files selected for processing (1)
  • cmuxTests/CloudDesktopOpenFixture.swift

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: cdd4d80a-97d6-400a-8575-7b935f9b6845

📥 Commits

Reviewing files that changed from the base of the PR and between b56cb4f and 664561d.

📒 Files selected for processing (3)
  • Sources/AppDelegate.swift
  • cmuxTests/CloudDesktopOpenFixture.swift
  • scripts/ci/app-host-known-failures.json
💤 Files with no reviewable changes (1)
  • scripts/ci/app-host-known-failures.json

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change exposes mainWindowVisibilityController and updates the cloud desktop test fixture to create and verify a hidden, routable window during open and drop operations. It also removes a known-failure entry for a cloud desktop action test.

Changes

Cloud desktop open fixture

Layer / File(s) Summary
Hidden-window routing and drop validation
Sources/AppDelegate.swift, cmuxTests/CloudDesktopOpenFixture.swift, scripts/ci/app-host-known-failures.json
mainWindowVisibilityController changes from private to internal. The fixture creates a hidden window, verifies its routing and drop result, and removes its route during cleanup. The known-failure entry is removed.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Suggested reviewers: austinywang

Merge Risk: ⚪ Minimal · up to 66456

The fixture’s hidden-window routing and cleanup show no identified merge-blocking issue. The changed suites still need to run as planned.

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ❓ Inconclusive Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Cloud Persistent Session And Early Input ✅ Passed PASS. The diff does not change Cloud terminal creation, cmux-tui transport, manual renderer admission, readiness, input ownership, or auth/idempotency/revision/lease handling. It only makes `AppDelega…
Cmux Swift Actor Isolation ✅ Passed PASS. The only production Swift change is private to internal for AppDelegate.mainWindowVisibilityController. AppDelegate and MainWindowVisibilityController are already explicitly `@MainActo…
Cmux Swift Blocking Runtime ✅ Passed PASS: The only production Swift change is the private→internal access change for AppDelegate.mainWindowVisibilityController. It does not add or expand blocking or timing synchronization. The new…
Cmux Browser Automation Off-Main ✅ Passed The check is not triggered. The PR changes only Sources/AppDelegate.swift, cmuxTests/CloudDesktopOpenFixture.swift, and the known-failure catalog. The diff contains no browser.* command, WebKit …
Cmux Expensive Synchronous Load ✅ Passed The pull request does not add or move an expensive synchronous agent-history load. The only production Swift change changes AppDelegate.mainWindowVisibilityController from private to internal; t…
Cmux Cache Substitution Correctness ✅ Passed The check does not apply to this diff. The only production Swift change changes AppDelegate.mainWindowVisibilityController from private to internal; it does not replace an authoritative read wit…
Cmux No Hacky Sleeps ✅ Passed PASS: The diff changes only Swift production visibility, Swift test scaffolding, and a JSON known-failure catalog. It introduces no TypeScript, JavaScript, shell, or build/runtime-script sleeps, timer…
Cmux Algorithmic Complexity ✅ Passed PASS. The only production Swift change exposes AppDelegate.mainWindowVisibilityController; it adds no collection processing or algorithmic path. The new first lookup and related operations are con…
Cmux Swift Concurrency ✅ Passed The PR does not introduce a flagged legacy async pattern. The only new Swift behavior is test-fixture window setup, routing checks, visibility assertions, and a visibility-controller injection. The fi…
Cmux Swift @Concurrent ✅ Passed PASS. The Swift diff adds no @concurrent or nonisolated async declaration. CloudDesktopOpenFixture remains @MainActor, so its waitForOpen() and drop() methods intentionally inherit UI isol…
Cmux Swift Package Boundaries ✅ Passed PASS. The only production Swift change is private to internal on AppDelegate.mainWindowVisibilityController. It adds no feature or reusable domain logic and is app-lifecycle composition. The oth…
Cmux Swiftpm Lockfiles ✅ Passed PASS. The pull request changes only Sources/AppDelegate.swift, cmuxTests/CloudDesktopOpenFixture.swift, and scripts/ci/app-host-known-failures.json. It changes no Package.swift, `Package.resol…
Cmux Swift Logging ✅ Passed The only production Swift change exposes AppDelegate.mainWindowVisibilityController as internal; it adds no logging. The other Swift changes are in cmuxTests and contain no logging statements. N…
Cmux User-Facing Error Privacy ✅ Passed PASS. The diff changes one production declaration from private to internal so tests can inject MainWindowVisibilityController. The remaining changes are in `cmuxTests/CloudDesktopOpenFixture.swi…
Cmux Full Internationalization ✅ Passed The diff introduces no user-facing production text or localization keys. The only production change is changing AppDelegate.mainWindowVisibilityController from private to internal; its existing …
Cmux Swiftui State Layout ✅ Passed PASS. The diff adds no SwiftUI state or layout pattern covered by the rule. Sources/AppDelegate.swift only changes access for an existing MainWindowVisibilityController. `CloudDesktopOpenFixture.s…
Cmux Architecture Rethink ✅ Passed PASS. The Swift diff is a small test-fixture correctness fix. It adds one task-owned hidden NSWindow to the existing main-window context so v2LocatePane can resolve the target pane, and it injects…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS. The only new NSWindow is in cmuxTests/CloudDesktopOpenFixture.swift, where it is explicitly hidden, non-key, and used only by CloudDesktopOpenActionTests. The rule explicitly allows test-onl…
Cmux Source Artifacts ✅ Passed The diff changes only Sources/AppDelegate.swift, cmuxTests/CloudDesktopOpenFixture.swift, and scripts/ci/app-host-known-failures.json. These are hand-written product/test source and CI configura…
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS. The only production change is Sources/AppDelegate.swift, which widens mainWindowVisibilityController from private to internal. The test target accesses it directly through `@testable imp…
Title check ✅ Passed The title clearly and concisely describes the main change: making the Cloud Desktop fixture use a routable window for pane drops.
Description check ✅ Passed The description explains the failure, root cause, fixture changes, known-failure removal, and validation status. It is detailed and relevant, although it does not use the template headings or include …
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. (1 skipped: 1 too large.)

✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

With a routable window, the opens and drops in this suite request focus,
and focusMainWindow now resolves the fixture window and would order it
front and make it key on a shared app-host runner. Stub the fixture
delegate's visibility controller with activation suppressed, as #13938
does, which needs the property to be internal instead of private, and
expect the window to stay hidden and not key around every action.

Also require the drop to be accepted and the located route to match the
fixture's manager and pane.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo enabled auto-merge (squash) September 24, 2026 23:13
teamleaderleo and others added 2 commits September 24, 2026 19:16
With the fixture fixed, capturesClickDestination must pass instead of
being tolerated as a known main failure, so this PR's changed-suites
run proves the fix rather than passing either way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Swift rejects a method call on self before every stored property is set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo merged commit 3d5b648 into main Sep 25, 2026
54 checks passed
@teamleaderleo
teamleaderleo deleted the test/cloud-desktop-drop-routable-window branch September 25, 2026 00:02
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 25, 2026
3d5b648 test: give the Cloud Desktop fixture a routable window for pane drops (manaflow-ai#14304)
9d53af4 ci: give a refused owned job one more try on the fleet before Blacksmith (manaflow-ai#14312)
379091b ci: let PR runs overflow to macOS 15 at 4 queued jobs deeper, not 12 (manaflow-ai#14319)
df6efb5 test(cloud): key the refresh URL protocol stub per request, not by address (manaflow-ai#14239)
51bd322 ci: build only the CLI product for CLI-only changes (manaflow-ai#14212)
0345a5c ci: make a changed-suites run prove a known-failure fix (manaflow-ai#14307)
370b7f6 ci: fix the owned build state save step's argument count (manaflow-ai#14309)
319adff test: wait for the SSH cleanup policy bound after a restored-attach signal (manaflow-ai#14305)
0cc5be3 fix(portal): flush the coalesced live-resize pass on its first hop (manaflow-ai#14297)
5887891 test(minimal-mode): measure the toggle only after setup stops re-rendering (manaflow-ai#14298)
5fbcc48 ci: charge newer PR runs what they took on the owned pool, not a guess (manaflow-ai#14300)

# Conflicts:
#	.github/workflows/ci-macos.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant