Repository navigation
Lay out standalone quit confirmation before display - #9620
Merged
Merged
Conversation
Bugbot is paused — on-demand spend limit reachedBugbot 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. |
📝 WalkthroughWalkthroughThe standalone quit confirmation presenter now performs an alert layout pass before presentation. Its test verifies that the two alert buttons have vertically aligned centers. ChangesQuit confirmation layout
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
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.
Closes #9595
Summary
NSAlertto resolve its lazy layout before the standalone raw window is shownRoot cause
The no-host-window fallback orders
alert.windowfront whileNSAlertstill has its lazy placeholder layout. On macOS 26.4.1 that left the standalone panel at260×328, with vertically stacked full-width buttons.NSAlert.layout()is the AppKit API that forces immediate layout; usingrunModal()here would reintroduce the nested modal-loop hang that #6461 removed.The normal host-window path is unchanged and still uses
beginSheetModal(for:).Regression proof
533bbb47e9adds the standalone button-alignment assertion.All failures are expected, treating as pass, so the GitHub job is marked successful despite the recorded test failure.c98c6708a0addsalert.layout()before standalone presentation.runModal()is never called.Validation
c98c6708a0: dogfood build.260×250, modal layer8, alpha1.0.git diff --checkpasses; the PR contains exactly the presenter and its existing test file../scripts/lint-pbxproj-test-wiring.shpasses for all 652 test files.Visual evidence
A trustworthy screenshot/video could not be recorded. The cloud Mac run 30968244690 reached its SSH hold but never appeared in Tailscale or the Admin API. Local Sky CUA lacks its executable/app-server, the alternate CUA daemon is unavailable, and macOS Screen Recording is denied for the available helper. Runtime geometry and window-layer metadata were captured directly instead.
Localization
No user-facing strings changed. The changed Swift diff was audited for added English literals; no localization catalog updates are needed.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes the standalone quit confirmation dialog on macOS by calling
NSAlert.layout()before the window is shown. Prevents stacked, full-width buttons and keeps the async presenter (no nested modal loops). Addresses #9595.alert.layout()in the standalone path before ordering the window front to avoid placeholder button geometry.Written for commit c98c670. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Tests