Skip to content

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

Open
chadneal wants to merge 2 commits intosteipete:mainfrom
chadneal:fix/preferences-window-sidebar-clipping
Open

Fix preferences sidebar clipping and window sizing on macOS Tahoe#580
chadneal wants to merge 2 commits intosteipete:mainfrom
chadneal:fix/preferences-window-sidebar-clipping

Conversation

@chadneal
Copy link
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

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>
Copy link

@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".

# 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)

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 👍 / 👎.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant