Repository navigation
Restore modern Settings window chrome - #8015
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 15 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Settings window now uses explicit AppKit unified chrome, including a transparent full-size titlebar and sidebar toolbar toggle. Toolbar actions route through ChangesSettings window chrome
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ Finishing Touches🧪 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 |
Greptile SummaryThis PR restores modern Settings window chrome under AppKit ownership. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "fix: preserve live Settings toolbar rout..." | Re-trigger Greptile |
* test: cover Settings window chrome * fix: restore modern Settings window chrome * fix: define Settings toolbar item contract * fix: preserve live Settings toolbar routing (cherry picked from commit 85b8a53)
Summary
SettingsWindowFactoryestablish the complete modern chrome contract at construction: full-size content, transparent hidden titlebar, no legacy separator, and unified-compact toolbar.toggleSidebartoolbar chrome explicitly instead of assumingNSHostingController.sceneBridgingOptionswill synthesize it.NavigationSplitViewstate.Root cause and architectural fix
PR #7783 correctly made AppKit the single lifecycle owner, but window chrome remained implicitly delegated to the hosted SwiftUI hierarchy.
sceneBridgingOptions = [.toolbars, .title]forwards toolbar content explicitly declared by a hosted view; this Settings root declares navigation/search state but no toolbar content, so the AppKit factory returned a bare titled window.The factory now owns the NSWindow chrome container and its standard AppKit toolbar, while SwiftUI continues to own navigation, sidebar visibility state, search, and Settings content. The invariant is established before
makeSettingsWindowreturns, independent of ordering or scene timing, without changing the synchronous construction, reuse/teardown, geometry, activation, or navigation-delivery guarantees from #7783/#7800.Regression coverage
Two-commit red/green structure:
12dc775c4addsSettingsWindowChromeTestsonly. It fails against the old factory because.fullSizeContentView, unified/transparent titlebar properties, and the toolbar are absent.2a9733c2bimplements the factory-owned chrome invariant.The test asserts the constructed NSWindow contract, the standard sidebar toolbar item and target/action, and end-to-end delivery through the same sidebar-toggle notification used by the menu command. Pixel-level rendering of AppKit/SwiftUI chrome is not faked in unit coverage and remains a dogfood check.
Related issue #5071
This covers #5071s visible legacy-chrome complaint in the current architecture: the older SwiftUI
Windowpath discussed there was removed by #7783, and the AppKit factory fixed here is now the only Settings construction path. This PR intentionally does not restore or modify the removed SwiftUI scene lifecycle.Validation
scripts/check-pbxproj.shscripts/lint-pbxproj-test-wiring.shpython3 scripts/check-package-resolved-policy.pypython3 scripts/check-workspace-package-groups.py --checkgit diff --checkxcodebuildor XCUITest run, per issue task; app-target compilation and tests are delegated to CI.python3 scripts/swift_file_length_budget.pywas run. It reports nine pre-existing unrelated files over their checked-in budgets; this PR does not touch either budget TSV, and all touched Swift files remain below 500 lines.Localization audit
No user-facing strings were added or changed. The toolbar uses AppKits standard
NSToolbarItem.Identifier.toggleSidebar, including its system-localized label and accessibility description; the window title continues to use the existing localizedsettings.titlekey. No shortcuts, menus, schema text, docs, or locale catalogs changed.Fixes #8010
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Restores modern Settings window chrome with full-size content, a transparent hidden titlebar, and an AppKit-owned unified-compact toolbar. Adds a standard sidebar toggle with routing that persists even when AppKit recreates the item; fixes #8010.
SettingsWindowFactorynow builds chrome at construction:.fullSizeContentView, transparent/hidden titlebar, no separator, and.unifiedCompacttoolbar. Bridges only.title. Creates anNSToolbar(identifiercmux.settings.toolbar) with.iconOnlydisplay, no customization/autosave, inserts.toggleSidebar, and assigns it to the window.SettingsHostWindowowns the toolbar contract:NSToolbarDelegatelimits allowed/default items to.toggleSidebar, implementstoggleSidebar:to callSettingsWindowPresenter.requestSidebarToggle(), and usestoolbarWillAddItemto configure every inserted standard item so target/action stay correct when AppKit recreates it. AddedSettingsWindowChromeTests.Written for commit 1d68eef. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes
Tests