Skip to content

Fix preferences sidebar clipping and window sizing on macOS Tahoe#580

Merged
steipete merged 3 commits intosteipete:mainfrom
chadneal:fix/preferences-window-sidebar-clipping
Apr 18, 2026
Merged

Fix preferences sidebar clipping and window sizing on macOS Tahoe#580
steipete merged 3 commits intosteipete:mainfrom
chadneal:fix/preferences-window-sidebar-clipping

Conversation

@chadneal
Copy link
Copy Markdown
Contributor

Summary

  • Fix provider sidebar clipping on macOS Tahoe where .listStyle(.sidebar) internal insets pushed content beyond the 240px frame, hiding provider names, icons, and reorder handles
  • Replace List with ScrollView+VStack for full control over sidebar layout without system-imposed insets
  • Add direct NSWindow.setFrame resizing since SwiftUI's .windowResizability(.contentSize) doesn't propagate frame changes on Tahoe
  • Add PreferencesTab.title and CaseIterable to derive window-finder tab titles from the enum instead of hardcoded strings
  • Use system selectedContentBackgroundColor for sidebar selection highlight
  • Add ensure_swift_version() to compile_and_run.sh for Xcode toolchain fallback

Test plan

  • Open Settings → Providers tab: all provider names, icons, reorder handles, and checkboxes visible
  • Click providers to verify selection works and highlights correctly
  • Drag to reorder providers
  • Switch between General/Providers tabs: window animates to correct width
  • Verify on macOS Tahoe (Darwin 25.x)

🤖 Generated with Claude Code

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: afc2c59330

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Scripts/compile_and_run.sh Outdated
# Ensure Swift >= 5.5 (required for --arch flag in swift build)
ensure_swift_version() {
local swift_ver
swift_ver=$(swift --version 2>&1 | grep -oE '[0-9]+\.[0-9]+(\.[0-9]+)?' | head -1)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve xcrun fallback when PATH lacks swift

With set -euo pipefail enabled, swift_ver=$(swift --version ... | grep ... | head -1) aborts the script immediately if swift is not on PATH, so the intended Xcode fallback (xcrun --find swift) never runs. This makes compile_and_run.sh fail in environments where only xcrun swift is available (for example, sanitized CI/login shells), even though the script now claims to support that fallback path.

Useful? React with 👍 / 👎.

chadneal and others added 3 commits April 18, 2026 21:56
The Providers tab sidebar was clipping provider names, icons, and reorder
handles on the left edge due to .listStyle(.sidebar) imposing internal
leading insets that push content beyond the 240px frame on macOS Tahoe.

- Replace List with ScrollView+VStack for full control over sidebar layout
- Add direct NSWindow.setFrame resizing since SwiftUI's
  .windowResizability(.contentSize) doesn't propagate frame changes
- Add PreferencesTab.title and CaseIterable to eliminate hardcoded tab
  title strings in the window finder
- Use system selectedContentBackgroundColor for sidebar selection highlight
- Add ensure_swift_version() to compile_and_run.sh for Xcode toolchain
  fallback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@steipete steipete force-pushed the fix/preferences-window-sidebar-clipping branch from 5cab4ca to 3ac6301 Compare April 18, 2026 21:01
@steipete steipete merged commit f10ab99 into steipete:main Apr 18, 2026
4 checks passed
@steipete
Copy link
Copy Markdown
Owner

Landed via temp rebase onto main.

  • Gate: swiftformat Sources Tests; swiftlint --strict; pnpm check; swift build; swift test -q; ./Scripts/compile_and_run.sh
  • Land commit: 3ac6301f36e4ea8d61e7db4ec4f26c46e63c0537
  • Merge commit: f10ab99

Thanks @chadneal!

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