Skip to content

fix(tests): cmuxTests compiles on main again (two missing lines from #11059 and #11345) - #11346

Merged
austinywang merged 2 commits into
mainfrom
fix/markdown-renderer-memberwise-init
Sep 1, 2026
Merged

austinywang merged 2 commits into
mainfrom
fix/markdown-renderer-memberwise-init

Conversation

@austinywang

@austinywang austinywang commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The cmuxTests target does not compile on main; ci.yml only runs on Ghostty-related paths for PRs, so every hosted test-e2e.yml dispatch on main fails before running a test. Two one-line fixes:

  1. cmuxTests/SidebarFileDropFindRoutingTests.swift — Hand keyboard focus to the opened panel after a right-sidebar file drop #11059 added the file using BonsplitController.ExternalFileDropRequest without import Bonsplit:
    cmuxTests/SidebarFileDropFindRoutingTests.swift:58:17: error: cannot find 'BonsplitController' in scope
    
  2. cmuxTests/CloudTreeNativeDragOwnershipTests.swift — Cloud tree agent parity: combined follow-ups (#11300 + #11301) + one-click workspace rows #11345 added CloudTreeNodeActions.projectInLocalWorkspace but the test fixture kept the old memberwise shape:
    cmuxTests/CloudTreeNativeDragOwnershipTests.swift:273:32: error: missing argument for parameter 'projectInLocalWorkspace' in call
    

The two app-target fixes this PR originally carried already landed on main via #11345. Lane evidence: the run with only fix 1 (33480811497) cleared the Bonsplit error and stopped at error 2.

Test plan

  • hosted test-e2e.yml lane on this SHA compiles cmuxTests and executes cmuxTests/CmuxTuiSurfaceProviderTests

🤖 Generated with Claude Code

https://claude.ai/code/session_01UAmvJXcShMJwi1UcLirYAK

@vercel

vercel Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cmux166 Building Building Preview Sep 1, 2026 7:23am UTC
cmux41 Building Building Preview Sep 1, 2026 7:23am UTC

@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: dc72187c-6548-4a35-b607-b804f5e04f4a

📥 Commits

Reviewing files that changed from the base of the PR and between 59a006e and f49b2f6.

📒 Files selected for processing (1)
  • Sources/Panels/BrowserPopupWindowController.swift

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


📝 Walkthrough

Walkthrough

Changes

Renderer and browser updates

Layer / File(s) Summary
Make attachment callback mutable
Sources/Panels/MarkdownWebRenderer.swift
Changes onViewAttachedToWindow from let to var, allowing reassignment after initialization.
Import browser module
Sources/Panels/BrowserPopupWindowController.swift
Adds the CmuxBrowser module import to the popup window controller.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to f49b2

The changes are localized compile fixes with no actionable merge-blocking risk remaining; the PR is merge-ready after normal checks and review.

Suggested reviewers: lawrencecchen

🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description provides a useful summary and identifies the two compilation errors, but it does not follow the required template. It lacks the Testing section with completed results, the review trigg… Add the required Testing section with actual test results, complete the applicable checklist items, and include the Review Trigger block or confirm that bot reviews were requested. State whether a Demo Video is not applicable because this c…
✅ Passed checks (13 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 Swift Actor Isolation ✅ Passed PASS. The PR changes only a closure property mutability and adds a module import. MarkdownWebRenderer is an NSViewRepresentable UI wrapper, and its callback is assigned to @MainActor `MarkdownWe…
Cmux Swift Blocking Runtime ✅ Passed PASS: The PR changes only a stored-property declaration (let to var) and adds import CmuxBrowser. The full PR diff introduces no semaphores, waits, sleeps, delayed dispatch, timers, polling loop…
Cmux Browser Automation Off-Main ✅ Passed PASS: The PR changes only Sources/Panels/MarkdownWebRenderer.swift (let to var) and adds import CmuxBrowser in Sources/Panels/BrowserPopupWindowController.swift. It does not change browser s…
Cmux Expensive Synchronous Load ✅ Passed PASS: The full PR diff changes only one stored-property mutability declaration and adds one import. It adds no agent-history loader, transcript/trajectory/workstream JSONL read, directory scan, per-re…
Cmux Cache Substitution Correctness ✅ Passed PASS: The complete PR diff contains only a Swift import addition and a let→var change for MarkdownWebRenderer.onViewAttachedToWindow. The callback is wired to WKWebView lifecycle handling, and…
Cmux No Hacky Sleeps ✅ Passed PASS. The pull request changes only two Swift source files. The diff changes let to var in MarkdownWebRenderer and adds import CmuxBrowser in BrowserPopupWindowController. It introduces no `…
Cmux Algorithmic Complexity ✅ Passed PASS. The verified PR diff changes only one stored-property modifier and adds one import. It introduces no loops, collection scans, sorting, filtering, joins, or other algorithmic work. The existing c…
Cmux Swift Concurrency ✅ Passed PASS: The pull request changes only one stored-property declaration (let to var) and adds import CmuxBrowser. The diff adds no Dispatch queues, Combine state, completion-handler API, or fire-and…
Cmux Swift @Concurrent ✅ Passed PASS — The PR diff contains only a stored-property mutability change (let to var) in MarkdownWebRenderer and one module import in BrowserPopupWindowController. It adds no async, `nonisolated…
Cmux Swift Package Boundaries ✅ Passed PASS. The PR changes only a closure property mutability (let to var) in an NSViewRepresentable and adds an import for an existing CmuxBrowser package type. The renderer callback is AppKit/Swif…
Title check ✅ Passed The title clearly identifies the primary change: restoring cmuxTests compilation on main. It is specific and related to the two missing fixes described in the pull request.
Full details: Cmux Swift Actor Isolation

Explanation

PASS. The PR changes only a closure property mutability and adds a module import. MarkdownWebRenderer is an NSViewRepresentable UI wrapper, and its callback is assigned to @MainActor MarkdownWebView; the change introduces no background access, service protocol isolation, or shared mutable Sendable reference type. BrowserPopupWindowController was already @MainActor, and import CmuxBrowser only resolves BrowserAppLinkOpenRequest. No explicit actor-isolation failure condition is introduced or worsened.

Full details: Cmux Swift Blocking Runtime

Explanation

PASS: The PR changes only a stored-property declaration (let to var) and adds import CmuxBrowser. The full PR diff introduces no semaphores, waits, sleeps, delayed dispatch, timers, polling loops, synchronous main-queue calls, or manual locks. The existing without polling comment is unchanged context, not new synchronization code.

Full details: Cmux Browser Automation Off-Main

Explanation

PASS: The PR changes only Sources/Panels/MarkdownWebRenderer.swift (let to var) and adds import CmuxBrowser in Sources/Panels/BrowserPopupWindowController.swift. It does not change browser socket commands, processV2Command, socketWorkerMethods, the worker router, or policy tests. The added import only resolves existing BrowserAppLinkOpenRequest uses. Therefore, the custom browser automation off-main failure conditions are not introduced or worsened.

Full details: Cmux Expensive Synchronous Load

Explanation

PASS: The full PR diff changes only one stored-property mutability declaration and adds one import. It adds no agent-history loader, transcript/trajectory/workstream JSONL read, directory scan, per-record syscall, or large JSON parse. Existing Task.detached, Data(contentsOf:), and JSONSerialization uses in MarkdownWebRenderer.swift are unchanged and therefore do not trigger this check.

Full details: Cmux Cache Substitution Correctness

Explanation

PASS: The complete PR diff contains only a Swift import addition and a let→var change for MarkdownWebRenderer.onViewAttachedToWindow. The callback is wired to WKWebView lifecycle handling, and no persistence, history, undo, snapshot, authoritative read, or cache substitution changes are present.

Full details: Cmux No Hacky Sleeps

Explanation

PASS. The pull request changes only two Swift source files. The diff changes let to var in MarkdownWebRenderer and adds import CmuxBrowser in BrowserPopupWindowController. It introduces no sleep, timer, polling, fixed delay, or wall-clock wait. The custom check applies to non-Swift TypeScript, JavaScript, shell, and build/runtime changes, so its failure condition is not present.

Full details: Cmux Algorithmic Complexity

Explanation

PASS. The verified PR diff changes only one stored-property modifier and adds one import. It introduces no loops, collection scans, sorting, filtering, joins, or other algorithmic work. The existing collection traversal in MarkdownWebRenderer.swift is unchanged, so the complexity rule's “existing inefficient code not worsened” pass condition applies.

Full details: Cmux Swift Concurrency

Explanation

PASS: The pull request changes only one stored-property declaration (let to var) and adds import CmuxBrowser. The diff adds no Dispatch queues, Combine state, completion-handler API, or fire-and-forget Task. The existing onViewAttachedToWindow closure is an AppKit/SwiftUI view-attachment callback, which is an allowed boundary.

Full details: Cmux Swift `@Concurrent`

Explanation

PASS — The PR diff contains only a stored-property mutability change (let to var) in MarkdownWebRenderer and one module import in BrowserPopupWindowController. It adds no async, nonisolated, @concurrent, actor-isolation, or async call-site changes. Existing async code in the changed files is unchanged, so the Swift @concurrent failure conditions are not introduced or expanded.

Full details: Cmux Swift Package Boundaries

Explanation

PASS. The PR changes only a closure property mutability (let to var) in an NSViewRepresentable and adds an import for an existing CmuxBrowser package type. The renderer callback is AppKit/SwiftUI view-lifecycle glue, and BrowserPopupWindowController is an NSPanel/WebKit controller. The diff introduces no independently testable domain logic in the app target. BrowserAppLinkOpenRequest already resides behind the CmuxBrowser SwiftPM target, which has its own test target.

Full details: Description check

Explanation

The description provides a useful summary and identifies the two compilation errors, but it does not follow the required template. It lacks the Testing section with completed results, the review trigger, and the checklist.

Resolution

Add the required Testing section with actual test results, complete the applicable checklist items, and include the Review Trigger block or confirm that bot reviews were requested. State whether a Demo Video is not applicable because this change has no UI or behavior change.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/markdown-renderer-memberwise-init

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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

austinywang added a commit that referenced this pull request Sep 1, 2026
A `let` with a default value is excluded from Swift's synthesized
memberwise initializer, so MarkdownPanelView's
`onViewAttachedToWindow:` argument (added in #11059) does not compile.
Mirrors #11346 so this branch builds before that fix lands on main; the
hunks are identical and merge cleanly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01886xVcepPfsLRFCrFXLh1M
austinywang added a commit that referenced this pull request Sep 1, 2026
…ewAttachedToWindow; BrowserPopupWindowController imports CmuxBrowser

Same fixes as #11346 and #11337, carried here so this branch builds until they land.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019r7uFvnarRZdeg3TugREt7
@austinywang austinywang changed the title fix(markdown): main does not compile since #11059 (onViewAttachedToWindow memberwise init) fix: main does not compile since #10634 and #11059 (two one-line fixes) Sep 1, 2026
@austinywang

Copy link
Copy Markdown
Contributor Author

Second break found once the first was fixed: BrowserPopupWindowController.swift:491: cannot find 'BrowserAppLinkOpenRequest' in scope (#10634 used the CmuxBrowser type without importing the module). Added import CmuxBrowser as a second commit. Swift reports one batch's errors at a time, so there may be more behind this one; the hosted lane run on this SHA will tell.

@austinywang austinywang mentioned this pull request Sep 1, 2026
3 of 8 tasks
@austinywang

Copy link
Copy Markdown
Contributor Author

Third break, in the test target this time (the app target compiles as of the previous commit): cmuxTests/SidebarFileDropFindRoutingTests.swift:58: cannot find 'BonsplitController' in scope — #11059 added the test without import Bonsplit. Added as a third commit; lane re-dispatched on this SHA.

austinywang added a commit that referenced this pull request Sep 1, 2026
The test (added in #11059) uses BonsplitController without importing the
module, so the cmux-unit scheme does not compile on main. Mirrors the
identical hunk in #11346.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01886xVcepPfsLRFCrFXLh1M
@austinywang
austinywang force-pushed the fix/markdown-renderer-memberwise-init branch from 60a635e to 492b2b1 Compare September 1, 2026 07:09
@austinywang austinywang changed the title fix: main does not compile since #10634 and #11059 (two one-line fixes) fix(tests): SidebarFileDropFindRoutingTests imports Bonsplit so cmuxTests compiles on main Sep 1, 2026
austinywang added a commit that referenced this pull request Sep 1, 2026
* test: cover paid-only Cloud VM provisioning

* vm: enforce paid-plan provisioning by default

* test: cover localized vm_requires_pro copy and a failing free-provisioning env audit

Review follow-ups for #11332. These fail until the next commit: the audit
script only listed CMUX_VM_ALLOW_FREE_PROVISIONING for presence and could
not fail on a permissive value, and vm_requires_pro returned hardcoded
English regardless of the request locale.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01886xVcepPfsLRFCrFXLh1M

* vm: localize the Pro gate response and fail the env audit on free provisioning

Address review findings on #11332:

- vm_requires_pro copy now comes from the vmErrors.requiresPro catalog in
  all 20 locales; resolveVmProvisioningAccountScope is async and reads the
  request locale. upgradeUrl/upgradeRequired stay locale-free.
- audit-vercel-env.mjs fails when CMUX_VM_ALLOW_FREE_PROVISIONING is
  permissive or a lone legacy CMUX_VM_REQUIRE_PRO=0 reopens free
  provisioning (freeProvisioningAudit.mjs mirrors the runtime predicate,
  pinned by a parity test). The key is no longer "recommended".
- Settings' Cloud machines plan summary reuses MachinePlanSnapshot
  .isPaidPlanID so it agrees with the Machines panel on unknown plan ids.
- The new paid-plan tests move into a Swift Testing suite.
- Rollout checklist documents the legacy alias precedence.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01886xVcepPfsLRFCrFXLh1M

* browser: import CmuxBrowser in BrowserPopupWindowController

BrowserAppLinkOpenRequest (CmuxBrowser package) has been used here since
#10634, but this file never imported the module, so the tagged Debug
build fails with "cannot find 'BrowserAppLinkOpenRequest' in scope". The
sibling users (BrowserPanel, BrowserNavigationDelegate) already import it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01886xVcepPfsLRFCrFXLh1M

* markdown: make onViewAttachedToWindow a memberwise-init parameter

A `let` with a default value is excluded from Swift's synthesized
memberwise initializer, so MarkdownPanelView's
`onViewAttachedToWindow:` argument (added in #11059) does not compile.
Mirrors #11346 so this branch builds before that fix lands on main; the
hunks are identical and merge cleanly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01886xVcepPfsLRFCrFXLh1M

* vm: localize the vm_requires_pro display title

ui.title fell back to the English status-based default ("Cloud VM limit
reached"), so non-English clients got a mixed-language upgrade prompt.
vmErrors.requiresPro now carries a title in every catalog and
vmRequiresProResponse passes it as displayTitle; the locale tests assert
ui.title per catalog and at the route level.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01886xVcepPfsLRFCrFXLh1M

* tests: import Bonsplit in SidebarFileDropFindRoutingTests

The test (added in #11059) uses BonsplitController without importing the
module, so the cmux-unit scheme does not compile on main. Mirrors the
identical hunk in #11346.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01886xVcepPfsLRFCrFXLh1M

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
austinywang and others added 2 commits September 1, 2026 00:22
…tController)

#11059 added this test file using BonsplitController.ExternalFileDropRequest
without importing Bonsplit, so the cmuxTests target does not compile on main:

  cmuxTests/SidebarFileDropFindRoutingTests.swift:58:17: error: cannot find 'BonsplitController' in scope

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UAmvJXcShMJwi1UcLirYAK
…nLocalWorkspace

#11345 added CloudTreeNodeActions.projectInLocalWorkspace but the test fixture
still uses the old memberwise shape, so cmuxTests does not compile on main:

  cmuxTests/CloudTreeNativeDragOwnershipTests.swift:273:32: error: missing argument for parameter 'projectInLocalWorkspace' in call

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UAmvJXcShMJwi1UcLirYAK
@austinywang
austinywang force-pushed the fix/markdown-renderer-memberwise-init branch from 492b2b1 to d63f67f Compare September 1, 2026 07:23
@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot 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.

@austinywang austinywang changed the title fix(tests): SidebarFileDropFindRoutingTests imports Bonsplit so cmuxTests compiles on main fix(tests): cmuxTests compiles on main again (two missing lines from #11059 and #11345) Sep 1, 2026
austinywang added a commit that referenced this pull request Sep 1, 2026
…ests does not compile since #11059)

cmuxTests/SidebarFileDropFindRoutingTests.swift:58:17: error: cannot find
'BonsplitController' in scope

Same line as #11346.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AhsDDbUPPMnYKyTy7AXxBd
austinywang added a commit that referenced this pull request Sep 1, 2026
…le builds on this branch

Same lines as #11346 (the CloudTreeNodeActions fixture gained
projectInLocalWorkspace in #11345; SidebarFileDropFindRoutingTests needs
import Bonsplit after #11059). Whichever lands first, the other merges clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PEWn6ZZoGTAi67X3RSJ5aB
@austinywang
austinywang merged commit 983cccb into main Sep 1, 2026
9 of 11 checks passed
@austinywang
austinywang deleted the fix/markdown-renderer-memberwise-init branch September 1, 2026 07:44
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 1, 2026

This branch was successfully deployed

2 active deployments
Preview – cmux41 — d63f67fd Deployed Sep 1, 2026 by vercel[bot]
Preview – cmux166 — d63f67fd Deployed Sep 1, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant