Skip to content

feat: add native macOS target#53

Merged
eulicesl merged 3 commits into
mainfrom
feat/native-macos-target
Apr 17, 2026
Merged

feat: add native macOS target#53
eulicesl merged 3 commits into
mainfrom
feat/native-macos-target

Conversation

@eulicesl

Copy link
Copy Markdown
Owner

Summary

  • Sets SDKROOT = auto, MACOSX_DEPLOYMENT_TARGET = 26.0, and SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx" on the Lumen target — enabling native macOS compilation alongside iOS without Mac Catalyst
  • Rewrites LumenApp.swift with #if os(macOS) scenes: WindowGroup with .defaultSize(900, 600) / .windowResizability(.contentMinSize), Settings {} for preferences, and a CommandMenu("Conversation") for New Conversation
  • Guards all iOS-only SwiftUI APIs (.topBarTrailing, .insetGrouped, .navigationBarTitleDisplayMode, .presentationDetents, .fullScreenCover, .tabViewStyle(.page(...)), etc.) across 12 Shared view files using @ViewBuilder extension helpers
  • Wraps MainTabView.swift entirely in #if os(iOS) (it's the iOS shell); moves NavigationSplitViewVisibility extension to MacContentView.swift where it's actually used

Approach

Each iOS-only modifier is replaced with a @ViewBuilder extension method that applies it only under #if os(iOS) and passes self through on macOS. Toolbar placements switch to macOS equivalents (.cancellationAction, .confirmationAction, .primaryAction, .automatic). No logic is duplicated — only the SwiftUI API call sites are platform-conditional.

Test plan

  • xcodebuild -scheme Lumen -destination 'platform=macOS' buildBUILD SUCCEEDED
  • iOS simulator build still passes (no regressions)
  • Launch on macOS: NavigationSplitView sidebar + chat detail visible
  • New Conversation command in menu bar works
  • Settings sheet opens from toolbar

🤖 Generated with Claude Code

- Set SDKROOT=auto, MACOSX_DEPLOYMENT_TARGET=26.0, SUPPORTED_PLATFORMS
  to enable native macOS alongside iOS in the Lumen target
- Rewrote LumenApp.swift with #if os(macOS) scenes: WindowGroup with
  .defaultSize/.windowResizability, Settings {}, and CommandMenu
- Guarded all iOS-only SwiftUI APIs across 12 Shared view files using
  @ViewBuilder extension helpers (#if os(iOS)/#else patterns)
- Wrapped MainTabView.swift in #if os(iOS); moved
  NavigationSplitViewVisibility extension to MacContentView.swift
- Fixed VoiceInputView and voiceButtonIcon usage (iOS-only state)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Apr 17, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@eulicesl has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 36 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 9 minutes and 36 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ba360937-15d4-4fdb-a1d3-aa3d35e3d916

📥 Commits

Reviewing files that changed from the base of the PR and between 06f16bb and 8eeef45.

📒 Files selected for processing (16)
  • Lumen.xcodeproj/project.pbxproj
  • Lumen/App/LumenApp.swift
  • Lumen/Extensions/View+PlatformModifiers.swift
  • Lumen/Stores/SettingsStoreView.swift
  • Lumen/Views/Shared/Agent/AgentConfigView.swift
  • Lumen/Views/Shared/Chat/ChatView.swift
  • Lumen/Views/Shared/Chat/InputBarView.swift
  • Lumen/Views/Shared/Chat/MessageImageGrid.swift
  • Lumen/Views/Shared/Compare/ModelComparisonView.swift
  • Lumen/Views/Shared/Library/PromptLibraryView.swift
  • Lumen/Views/Shared/Memory/MemoryView.swift
  • Lumen/Views/Shared/Onboarding/OnboardingView.swift
  • Lumen/Views/Shared/Search/SearchView.swift
  • Lumen/Views/Shared/Settings/PrivacyView.swift
  • Lumen/Views/Shared/Settings/SettingsView.swift
  • Lumen/Views/iOS/MainTabView.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/native-macos-target

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request implements macOS support for the Lumen app, refactoring the app entry point and various views to handle platform-specific UI requirements such as toolbar placements and window resizability. Feedback highlights an invalid macOS deployment target (26.0) that needs correction to a valid version like 15.0. Additionally, there are recommendations to centralize duplicated view extensions across multiple files to improve maintainability, refactor the redundant mainWindow property logic, and ensure consistent use of the local chatStore instance instead of the singleton.

Comment thread Lumen.xcodeproj/project.pbxproj
Comment thread Lumen/Views/Shared/Agent/AgentConfigView.swift
Comment thread Lumen/App/LumenApp.swift Outdated
Comment thread Lumen/App/LumenApp.swift Outdated
eulicesl and others added 2 commits April 17, 2026 14:44
Moving the extension inside #if os(macOS) in MacContentView broke
iPadContentView which needs it on iOS. Placed it after #endif in
MainTabView.swift so it compiles on both platforms.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extract navigationBarInline() and insetGroupedListStyle() into a
  shared View+PlatformModifiers.swift so they're defined once instead
  of as private copies in 6+ files
- Collapse mainWindow duplication using let group + #if return pattern
- Use chatStore instance variable instead of ChatStore.shared singleton
  in conversationCommands and MenuBarExtra button actions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eulicesl
eulicesl merged commit 3a43344 into main Apr 17, 2026
5 checks passed
@eulicesl
eulicesl deleted the feat/native-macos-target branch April 17, 2026 19:00
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