Fix Editor preferences pane hang in wrapping-checkbox layout test - #568
Merged
Conversation
The Editor pane's "Behavior" NSBox positioned its checkboxes relative to the box's content view instead of the box itself, unlike every other box in the preferences panes. The content view had no constraints of its own tying it to the box, so the box's height had no required-priority path back to its checkboxes' actual size. addHeightConstraintsForWrappingCheckboxesInView: grows those checkboxes past their default height, and layoutSubtreeIfNeeded never converges — CI's testWrappingCheckboxHeightsAccommodateMultiLineText hung indefinitely as a result. The four affected constraints now reference the box instead of the content view, matching the General and Markdown panes' boxes. The constants are adjusted for the box's chrome inset (1pt left/right/ bottom, 15pt top) so the checkboxes' resolved position and the box's total height are unchanged. Also add a 30-minute job/step timeout and -test-timeouts-enabled/-maximum-test-execution-time-allowance to the xcodebuild test invocations in test.yml and release.yml that lacked them, matching the existing convention in smoke-test.yml and release.yml's UI-test step. This bounds any future test hang to minutes instead of GitHub's 6-hour default. Related to #493
Owner
Author
|
CI update: the fix works —
|
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.
Summary
NSBoxpositioned its checkboxes relative to the box's content view instead of the box itself, unlike every other box in the preferences panes (General, Markdown). The content view had no constraints of its own tying it to the box, so the box's height had no required-priority path back to its checkboxes' actual size.+[MPPreferencesViewController addHeightConstraintsForWrappingCheckboxesInView:]grows checkboxes past their default height when their titles wrap, and in that statelayoutSubtreeIfNeedednever converges for this box.MacDownTests/MPPreferencesViewControllerResizabilityTests.m'stestWrappingCheckboxHeightsAccommodateMultiLineTextexercises exactly this by forcing wrapped titles, and hangs CI indefinitely as a result (observed on PR Add folder workspaces: hideable sidebar + native tabs + macdown . #493, unrelated to that PR's diff — this bug is pre-existing onmain).MPEditorPreferencesViewController.xibnow reference the box instead of the content view, matching the General and Markdown panes' boxes. The constants are adjusted for the box's chrome inset (1pt left/right/bottom, 15pt top), so the checkboxes' resolved position and the box's total height are unchanged — verified algebraically against the box/content-view frame deltas, not just asserted.-test-timeouts-enabled YES -maximum-test-execution-time-allowance 120to thexcodebuild testinvocations intest.ymlandrelease.yml's "Run tests before release" step, which lacked them — matching the existing convention already used insmoke-test.ymlandrelease.yml's UI-test step. This bounds any future test hang to minutes instead of GitHub's 6-hour default, independent of whether this particular fix is complete.Verification
Test plan
macos-14andmacos-26without hangingGenerated by Claude Code