Skip to content

fix: keep main windows out of fullscreen tiling - #12298

Merged
austinywang merged 2 commits into
mainfrom
issue-10894-windowserver-gesture-freeze
Sep 11, 2026
Merged

austinywang merged 2 commits into
mainfrom
issue-10894-windowserver-gesture-freeze

Conversation

@austinywang

@austinywang austinywang commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

What this fixes

Main cmux windows could enter macOS Full Screen Tile because the app only applied .fullScreenDisallowsTiling temporarily while creating a window from an existing fullscreen window. Once that temporary flag was removed, macOS could place the window in a managed tile Space, which can wedge Mission Control and horizontal Space navigation as reported in #10894.

Main windows now permanently opt out of Full Screen Tile while retaining native fullscreen support through .fullScreenPrimary.

Changes

  • Require .fullScreenDisallowsTiling in CmuxMainWindow.canonicalCollectionBehavior.
  • Remove the temporary fullscreen-source detection and delayed cleanup from AppDelegate.createMainWindow.
  • Add regression assertions for direct window construction and canonical behavior.
  • Remove the obsolete debug test seam and temporary-behavior test.

Verification

  • git diff --check
  • Tagged Debug build: ./scripts/reload.sh --tag issue10894-windowserver (still running locally)
  • Focused fullscreen capability tests are covered by CI.

Fixes #10894


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


Note

Low Risk
Localized AppKit window collection-behavior change with regression tests; trades optional Split View tiling for stable Space navigation in fullscreen.

Overview
Main windows now permanently opt out of macOS Full Screen Tile while keeping native fullscreen via .fullScreenPrimary, fixing Mission Control and Space navigation getting stuck (#10894).

Previously .fullScreenDisallowsTiling was only applied briefly when spawning a window from an existing native fullscreen window, then removed so Split View still worked. That let macOS move cmux into a managed tile Space after the flag cleared. The PR moves the opt-out into CmuxMainWindow.canonicalCollectionBehavior so every main window gets it at init, and deletes the fullscreen-source detection, post-create flag insertion, and delayed cleanup in AppDelegate.createMainWindow, along with the related debug override and tests.

Tests now assert tiling is disallowed by default on new main windows and that canonical behavior always includes the flag.

Reviewed by Cursor Bugbot for commit c5fef34. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Fixes #10894 by keeping main windows permanently out of macOS Full Screen Tile, which could wedge Mission Control and horizontal Space navigation when a window was created from an existing fullscreen window. Main windows now always carry .fullScreenDisallowsTiling while retaining native fullscreen support via .fullScreenPrimary.

  • Adds .fullScreenDisallowsTiling to CmuxMainWindow.canonicalCollectionBehavior permanently.
  • Removes the temporary fullscreen-source detection and delayed cleanup from AppDelegate.createMainWindow.
  • Replaces the temporary-behavior and debug-seam tests with regression assertions for the permanent behavior.

Written for commit c5fef34. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Prevented the main window from being placed in macOS Full Screen Tile Spaces.
    • Improved navigation between Spaces when using native fullscreen mode.
    • Removed inconsistent temporary fullscreen behavior during window creation.

@vercel

vercel Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cmux166 Ready Ready Preview Sep 11, 2026 3:09am UTC
cmux41 Ready Ready Preview Sep 11, 2026 3:09am UTC

@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 11, 2026 •

Copy link
Copy Markdown

Review Change StackReview 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: Advanced

Run ID: 571647ea-5d85-41b0-b4cc-a56ed64804f0

📥 Commits

Reviewing files that changed from the base of the PR and between 89f40df and c5fef34.

📒 Files selected for processing (4)
  • Sources/App/CmuxMainWindow.swift
  • Sources/AppDelegate.swift
  • cmuxTests/AppDelegateShortcutRoutingTests.swift
  • cmuxTests/CmuxMainWindowFullScreenCapabilityTests.swift
💤 Files with no reviewable changes (1)
  • Sources/AppDelegate.swift

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


📝 Walkthrough

Walkthrough

The main window now permanently includes .fullScreenDisallowsTiling. Temporary fullscreen tiling overrides and deferred cleanup were removed from window creation. Tests now verify the permanent collection behavior.

Changes

Fullscreen tiling behavior

Layer / File(s) Summary
Canonical fullscreen behavior
Sources/App/CmuxMainWindow.swift, cmuxTests/CmuxMainWindowFullScreenCapabilityTests.swift
canonicalCollectionBehavior adds .fullScreenDisallowsTiling. Its documentation and tests describe and verify the permanent behavior.
Window creation cleanup
Sources/AppDelegate.swift, cmuxTests/AppDelegateShortcutRoutingTests.swift
Native fullscreen detection overrides, temporary tiling flags, deferred cleanup, and obsolete test setup were removed. Shortcut routing tests expect the main window to disallow fullscreen tiling by default.

Priority: ⬆️ High

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

Severity of issue fixed: High

Suggested reviewers: lawrencecchen, azooz2003-bit

Merge Risk: ⚪ Minimal · up to c5fef

Main windows consistently opt out of Full Screen Tile while retaining native fullscreen behavior, with regression coverage for the relevant creation paths.

🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary change: keeping main windows out of macOS fullscreen tiling.
Description check ✅ Passed The description explains the problem, implementation, expected behavior, and verification. It omits the template's explicit Demo Video, Review Trigger, and Checklist sections, but the core description…
Linked Issues check ✅ Passed The PR implements the stated fix for [#10894] by permanently applying .fullScreenDisallowsTiling to main windows, preserving .fullScreenPrimary, removing temporary fullscreen handling, and adding …
Out of Scope Changes check ✅ Passed All code and test changes are directly related to the fullscreen tiling and WindowServer stability objective in [#10894]. No unrelated functional changes are present.
Cmux Swift Actor Isolation ✅ Passed PASS: The production diff does not introduce or worsen an actor-isolation mistake. CmuxMainWindow remains an intentionally @MainActor UI type, and its existing nonisolated pure `canonicalCollect…
Cmux Swift Blocking Runtime ✅ Passed PASS. The production diff adds only .fullScreenDisallowsTiling to CmuxMainWindow.canonicalCollectionBehavior. It removes the prior RunLoop.main.perform and DispatchQueue.main.async cleanup pat…
Cmux Browser Automation Off-Main ✅ Passed PASS — The authoritative PR range changes only CmuxMainWindow.swift, AppDelegate.swift, and fullscreen capability tests. The patch adds permanent .fullScreenDisallowsTiling behavior and removes …
Cmux Expensive Synchronous Load ✅ Passed PASS: The PR does not add or move an expensive synchronous agent-history load. The production additions only update fullscreen collection behavior and comments. Sources/AppDelegate.swift removes the…
Cmux Cache Substitution Correctness ✅ Passed PASS — The pull request does not substitute a cached or opportunistic value for a fresh authoritative read. The production diff only adds .fullScreenDisallowsTiling to `CmuxMainWindow.canonicalColle…
Cmux No Hacky Sleeps ✅ Passed PASS: The authoritative pull-request range changes only four .swift files. The custom check applies to production TypeScript, JavaScript, shell, and non-Swift build/runtime scripts. No covered-langu…
Cmux Algorithmic Complexity ✅ Passed PASS. The production diff adds only behavior.insert(.fullScreenDisallowsTiling) in Sources/App/CmuxMainWindow.swift:296, a constant-time option-set update. It removes the temporary source-detectio…
Cmux Swift Concurrency ✅ Passed PASS. The pull request adds no legacy async pattern. Added Swift lines contain no Dispatch, Task, Combine, completion-handler, or async-flow constructs. In AppDelegate.createMainWindow, the diff…
Cmux Swift @Concurrent ✅ Passed PASS. The reviewed Swift changes add only a synchronous CollectionBehavior insertion to the existing nonisolated helper, which the rule explicitly allows. createMainWindow remains synchronous an…
Cmux Swift Package Boundaries ✅ Passed PASS. The production diff only changes CmuxMainWindow AppKit collection behavior and AppDelegate.createMainWindow lifecycle composition. It removes temporary window-factory logic and permanently i…
Cmux Swiftpm Lockfiles ✅ Passed PASS: The authoritative PR diff changes only four Swift source/test files. It contains no Package.swift, Package.resolved, Xcode project package-reference, .gitignore, workflow, or dependency changes.…
Cmux Swift Logging ✅ Passed PASS. The reviewed diff adds no print, debugPrint, dump, NSLog, ad hoc logging, or Logger declarations. It only adds .fullScreenDisallowsTiling, updates comments and tests, and removes fulls…
Cmux User-Facing Error Privacy ✅ Passed PASS. The production diff only changes NSWindow collection behavior and removes temporary fullscreen logic. It adds no user-facing errors, alerts, command output, API bodies, or recovery text. The add…
Cmux Full Internationalization ✅ Passed PASS. The authoritative diff changes fullscreen collection behavior, removes temporary fullscreen logic, updates developer comments, and updates tests. It adds no user-facing production text or locali…
Cmux Swiftui State Layout ✅ Passed The pull request does not introduce or materially expand any flagged SwiftUI state or layout pattern. The diff changes AppKit NSWindow.CollectionBehavior, removes AppKit window-factory logic, and up…
Cmux Architecture Rethink ✅ Passed PASS. The diff is a small local correctness fix with a clear owner and invariant. CmuxMainWindow now owns the canonical collection behavior and permanently inserts .fullScreenDisallowsTiling; `cre…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PASS: The pull request changes only CmuxMainWindow and AppDelegate.createMainWindow for main workspace windows. The diff adds .fullScreenDisallowsTiling, removes temporary fullscreen handling, a…
Cmux Source Artifacts ✅ Passed PASS. The authoritative diff changes only two Swift source files and two Swift test files. The changes implement fullscreen behavior and regression tests, which are intentional product and test-system…
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS: The PR does not add a production test or debug seam. In Sources/AppDelegate.swift, it removes the existing debugCreateMainWindowSourceIsNativeFullScreenOverride member and its #if DEBUG ca…
Cmux No Ambient Global State ✅ Passed PASS: The production diff adds only .fullScreenDisallowsTiling to the existing CmuxMainWindow.canonicalCollectionBehavior method. The method remains scoped to the constructable CmuxMainWindow ty…
  • 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 issue-10894-windowserver-gesture-freeze

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.

@austinywang
austinywang merged commit 021537a into main Sep 11, 2026
32 of 36 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 11, 2026
72ce5e9 Merge pull request manaflow-ai#12210 from manaflow-ai/issue-12204-inactive-pane-colors
39bbf00 feat(web): add Founding Chromium Engineer role to jobs page (manaflow-ai#12248)
a34d44c devbox: promote sh-cd099a44912648399e0420df9b4e7f4f (daemon 897bb7a, theme-portable attach) (manaflow-ai#12304)
021537a fix: keep main windows out of fullscreen tiling (manaflow-ai#12298)
24125c7 test: update managed appearance snapshots for Catppuccin
a5a3c0f fix: match fallback colors to managed Catppuccin themes
c042f83 test: cover Catppuccin colors without theme resources
4916e7c test: use authoritative scrollbar response in wheel regression
3774a64 Complete macOS localization parity and validate plural catalogs (manaflow-ai#12169)
897bb7a Cloud panes: keep the local Ghostty theme on attach (manaflow-ai#12259)
cde2e36 web: drop the status read after Freestyle create and warm the database during auth (manaflow-ai#12260)
18e6282 Merge pull request manaflow-ai#12295 from manaflow-ai/fix/codex-default-theme-compositing
fe2292b fix: align managed terminal defaults with Codex theme
27bbb39 test: require the Codex Catppuccin default theme
84283f4 fix: size terminal frames from the tiled clip viewport
caee136 fix: keep portal terminal contents clipped during resize
454bd7a fix: preserve inactive terminal colors by default
e577aa7 test: cover inactive split appearance defaults

# Conflicts:
#	.github/workflows/ci.yml
aerickson pushed a commit to aerickson/cmux that referenced this pull request Sep 13, 2026
* test: require main windows to disallow fullscreen tiling

* fix: keep main windows out of fullscreen tiling

This branch was successfully deployed

2 active deployments
Preview – cmux41 — c5fef341 Deployed Sep 11, 2026 by vercel[bot]
Preview – cmux166 — c5fef341 Deployed Sep 11, 2026 by vercel[bot]
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.

System-wide macOS UI/WindowServer freeze; quitting cmux immediately restores desktop

1 participant