- Debug/local Settings Providers pane alternated between two regressions:
- Window width did not expand from the General pane width to the Providers pane width.
- After forcing width expansion, the Providers content was clipped under the native Settings toolbar/title area.
- Screenshot evidence: Providers toolbar is selected, window is wide, but the first provider row and right-side
OpenAIheader start behind the toolbar divider.
- CodexBar
PreferencesView.swiftuses:@State contentWidth/contentHeight- pane-specific preferred widths
.frame(width: contentWidth, height: contentHeight)Settings { ... }.windowResizability(.contentSize)
- CodexBar does not manually compute or set the full
NSWindowframe for Settings pane switches.
- MenuStatus needed explicit window sizing because the pure CodexBar-style SwiftUI content width update did not reliably resize its Settings window.
- The first explicit fix used
NSWindow.setFrame(...)with a manually computed frame. - That restored width changes but crossed the Settings scene's AppKit boundary: the native toolbar/titlebar safe area was no longer reliably owned by SwiftUI/AppKit, so Providers content could start under the toolbar.
- The app is being built on macOS 26.4.1 with Xcode 26.4.1 (
DTSDKName = macosx26.4, Mach-Osdk 26.4). The glassy macOS 26 Settings toolbar/material changes are a likely trigger for the altered toolbar/content layout metrics, but not the whole cause: installed CodexBar builds checked locally are also linked against SDK 26.4 and do not require manual Settings window resizing. - Apple documents
Settingsas content-size-resizable by default and defines.contentSizein terms of the content's min/max size. That is a constraint strategy, not a guarantee that every laterTabViewintrinsic-width change will resize an already-visible Settings window. - Apple also distinguishes the whole content view from
contentLayoutRect, the non-obscured area below a full-size titlebar/toolbar. Any fix that manually changes full frame or content height risks re-entering the toolbar overlap class of bugs on macOS 26-style Settings windows.
- Keep the CodexBar-style SwiftUI content width state.
- Keep a tiny
NSViewRepresentableaccessor only to reach the hostingNSWindow. - Do not manually compute the full window frame.
- Treat SwiftUI as the owner of the Settings content height and native toolbar safe area.
- The AppKit bridge is width-only: change the content width when SwiftUI's content-size strategy misses the pane switch, and preserve the current content height.
v0.1.13-beta.6still usedsetContentSize(width + height)and could reproduce the toolbar clipping. The next fix changes the resize helper to preserve the current content height and only replace width.
MenuChromeTestscovers the pane content-size contract and meaningful resize detection.- Manual verification must include both:
- General -> Providers width expands.
- Providers top content is not hidden under the toolbar.
- After switching to
NSWindow.setContentSize(...), AppleScript accessibility verification showed:- General window size:
496 x 668 - Providers window size:
720 x 668 - Providers toolbar bottom:
329 - First provider row title top:
351 - Provider detail header top:
357
- General window size:
- The content starts below the toolbar again while width expansion/shrink still works.
- After switching to width-only content resizing, AppleScript accessibility verification showed:
- General window size:
496 x 668 - Providers window size:
720 x 668 - Providers toolbar bottom:
200 - First provider row title top:
222 - Provider detail header top:
228 - Closing and reopening Settings while still on Providers kept the same non-overlapping coordinates.
- General window size:
- After tightening the helper API to
targetContentWidth/needsWidthResize, verification again showed:- General window size after shrink:
496 x 668 - Providers window size after re-expand:
720 x 668 - Providers toolbar bottom:
200 - Provider list
OpenAItop:222 - Provider detail
OpenAItop:228 tuist xcodebuild test -scheme MenuStatus -configuration Debug -derivedDataPath .build: 125 tests passed.
- General window size after shrink:
- Final implementation removes the old
targetContentSize/needsResizehelper names entirely.SettingsWindowContentSizingnow exposes only width-oriented resize helpers. - Final Debug verification:
- General -> Providers -> General -> Providers:
496 x 668->720 x 668->496 x 668->720 x 668 - Providers toolbar bottom:
234 - Provider list
OpenAItop:256 - Provider detail
OpenAItop:262
- General -> Providers -> General -> Providers:
- Final Release verification:
- General -> Providers -> General -> Providers:
496 x 668->720 x 668->496 x 668->720 x 668 - Providers toolbar bottom:
234 - Provider list
OpenAItop:256 - Provider detail
OpenAItop:262 - Release app remained running after verification with 7 menu bar items visible to accessibility.
- General -> Providers -> General -> Providers: