refactor(launch): register each window presenter independently - #2073
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step toward owning the main menu in AppKit. No user-visible change.
WindowOpener.wire(...)took all four window presenters in one call, so no window could move to AppKit until all four did. This splits it into four independent registrations.setWelcomePresenter,setConnectionFormPresenter,setIntegrationsActivityPresenter,setSettingsPresenterinitis no longer private, so a test can exercise the queue on an instance with nothing registered instead of the process-wide singletonTwo tests cover the new behaviour: a queued call runs when its presenter arrives, and registering one window does not discard another's queued call.
Build succeeds,
swiftlint --strictclean,WindowOpenerTestspasses.Why
#2057 rewrote the menu bar on AppKit and had to be reverted (#2071): SwiftUI reconciles
NSApp.mainMenuonce shortly after launch and discards it. Under the SwiftUI App lifecycle there is no supported way to keep it, so the app moves to the AppKit lifecycle, where the menu bar has a single owner. The four SwiftUI scenes becomeNSWindowControllers one at a time; this PR makes that possible.