feat: add native macOS target#53
Conversation
- 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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (16)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.
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>
Summary
SDKROOT = auto,MACOSX_DEPLOYMENT_TARGET = 26.0, andSUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"on the Lumen target — enabling native macOS compilation alongside iOS without Mac CatalystLumenApp.swiftwith#if os(macOS)scenes:WindowGroupwith.defaultSize(900, 600)/.windowResizability(.contentMinSize),Settings {}for preferences, and aCommandMenu("Conversation")for New Conversation.topBarTrailing,.insetGrouped,.navigationBarTitleDisplayMode,.presentationDetents,.fullScreenCover,.tabViewStyle(.page(...)), etc.) across 12 Shared view files using@ViewBuilderextension helpersMainTabView.swiftentirely in#if os(iOS)(it's the iOS shell); movesNavigationSplitViewVisibilityextension toMacContentView.swiftwhere it's actually usedApproach
Each iOS-only modifier is replaced with a
@ViewBuilderextension method that applies it only under#if os(iOS)and passesselfthrough 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' build→ BUILD SUCCEEDED ✓🤖 Generated with Claude Code