Skip to content

adding support for macOS 12#33

Merged
leogdion merged 1 commit intomainfrom
support-macos12
Nov 4, 2025
Merged

adding support for macOS 12#33
leogdion merged 1 commit intomainfrom
support-macos12

Conversation

@leogdion
Copy link
Copy Markdown
Member

@leogdion leogdion commented Nov 4, 2025

Summary by CodeRabbit

Release Notes

  • Chores
    • Expanded platform support by lowering minimum OS requirements across iOS, macOS, tvOS, watchOS, and macCatalyst.
    • Added platform availability constraints to public APIs to specify minimum supported OS versions for individual features and components.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 4, 2025

Walkthrough

Lowered platform minimum deployment targets in Package.swift across all platforms (iOS, macOS, macCatalyst, tvOS, watchOS by 2–3 versions each). Added availability annotations to public declarations across Actions, AppKit, RadiantKit, and RadiantProgress modules, gating features to macOS 13.0+/iOS 16.0+/watchOS 9.0+/tvOS 16.0+ or macOS 14.0+/iOS 17.0+/watchOS 10.0+/tvOS 17.0+ depending on module.

Changes

Cohort / File(s) Summary
Package Manifest Update
Package.swift
Lowered minimum platform versions: iOS (17→15), macCatalyst (17→15), macOS (14→12), tvOS (17→15), watchOS (10→8).
Actions Module – Availability Annotations
Sources/RadiantDocs/Actions/OpenFileURLAction.swift, Sources/RadiantDocs/Actions/OpenWindowWithAction.swift, Sources/RadiantDocs/Actions/OpenWindowWithValueAction.swift
Added @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) to public typealiases and struct declarations; no behavioral changes.
AppKit Module – Availability Annotations
Sources/RadiantDocs/AppKit/NewFilePanel.swift, Sources/RadiantDocs/AppKit/OpenAnyFilePanel.swift, Sources/RadiantDocs/AppKit/OpenFilePanel.swift
Added @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) to public struct and extension declarations.
RadiantKit Views – Availability Annotations
Sources/RadiantKit/ViewExtensions/SingleWindowView.swift, Sources/RadiantKit/Views/GuidedLabeledContent.swift, Sources/RadiantKit/Views/SliderStepperView.swift, Sources/RadiantKit/Views/ValueTextBubble.swift, Sources/RadiantKit/Views/VerticalLabelStyle.swift
Added availability constraints to public view structs and extensions; ValueTextBubble uses iOS 15.0 only, others use macOS 13.0+/iOS 16.0+/watchOS 9.0+/tvOS 16.0+ (or iOS 15.0+).
RadiantKit Observable Class – Availability Annotation
Sources/RadiantKit/TransformedValueObject.swift
Added @available(macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0, *) to public Observable class.
RadiantProgress Module – Availability Annotations
Sources/RadiantProgress/CopyOperation.swift, Sources/RadiantProgress/DownloadOperation.swift, Sources/RadiantProgress/FileOperationProgress.swift, Sources/RadiantProgress/ObservableDownloader.swift, Sources/RadiantProgress/ProgressOperationProperties.swift, Sources/RadiantProgress/ProgressOperationView.swift, Sources/RadiantProgress/SetupPublishers.swift
Added @available(macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0, *) to public classes, structs, extensions, and private/internal methods; no logic changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Reason: The vast majority of changes are repetitive, homogeneous availability annotations added to public declarations with minimal logic density.
  • Areas for attention:
    • Verify consistency of availability versions across related types (e.g., classes and their extensions use matching @available attributes).
    • Confirm that the lowered platform targets in Package.swift (especially macOS 12.0 and watchOS 8.0) are compatible with the availability constraints added to public APIs.
    • Ensure that internal methods in SetupPublishers.swift correctly inherit the availability from their containing type.

Poem

🐰 With whiskers twitching, I add a note,
To every public API's code,
"On these platforms you may roam free!"
Says the rabbit, hopping with glee,
As availability gates bloom,
Like clover in a springtime room. 🍀

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'adding support for macOS 12' accurately reflects the main change in the changeset, which updates the minimum macOS requirement from 14 to 12 in Package.swift.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch support-macos12

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.

@leogdion leogdion merged commit c18df55 into main Nov 4, 2025
13 of 15 checks passed
@leogdion leogdion deleted the support-macos12 branch November 4, 2025 14:10
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
Sources/RadiantDocs/AppKit/OpenFilePanel.swift (1)

40-40: Reconsider platform availability for AppKit-specific code.

This code is wrapped in #if canImport(AppKit), which is macOS-only. The availability annotation includes iOS, watchOS, and tvOS versions, which are unnecessary since AppKit is never available on those platforms.

Consider simplifying to:

-  @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
+  @available(macOS 13.0, *)

The same applies to line 73.

Sources/RadiantProgress/SetupPublishers.swift (1)

47-47: Optional: Fix typo in method name.

The method name has a typo: setupDownloadPublsihers should be setupDownloadPublishers. While this doesn't affect functionality, correcting it would improve code clarity.

Apply this diff to fix the typo:

-    private func setupDownloadPublsihers(
+    private func setupDownloadPublishers(
       _ downloader: ObservableDownloader
     ) -> [AnyCancellable] {

Also update the call site at line 124:

-      cancellables.append(contentsOf: setupDownloadPublsihers(downloader))
+      cancellables.append(contentsOf: setupDownloadPublishers(downloader))
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between febe500 and 519bb0f.

📒 Files selected for processing (20)
  • Package.swift (1 hunks)
  • Sources/RadiantDocs/Actions/OpenFileURLAction.swift (3 hunks)
  • Sources/RadiantDocs/Actions/OpenWindowWithAction.swift (1 hunks)
  • Sources/RadiantDocs/Actions/OpenWindowWithValueAction.swift (1 hunks)
  • Sources/RadiantDocs/AppKit/NewFilePanel.swift (2 hunks)
  • Sources/RadiantDocs/AppKit/OpenAnyFilePanel.swift (2 hunks)
  • Sources/RadiantDocs/AppKit/OpenFilePanel.swift (2 hunks)
  • Sources/RadiantKit/TransformedValueObject.swift (1 hunks)
  • Sources/RadiantKit/ViewExtensions/SingleWindowView.swift (1 hunks)
  • Sources/RadiantKit/Views/GuidedLabeledContent.swift (2 hunks)
  • Sources/RadiantKit/Views/SliderStepperView.swift (1 hunks)
  • Sources/RadiantKit/Views/ValueTextBubble.swift (1 hunks)
  • Sources/RadiantKit/Views/VerticalLabelStyle.swift (1 hunks)
  • Sources/RadiantProgress/CopyOperation.swift (2 hunks)
  • Sources/RadiantProgress/DownloadOperation.swift (1 hunks)
  • Sources/RadiantProgress/FileOperationProgress.swift (1 hunks)
  • Sources/RadiantProgress/ObservableDownloader.swift (1 hunks)
  • Sources/RadiantProgress/ProgressOperationProperties.swift (2 hunks)
  • Sources/RadiantProgress/ProgressOperationView.swift (1 hunks)
  • Sources/RadiantProgress/SetupPublishers.swift (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (12)
Sources/RadiantProgress/DownloadOperation.swift (1)
Sources/RadiantProgress/SetupPublishers.swift (3)
  • macOS (45-75)
  • macOS (84-103)
  • macOS (112-137)
Sources/RadiantKit/Views/GuidedLabeledContent.swift (1)
Sources/RadiantProgress/SetupPublishers.swift (3)
  • macOS (45-75)
  • macOS (84-103)
  • macOS (112-137)
Sources/RadiantKit/Views/VerticalLabelStyle.swift (1)
Sources/RadiantProgress/SetupPublishers.swift (3)
  • macOS (45-75)
  • macOS (84-103)
  • macOS (112-137)
Sources/RadiantProgress/CopyOperation.swift (1)
Sources/RadiantProgress/SetupPublishers.swift (3)
  • macOS (45-75)
  • macOS (84-103)
  • macOS (112-137)
Sources/RadiantProgress/ProgressOperationView.swift (1)
Sources/RadiantProgress/SetupPublishers.swift (3)
  • macOS (45-75)
  • macOS (84-103)
  • macOS (112-137)
Sources/RadiantProgress/FileOperationProgress.swift (1)
Sources/RadiantProgress/SetupPublishers.swift (3)
  • macOS (45-75)
  • macOS (84-103)
  • macOS (112-137)
Sources/RadiantProgress/ProgressOperationProperties.swift (1)
Sources/RadiantProgress/SetupPublishers.swift (3)
  • macOS (45-75)
  • macOS (84-103)
  • macOS (112-137)
Sources/RadiantDocs/Actions/OpenWindowWithValueAction.swift (1)
Sources/RadiantProgress/SetupPublishers.swift (3)
  • macOS (45-75)
  • macOS (84-103)
  • macOS (112-137)
Sources/RadiantDocs/Actions/OpenWindowWithAction.swift (1)
Sources/RadiantProgress/SetupPublishers.swift (3)
  • macOS (45-75)
  • macOS (84-103)
  • macOS (112-137)
Sources/RadiantProgress/ObservableDownloader.swift (1)
Sources/RadiantProgress/SetupPublishers.swift (3)
  • macOS (45-75)
  • macOS (84-103)
  • macOS (112-137)
Package.swift (1)
Sources/RadiantProgress/SetupPublishers.swift (3)
  • macOS (45-75)
  • macOS (84-103)
  • macOS (112-137)
Sources/RadiantKit/TransformedValueObject.swift (1)
Sources/RadiantProgress/SetupPublishers.swift (3)
  • macOS (45-75)
  • macOS (84-103)
  • macOS (112-137)
🔇 Additional comments (19)
Sources/RadiantProgress/FileOperationProgress.swift (1)

35-35: Verify that macOS 14.0+ requirement aligns with PR objectives.

This class is gated to macOS 14.0+, but the PR title indicates support for macOS 12, and Package.swift sets the minimum to macOS 12. The @Observable macro does require macOS 14.0+, so this availability annotation is technically correct for the implementation.

However, consider whether this API should be refactored to support earlier platforms using older patterns (e.g., ObservableObject instead of @Observable) if macOS 12-13 support is a goal. Otherwise, document that this specific module requires macOS 14.0+ despite the package's broader platform support.

Sources/RadiantKit/Views/VerticalLabelStyle.swift (1)

70-70: Availability annotation is correct.

The LabeledContentStyle protocol was introduced in macOS 13.0/iOS 16.0, so this availability annotation appropriately matches the API requirements.

Sources/RadiantKit/Views/SliderStepperView.swift (1)

44-44: Verify the macOS 13.0+ requirement.

The availability annotation gates this view to macOS 13.0+, but the package minimum is macOS 12. The code uses LabeledContent (line 73), which was introduced in macOS 13.0, so this annotation appears correct.

However, if macOS 12 support is a primary goal, consider documenting which components are available on macOS 12 vs. 13+ in the package README or API documentation.

Sources/RadiantProgress/DownloadOperation.swift (1)

40-40: macOS 14.0+ requirement limits earlier platform support.

Similar to FileOperationProgress, this class uses the @Observable macro which requires macOS 14.0+. While technically correct, this means users on macOS 12-13 (which the package now claims to support) cannot use this API.

Ensure this is documented and consider whether the RadiantProgress module should have a higher minimum platform version than the base package, or provide alternative implementations for earlier platforms.

Sources/RadiantKit/ViewExtensions/SingleWindowView.swift (1)

65-65: Availability annotation is appropriate.

The WindowGroup initializer with PresentedWindowContent was introduced in macOS 13.0/iOS 16.0, so this availability gate correctly reflects the API requirements.

Package.swift (1)

33-38: Verify platform version compatibility strategy across the package.

The verification confirms your analysis is accurate. The codebase declares package minimums of macOS 12, iOS 15, watchOS 8, and tvOS 15, but publicly available APIs have higher requirements:

  • RadiantProgress (FileOperationProgress, DownloadOperation, etc.): macOS 14.0+/iOS 17.0+
  • RadiantKit (SliderStepperView, VerticalLabelStyle, GuidedLabeledContent): macOS 13.0+/iOS 16.0+
  • RadiantDocs (file panels, actions): macOS 13.0+/iOS 16.0+

Developers targeting the package's declared minimum versions will encounter unavailable APIs. Choose one of your suggested approaches and implement it:

  1. Document which features require which versions in README/API docs
  2. Adjust package minimums upward or create separate products with tiered versions
  3. Provide conditional implementations for earlier platforms where feasible
Sources/RadiantDocs/AppKit/OpenAnyFilePanel.swift (1)

41-99: Availability gate matches OpenWindowAction support.

Annotating both the panel and the forwarding extension avoids exposing OpenWindowAction on macOS 12/iOS 15 builds, so this lines up with the SDK’s actual availability. Nice catch.

Also applies to: 82-99

Sources/RadiantDocs/AppKit/NewFilePanel.swift (1)

41-75: Availability matches dependency chain.

Bringing both the panel and the helper extension under the macOS 13/iOS 16 umbrella keeps their OpenWindowAction usage from leaking onto lower deployment targets while still compiling the module for macOS 12 overall. Looks good.

Also applies to: 77-89

Sources/RadiantDocs/Actions/OpenWindowWithValueAction.swift (1)

38-70: Correctly gated to the OpenWindowAction introduction.

OpenWindowAction only exists on macOS 13 / iOS 16+, so tagging the wrapper struct with the same availability keeps consumers honest while letting the package target older OSes. Nicely aligned.

Sources/RadiantProgress/CopyOperation.swift (1)

42-181: Observation-based operation correctly restricted.

Because @Observable lives in the Observation framework (macOS 14 / iOS 17+), aligning both the class and its conformance with that floor avoids build issues on the newly-supported lower targets. Looks solid.

Sources/RadiantKit/TransformedValueObject.swift (1)

38-123: Availability now mirrors Observation framework requirements.

@Observable forces macOS 14 / iOS 17+, so tagging the class ensures builds for the lower deployment target don’t fail while keeping availability accurate. Good adjustment.

Sources/RadiantKit/Views/GuidedLabeledContent.swift (1)

47-99: Gating aligns with LabeledContent availability.

Since LabeledContent showed up in macOS 13 / iOS 16, this annotation keeps the view and its convenience init from leaking onto unsupported deployments while still letting the package target earlier systems elsewhere. 👍

Also applies to: 74-99

Sources/RadiantDocs/Actions/OpenWindowWithAction.swift (1)

39-58: Typealias and helpers gated with their backing API.

Tying both the alias and its convenience initialiser to macOS 13 / iOS 16 matches OpenWindowWithValueAction’s availability and prevents accidental usage on older deployments. Looks consistent.

Also applies to: 44-58

Sources/RadiantDocs/Actions/OpenFileURLAction.swift (1)

39-86: Environment plumbing correctly availability-gated.

Every piece here (OpenFileURLKey, the typealiases, and the Scene/View hooks) sits on top of OpenWindowAction, so fencing them at macOS 13 / iOS 16 keeps the environment value from being emitted on deployments where the underlying action is missing. Nicely synchronized.

Sources/RadiantProgress/ProgressOperationView.swift (1)

40-41: LGTM! Availability annotation correctly applied.

The availability constraint appropriately gates this SwiftUI view to platforms where the required features are available, while allowing the package to support older deployment targets.

Sources/RadiantProgress/ObservableDownloader.swift (1)

36-39: LGTM! Required availability annotation for @observable macro.

The availability constraint is necessary because the @Observable macro requires macOS 14.0+ / iOS 17.0+. This correctly gates the class while allowing the package to maintain broader platform support.

Sources/RadiantProgress/ProgressOperationProperties.swift (2)

35-36: LGTM! Consistent availability gating.

The availability annotation correctly aligns with the ProgressOperationView it supports and maintains consistency across the RadiantProgress module.


69-70: LGTM! Extension availability matches base type.

The extension correctly uses the same availability constraint as the ProgressOperationView struct it extends.

Sources/RadiantProgress/SetupPublishers.swift (1)

45-49: LGTM! Consistent availability with ObservableDownloader dependency.

All three methods correctly apply the same availability constraint as ObservableDownloader, which they depend on as a parameter type. This ensures proper compilation and usage boundaries.

Also applies to: 84-88, 112-116

public import SwiftUI

/// A SwiftUI view that displays a value with a formatted text bubble.
@available(iOS 15.0, *)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Incomplete availability annotation—specify all relevant platforms.

The availability annotation only specifies iOS 15.0, but this SwiftUI view should be available across multiple Apple platforms. Other files in this PR use comprehensive platform lists (e.g., macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0).

Apply this diff to specify complete availability:

-  @available(iOS 15.0, *)
+  @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)

Note: Adjust the specific version numbers based on which platform APIs this view actually requires (e.g., if it requires FormatStyle features, verify their minimum versions).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@available(iOS 15.0, *)
@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
🤖 Prompt for AI Agents
In Sources/RadiantKit/Views/ValueTextBubble.swift around line 37, the @available
annotation currently lists only iOS 15.0; update it to a full multi-platform
availability annotation matching this PR’s conventions (e.g., macOS 13.0, iOS
16.0, watchOS 9.0, tvOS 16.0) or to the correct minimums for any APIs used;
replace the single-platform annotation with the comprehensive list so the view
is correctly gated across all Apple platforms.

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