Skip to content

Fix collapsed pre-boot options form on modern macOS - #725

Closed
ElSteverino wants to merge 1 commit into
insidegui:mainfrom
ElSteverino:fix/self-sizing-form-modern-macos
Closed

Fix collapsed pre-boot options form on modern macOS#725
ElSteverino wants to merge 1 commit into
insidegui:mainfrom
ElSteverino:fix/self-sizing-form-modern-macos

Conversation

@ElSteverino

@ElSteverino ElSteverino commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Problem

On recent macOS releases (observed on macOS 27.0 beta, 26A5388g), the options panel on a VM window's pre-boot screen collapses to its 100 pt minimum height. Only the first two rows are visible in a tiny scroll area, which hides the remaining rows — including the "Virtual Machine Settings…" button — well enough that it looks like post-install configuration doesn't exist.

Cause

SelfSizingGroupedForm sizes the grouped Form by introspecting the backing NSScrollView's documentView frame via SwiftUIIntrospect. On modern macOS the grouped form is no longer backed by an introspectable NSScrollView, so the measurement closure never fires, contentHeight stays 0, and the frame falls back to minHeight.

Fix

Use the native onScrollGeometryChange API (macOS 15+) to observe the form's scroll content height, keeping the introspection path only for macOS 13/14 (deployment target is 14.0). Same guards and behavior as before, including the VBDisableSelfSizingGroupedForm defaults escape hatch.

Testing

  • Built and ran on macOS 27.0 beta with Xcode 27 beta: the pre-boot panel now fits all rows (saved-state picker, recovery/DFU toggles, capture-keys toggle, Settings button) with no inner scrolling.
  • VBDisableSelfSizingGroupedForm still pins the form to minHeight when set.

🤖 Generated with Claude Code

The grouped Form in SelfSizingGroupedForm was sized by introspecting the
backing NSScrollView's documentView height. On recent macOS releases the
form is no longer backed by an introspectable NSScrollView, so the
measurement never ran and the form collapsed to its minimum height,
hiding rows (including the Virtual Machine Settings button) behind a
tiny scroll area.

Use the native onScrollGeometryChange API to measure content height on
macOS 15 and later, keeping the introspection path for macOS 13/14.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@insidegui

Copy link
Copy Markdown
Owner

@ElSteverino have you managed to reproduce this with a recent build on main? This had been fixed in another branch that's recently been merged into main...

@ElSteverino

Copy link
Copy Markdown
Contributor Author

Confirmed — you're right. My original repro was on the 2.1 release (build 325) on macOS 27.0 beta (26A5388g), which predates the June swiftui-introspect update. I've since built current main (74b4119) and the panel sizes correctly there, and the 2.2 beta from the update channel looks good as well. Closing — sorry for the noise, and thanks for the quick look (and for the @published fix in #727).

@ElSteverino ElSteverino closed this Aug 3, 2026
@ElSteverino
ElSteverino deleted the fix/self-sizing-form-modern-macos branch August 3, 2026 23:01
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.

2 participants