Skip to content

Refactor file organization for improved maintainability#38

Merged
leogdion merged 3 commits intomainfrom
lint-fixes
Jan 7, 2026
Merged

Refactor file organization for improved maintainability#38
leogdion merged 3 commits intomainfrom
lint-fixes

Conversation

@leogdion
Copy link
Member

@leogdion leogdion commented Jan 7, 2026

Summary

This PR refactors large files into focused, maintainable units following established project patterns:

AppStorageDateTests Split

  • ✅ Created enum-based test suite pattern with extensions
  • ✅ Separated 3 non-optional date tests into AppStorageDateTests+NonOptional.swift
  • ✅ Separated 4 optional date tests into AppStorageDateTests+Optional.swift
  • ✅ Main file contains enum namespace and shared test helper types
  • ✅ All 7 tests organized into 2 logical suites with @Suite attributes

ObservableDownloader Split

  • ✅ Extracted internal implementation helpers to ObservableDownloader+Internal.swift
  • ✅ Main file focuses on public API and core class definition (195 lines, reduced from 240)
  • ✅ Improved separation of concerns while maintaining all functionality

DevContainer Updates

  • ✅ Added Swift 6.2 and 6.3 devcontainer configurations
  • ✅ Updated existing devcontainer images to stable releases
  • ✅ Improved container naming for clarity

Test Plan

  • All 7 tests passing (swift test)
  • Lint checks passing (0 violations)
  • Build succeeds on all platforms
  • Test discovery working correctly with new structure

Files Changed

Created:

  • Tests/RadiantKitTests/AppStorageDateTests+NonOptional.swift
  • Tests/RadiantKitTests/AppStorageDateTests+Optional.swift
  • Sources/RadiantProgress/ObservableDownloader+Internal.swift
  • .devcontainer/swift-6.2/devcontainer.json
  • .devcontainer/swift-6.3/devcontainer.json

Modified:

  • Tests/RadiantKitTests/AppStorageDateTests.swift
  • Sources/RadiantProgress/ObservableDownloader.swift
  • .devcontainer/devcontainer.json
  • .devcontainer/swift-6.0/devcontainer.json
  • .devcontainer/swift-6.1/devcontainer.json

🤖 Generated with Claude Code


Perform an AI-assisted review on CodePeer.com

Summary by CodeRabbit

  • New Features

    • Percentage formatting utility for progress operations.
    • Expanded download operation capabilities and progress reporting.
  • Improvements

    • Development container configs updated for Swift 6.0–6.3.
    • Enhanced documentation across UI components and progress tooling.
    • Linting/formatting rule updates for improved consistency.
  • Dependencies

    • Bumped swift-format, SwiftLint, and periphery tool versions.
  • Tests

    • Added comprehensive AppStorage tests for optional and non-optional Date handling.
  • Refactor

    • Reorganized download-related internals for consistency.

✏️ Tip: You can customize this high-level summary in your review settings.

leogdion and others added 2 commits January 7, 2026 08:14
Split large test and source files into focused, maintainable units:

**AppStorageDateTests Split:**
- Created enum-based test suite pattern with extensions
- Separated non-optional date tests into AppStorageDateTests+NonOptional.swift
- Separated optional date tests into AppStorageDateTests+Optional.swift
- Main file now contains enum namespace and shared test helper types
- All 7 tests organized into 2 logical suites with @suite attributes

**ObservableDownloader Split:**
- Extracted internal implementation helpers to ObservableDownloader+Internal.swift
- Main file focuses on public API and core class definition
- Improved separation of concerns while maintaining functionality

**DevContainer Updates:**
- Added Swift 6.2 and 6.3 devcontainer configurations
- Updated existing devcontainer images to stable releases
- Improved container naming for clarity

All changes verified with swift test (7/7 tests passing) and lint checks (0 violations).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

📝 Walkthrough

Walkthrough

Updates devcontainer configs for Swift 6.x, upgrades formatting/lint tooling, expands InitializablePackageOptions API, reorganizes ObservableDownloader download event handling, adds progress formatting utility and AppStorage Date tests, and applies widespread documentation/formatting tweaks across RadiantKit and RadiantProgress.

Changes

Cohort / File(s) Summary
Devcontainer configs
.devcontainer/devcontainer.json, .devcontainer/swift-6.0/devcontainer.json, .devcontainer/swift-6.1/devcontainer.json, .devcontainer/swift-6.2/devcontainer.json, .devcontainer/swift-6.3/devcontainer.json
Updated base images and container names; added Swift 6.2 and 6.3 configs with feature/tooling and VS Code customizations.
Tooling & linters
.swift-format, .swiftlint.yml, Mintfile
Adjusted swift-format rules, reorganized SwiftLint rules (including custom no_unchecked_sendable), tuned complexity thresholds, and bumped Mint dependencies (swift-format, SwiftLint, periphery).
InitializablePackageOptions
Sources/RadiantDocs/Primitives/InitializablePackageOptions.swift
Added multiple public option flags (atomic, withoutOverwriting, file protection variants, withIntermediateDirectories, none), exposed rawValue and init(rawValue:).
Download / Observable flow
Sources/RadiantProgress/DownloadDelegate.swift, Sources/RadiantProgress/DownloadOperation.swift, Sources/RadiantProgress/ObservableDownloader.swift, Sources/RadiantProgress/ObservableDownloader+Internal.swift, Sources/RadiantProgress/ObserverContainer.swift, Sources/RadiantProgress/PreviewOperation.swift
Moved internal async event-forwarding helpers into a new internal ObservableDownloader+Internal extension (Combine/Observation guarded), changed ObservableDownloader completion visibility and internal event wiring, adjusted DownloadDelegate signatures, added ProgressOperation conformance/totalValue to DownloadOperation, reordered modifiers, and removed conditional URL @unchecked Sendable extension.
ProgressOperation utility
Sources/RadiantProgress/ProgressOperation.swift
Added percentValue(withFractionDigits:) to format progress as percentage string.
AppStorage tests & scaffolding
Tests/RadiantKitTests/AppStorageDateTests.swift, ...+NonOptional.swift, ...+Optional.swift
Reworked test scaffolding; added optional and non-optional Date test suites with platform availability guards and per-test stores.
Video parameter label updates
Sources/RadiantKit/Views/Video.swift
Changed NSViewRepresentable methods to use unused context parameter labels (context _:).
Docs / formatting (Views & Property Wrappers)
multiple files under Sources/RadiantKit/** (e.g., Views/*, PropertyWrappers/AppStorage/*, Color.swift, URLImage.swift, ViewExtensions/*)
Widespread documentation additions/indentation changes, minor brace/constraint reflow, small signature label doc updates; mostly non-functional formatting edits.
RadiantDocs / misc formatting
Sources/RadiantDocs/*, Sources/RadiantProgress/* (various)
Doc comment reflows, minor modifier reordering, added small public doc comments; no behavior changes except where noted above.
CI workflow tweak
.github/workflows/RadiantKit.yml
Narrowed condition for the Mint install step to check for an empty cache-hit string.

Sequence Diagram(s)

sequenceDiagram
  participant URLSession as URLSession
  participant DownloadDelegate as DownloadDelegate
  participant ObservableDownloader as ObservableDownloader
  participant Subjects as Subjects (location/resume/progress)

  Note over URLSession,DownloadDelegate: Download lifecycle (changed parameter labels)

  URLSession->>DownloadDelegate: didFinishDownloadingTo(location)
  DownloadDelegate->>ObservableDownloader: forward finishedDownloadingToAsync(location)
  ObservableDownloader->>Subjects: locationURLSubject.send(location)

  URLSession->>DownloadDelegate: didWriteData(...)
  DownloadDelegate->>ObservableDownloader: forward progressUpdatedAsync(progress)
  ObservableDownloader->>Subjects: downloadUpdate.send(progress)

  URLSession->>DownloadDelegate: didCompleteWithError(error?)
  DownloadDelegate->>ObservableDownloader: didCompleteAsync(withError)
  ObservableDownloader->>Subjects: resumeDataSubject.send(resumeData?) / completion
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 In devcontainers snug and lint rules new,

Options sprout where packages grew,
Downloads whisper progress bright,
Tests for dates now take their flight,
A rabbit hops—code feels light! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 'Refactor file organization for improved maintainability' directly aligns with the PR's primary objective of splitting large files into smaller, focused units for better organization and maintainability.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 259fd07 and 7f41d78.

📒 Files selected for processing (2)
  • .github/workflows/RadiantKit.yml
  • Sources/RadiantKit/AppKit/NSWindowAdaptorModifier.swift
🚧 Files skipped from review as they are similar to previous changes (1)
  • Sources/RadiantKit/AppKit/NSWindowAdaptorModifier.swift
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/Tests/RadiantKitTests/**/*.swift : Add tests to `Tests/RadiantKitTests/` for new features targeting the appropriate module
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to Package.swift : Apply `swiftSettings` for experimental Swift 6 features to all new targets in Package.swift (AccessLevelOnImport, BitwiseCopyable, IsolatedAny, MoveOnlyPartialConsumption, NestedProtocols, NoncopyableGenerics, TransferringArgsAndResults, VariadicGenerics)
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to Package.swift : Build the package using Swift 6.0 or later with `swift build` command
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/RadiantProgress/**/*.swift : RadiantProgress module should use swift-log for Linux compatibility when reporting progress
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/*.swift : Use swift-format (v600.0.0) with configuration in `.swift-format` for code formatting
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/RadiantProgress/**/*.swift : Use `ProgressOperation<ValueType: BinaryInteger & Sendable>` for flexible progress reporting in RadiantProgress module
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/Tests/**/*.swift : Run tests using `swift test` and filter specific tests with `swift test --filter RadiantKitTests.<TestClassName>/<testMethodName>`
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/RadiantDocs/**/*.swift : Use `DocumentFile<FileType: FileTypeSpecification>` for type-safe file handling in RadiantDocs module
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/*.swift : Use the `Observable` macro for iOS 17+ reactive state management in observable types
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/*.swift : Implement strict concurrency checking with Sendable conformance requirements throughout the codebase
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: claude-review
  • GitHub Check: Build on macOS (visionos, macos-26, /Applications/Xcode_26.2.app, Apple Vision Pro, 26.2)
  • GitHub Check: Build on macOS (watchos, macos-15, /Applications/Xcode_16.4.app, Apple Watch Ultra 2 (49mm), 11.5)
  • GitHub Check: Build on macOS (macos, macos-26, /Applications/Xcode_26.2.app)
  • GitHub Check: Build on macOS (macos-15, /Applications/Xcode_16.4.app)
  • GitHub Check: Build on macOS (macos, macos-15, /Applications/Xcode_16.4.app)
  • GitHub Check: Build on Windows (windows-2022, swift-6.2-release, 6.2-RELEASE)
  • GitHub Check: Build on Windows (windows-2025, swift-6.2-release, 6.2-RELEASE)
  • GitHub Check: Build on Android (nightly-main, 34)
  • GitHub Check: Build on Android (6.1, 28)
  • GitHub Check: Build on Android (6.2, 33)
🔇 Additional comments (1)
.github/workflows/RadiantKit.yml (1)

216-216: The condition is correct as written.

The cache-hit output from actions/cache@v4 has three possible values: 'true' (exact key match), 'false' (partial match via restore-keys), or '' (empty string for cache miss). The condition if: steps.cache-mint.outputs.cache-hit == '' correctly installs mint only when the cache is entirely missed. Changing this to != 'true' would incorrectly reinstall mint even when a partial cache match is restored.


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.

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

❌ Patch coverage is 15.55556% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.71%. Comparing base (4903492) to head (7f41d78).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/RadiantKit/Color.swift 0.00% 12 Missing ⚠️
...it/Views/GuidedLabeledContentDescriptionView.swift 0.00% 11 Missing ⚠️
...ources/RadiantKit/Views/GuidedLabeledContent.swift 0.00% 5 Missing ⚠️
...ppStorage/AppStorage+ExpressibleByNilLiteral.swift 0.00% 3 Missing ⚠️
Sources/RadiantKit/Views/ValueTextBubble.swift 0.00% 2 Missing ⚠️
...ertyWrappers/AppStorage/AppStorage+AppStored.swift 0.00% 1 Missing ⚠️
...rappers/AppStorage/AppStorage+DefaultWrapped.swift 0.00% 1 Missing ⚠️
Sources/RadiantKit/URLImage.swift 0.00% 1 Missing ⚠️
...ntKit/ViewExtensions/IdentifiableViewBuilder.swift 0.00% 1 Missing ⚠️
Sources/RadiantKit/Views/SliderStepperView.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main     #38      +/-   ##
========================================
+ Coverage   3.66%   3.71%   +0.05%     
========================================
  Files         24      24              
  Lines        355     404      +49     
========================================
+ Hits          13      15       +2     
- Misses       342     389      +47     
Flag Coverage Δ
6.2 0.00% <0.00%> (ø)
ios18.1 4.16% <25.00%> (-0.16%) ⬇️
ios18.6 3.59% <25.00%> (-0.16%) ⬇️
ios26.2 4.16% <25.00%> (-0.16%) ⬇️
macos 3.59% <25.00%> (-0.16%) ⬇️
nightly-6.3 0.00% <0.00%> (ø)
spm 3.59% <25.00%> (-0.16%) ⬇️
tvos26.2 4.81% <25.00%> (-0.15%) ⬇️
ubuntu 0.00% <0.00%> (ø)
visionos26.2 4.32% <15.55%> (+<0.01%) ⬆️
watchos11.2 4.19% <25.00%> (-0.16%) ⬇️
watchos11.5 3.78% <15.55%> (+0.03%) ⬆️
watchos26.2 4.32% <15.55%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@claude
Copy link

claude bot commented Jan 7, 2026

Code Review - PR #38: Refactor file organization for improved maintainability

I've completed a thorough review of this PR. Overall, this is a well-structured refactoring that improves code organization and maintainability. Here's my detailed feedback:


✅ Strengths

1. Excellent Test Organization

The split of AppStorageDateTests follows Swift Testing best practices:

  • Uses enum-based namespace pattern with extensions (AppStorageDateTests+NonOptional.swift, AppStorageDateTests+Optional.swift)
  • Proper @Suite attributes for logical grouping
  • Shared test helper types in the main file
  • All 7 tests are well-organized and maintainable

2. Good Separation of Concerns

The ObservableDownloader split effectively separates:

  • Public API (main file): initialization, public interface, protocol conformance
  • Internal implementation (+Internal.swift): private helper methods
  • File reduced from 240 to 195 lines while maintaining all functionality

3. DevContainer Improvements

  • Added Swift 6.2 and 6.3 configurations for future testing
  • Updated to stable releases (e.g., swift:6.2 instead of nightly)
  • Improved container naming for clarity

🔍 Code Quality Observations

Tooling Configuration Changes

swift-format changes (.swift-format):

  • Relaxed several formatting rules (e.g., lineBreakBeforeEachArgument, lineBreakBeforeControlFlowKeywords)
  • Disabled BeginDocumentationCommentWithOneLineSummary
  • Enabled NoLeadingUnderscores

SwiftLint changes (.swiftlint.yml):

  • Added missing_docs opt-in rule (good for API documentation)
  • Added custom no_unchecked_sendable rule (excellent for Swift 6 concurrency safety)
  • Increased limits: line length (90→100), file length (250→225)
  • Added analyzer rules (unused_import, unused_declaration)
  • Updated tool versions in Mintfile

⚠️ Concern: The formatting configuration changes are mixed with refactoring. This makes it harder to review and could affect many files. Consider:

  1. Separating formatting config changes into a dedicated PR
  2. Running the formatter across the entire codebase in that separate PR
  3. This keeps refactoring PRs focused on structural changes only

Code Formatting Changes

The diff shows many files with reformatted code (indentation, line breaks, spacing). Examples:

  • Sources/RadiantKit/Color.swift: Switch case indentation changed
  • Sources/RadiantKit/PropertyWrappers/: Parameter documentation formatting updated
  • Multiple files show brace positioning and whitespace adjustments

Recommendation: These formatting changes, while consistent with the new config, make code review more difficult. Future PRs should separate:

  • Configuration updates + full codebase reformatting (one PR)
  • Structural refactoring (another PR)

🎯 Specific Feedback

Test Files

AppStorageDateTests split (Sources/RadiantKitTests/):

  • ✅ Well-structured extension pattern
  • ✅ All tests use proper #expect assertions
  • ✅ Consistent use of defer { store.removePersistentDomain(forName: #function) } for cleanup
  • ✅ Platform availability checks are thorough
  • ⚠️ Minor: Consider extracting the repeated availability check pattern to a helper

ObservableDownloader Split

ObservableDownloader.swift + ObservableDownloader+Internal.swift:

  • ✅ Clean separation between public API and internal implementation
  • ✅ Maintains all concurrency safety (MainActor isolation, nonisolated helpers)
  • ✅ Internal methods appropriately marked
  • ⚠️ The use of implicitly unwrapped optionals (delegate!, session!) is acceptable here given the initialization pattern, but documented with lint suppressions

Documentation Updates

Multiple files show improved parameter documentation formatting:

  • ✅ Better alignment of parameter descriptions
  • ✅ More consistent formatting across the codebase

🔒 Security & Concurrency

  • ✅ No security concerns identified
  • ✅ Swift 6 concurrency model properly maintained
  • ✅ MainActor isolation preserved in UI components
  • ✅ Sendable conformance maintained
  • ✅ The new no_unchecked_sendable lint rule is an excellent addition for preventing unsafe concurrency patterns

📊 Test Coverage

Per the PR description:

  • ✅ All 7 tests passing
  • ✅ Lint checks passing (0 violations)
  • ✅ Build succeeds on all platforms
  • ✅ Test discovery working with new structure

Note: I cannot verify CI status without running checks, but the PR indicates all checks pass.


🎨 Best Practices Alignment

Comparing against CLAUDE.md:

  • ✅ Follows Swift 6.0+ experimental features
  • ✅ Maintains strict concurrency checking
  • ✅ Property wrappers remain properly structured
  • ✅ Copyright headers present in all new files
  • ✅ Platform availability checks appropriate
  • ✅ Consistent naming conventions

📝 Recommendations

High Priority

  1. Separate concerns in future PRs: Configuration changes + formatting should be isolated from structural refactoring
  2. Run full test suite: Verify all platforms (iOS, macOS, tvOS, watchOS, visionOS, Linux) pass with the new structure

Medium Priority

  1. Consider extracting test helpers: The repeated platform availability pattern in tests could be extracted
  2. Document the refactoring pattern: Update CLAUDE.md with guidance on when/how to split files using extensions

Low Priority

  1. Mintfile versions: Ensure the updated tool versions (swift-format@602.0.0, SwiftLint@0.62.2, periphery@3.2.0) are intentional and tested

✅ Final Verdict

Approved with minor recommendations

This PR successfully improves code organization and maintainability. The test file split follows best practices, and the ObservableDownloader separation is clean. The main suggestion is to separate formatting configuration changes from structural refactoring in future PRs to make reviews easier.

The code quality is high, concurrency safety is maintained, and the new lint rules (especially no_unchecked_sendable) are excellent additions for Swift 6 safety.


Great work on this refactoring! 🚀

Copy link

@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: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Sources/RadiantProgress/ProgressOperation.swift (1)

46-57: Critical: Division by zero when totalValue is zero.

The function doesn't handle the case where totalValue is 0 (but not nil). This will cause ratioValue to be infinity or NaN, which NumberFormatter will convert to an unexpected string representation rather than a meaningful percentage.

🐛 Proposed fix to handle zero totalValue
 public func percentValue(withFractionDigits fractionDigits: Int = 0) -> String? {
-  guard let totalValue else {
+  guard let totalValue, totalValue > 0 else {
     return nil
   }
   let formatter = NumberFormatter()
   formatter.maximumFractionDigits = fractionDigits
   formatter.minimumFractionDigits = fractionDigits
   let ratioValue = Double(currentValue) / Double(totalValue) * 100.0
   let string = formatter.string(from: .init(value: ratioValue))
   assert(string != nil)
   return string
 }
🤖 Fix all issues with AI agents
In @Mintfile:
- Around line 1-3: Update CI/tooling and config to account for the upgraded
Mintfile deps: ensure the Xcode/swift toolchain is Swift 6+ before upgrading
swift-format to 602.0.0 and SwiftLint to 0.62.2, update .swiftlint.yml to handle
the changed sorted_imports behavior and add/opt-out
incompatible_concurrency_annotation if you must support older concurrency
semantics, and test/rerun swift-format to verify import ordering; for periphery
3.2.0 remove usages of the removed flags (--targets, --workspace) in any scripts
or CI and switch installation method away from CocoaPods if used (use
brew/mint), then run the full lint and periphery analysis with the new versions
and confirm the project still reports 0 violations, adjusting configs or code
until it does.

In @Sources/RadiantKit/AppKit/NSWindowAdaptorModifier.swift:
- Around line 55-56: Remove the orphaned documentation dash from the SwiftDoc
comment above the NSWindowAdaptorModifier declaration: delete the stray line
containing only "///   -" so the doc comment reads cleanly (e.g., keep "/// -
Parameter _:  The context provided by the SwiftUI framework." and remove the
incomplete trailing bullet).

In @Sources/RadiantProgress/ObserverContainer.swift:
- Line 32: The property modifier order on the DownloadObserver property is
incorrect; change the declaration of the `observer` property from
`nonisolated(unsafe) private var observer: DownloadObserver?` to put the access
control first by using `private nonisolated(unsafe) var observer:
DownloadObserver?` so it conforms to Swift conventions and the project's
`modifier_order` SwiftLint rule; update the `observer` declaration in
ObserverContainer (the `observer` property) accordingly.
🧹 Nitpick comments (5)
Sources/RadiantKit/AppKit/NSWindowAdaptorModifier.swift (1)

114-115: Consider normalizing the spacing on line 115.

The extra spacing before "does nothing" on line 115 is inconsistent with typical documentation formatting. This is a minor nitpick.

📝 Proposed fix
 /// Adds a no-op `nsWindowAdaptor` modifier to the `View`.
-/// - Parameter _:  A closure that will be called with `Any?`, but
-///     does nothing.
+/// - Parameter _: A closure that will be called with `Any?`, but does nothing.
 /// - Returns: The original `View`.
 public func nsWindowAdaptor(_: @escaping (Any?) -> Void) -> some View { self }
Sources/RadiantProgress/DownloadDelegate.swift (1)

82-97: Consider marking unused bytesWritten parameter with _ for consistency.

The bytesWritten parameter is not used in the function body (only totalBytesWritten and totalBytesExpectedToWrite are used). For consistency with the pattern applied to downloadTask and task parameters, consider using _ as the internal name.

♻️ Proposed refactor for consistency
   internal func urlSession(
     _ session: URLSession,
     downloadTask _: URLSessionDownloadTask,
-    didWriteData bytesWritten: Int64,
+    didWriteData _: Int64,
     totalBytesWritten: Int64,
     totalBytesExpectedToWrite: Int64
   ) {

Update the corresponding doc comment:

   /// - Parameters:
   ///   - session: The URL session that initiated the download task.
   ///   - _: The download task that is reporting progress.
-  ///   - bytesWritten: The amount of data that has been written to the file.
+  ///   - _: The amount of data that has been written since the last progress update.
   ///   - totalBytesWritten: The total number of bytes written to the file so far.
   ///   - totalBytesExpectedToWrite: The total number of bytes expected to be
   ///     written to the file.
.devcontainer/swift-6.3/devcontainer.json (1)

3-3: Nightly image may be unstable.

Using swiftlang/swift:nightly-6.3-jammy is appropriate for early testing, but nightly builds can introduce breaking changes. Consider documenting this in the container name or README so developers understand the stability expectations.

Sources/RadiantProgress/ObservableDownloader+Internal.swift (2)

39-42: Consider consistent nil-handling for completion.

The assert(completion != nil) followed by optional chaining (completion?(result)) creates inconsistent behavior between debug and release builds. If completion must always be non-nil at this point, use a force unwrap or precondition; if it's legitimately optional, remove the assertion.

♻️ Suggested alternatives

Option 1: If completion must exist (use precondition):

-    assert(completion != nil)
-    completion?(result)
+    guard let completion else {
+      preconditionFailure("completion must be set before calling onCompletion")
+    }
+    completion(result)

Option 2: If completion is legitimately optional (remove assertion):

-    assert(completion != nil)
     completion?(result)

52-56: Clarify the success case comment.

The comment "Handle success case" is misleading since the method simply returns early when there's no error. Consider clarifying that no action is needed on success.

📝 Suggested comment improvement
     internal func didCompleteAsync(withError error: (any Error)?) {
       guard let error else {
-        // Handle success case.
+        // No action needed on success.
         return
       }
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4903492 and 259fd07.

📒 Files selected for processing (45)
  • .devcontainer/devcontainer.json
  • .devcontainer/swift-6.0/devcontainer.json
  • .devcontainer/swift-6.1/devcontainer.json
  • .devcontainer/swift-6.2/devcontainer.json
  • .devcontainer/swift-6.3/devcontainer.json
  • .swift-format
  • .swiftlint.yml
  • Mintfile
  • Sources/RadiantDocs/CodablePackageDocument.swift
  • Sources/RadiantDocs/Primitives/FileType.swift
  • Sources/RadiantDocs/Primitives/InitializablePackage.swift
  • Sources/RadiantDocs/Primitives/InitializablePackageOptions.swift
  • Sources/RadiantDocs/UTType.swift
  • Sources/RadiantKit/AppKit/NSWindowAdaptorModifier.swift
  • Sources/RadiantKit/Color.swift
  • Sources/RadiantKit/PropertyWrappers/AppStorage/AppStorage+AppStored.swift
  • Sources/RadiantKit/PropertyWrappers/AppStorage/AppStorage+DefaultWrapped.swift
  • Sources/RadiantKit/PropertyWrappers/AppStorage/AppStorage+ExpressibleByNilLiteral.swift
  • Sources/RadiantKit/PropertyWrappers/AppStored.swift
  • Sources/RadiantKit/TransformedValueObject.swift
  • Sources/RadiantKit/URLImage.swift
  • Sources/RadiantKit/ViewExtensions/IdentifiableViewBuilder.swift
  • Sources/RadiantKit/Views/Button.swift
  • Sources/RadiantKit/Views/GuidedLabeledContent.swift
  • Sources/RadiantKit/Views/GuidedLabeledContentDescriptionView.swift
  • Sources/RadiantKit/Views/PreferredLayout.swift
  • Sources/RadiantKit/Views/SliderStepperView.swift
  • Sources/RadiantKit/Views/ValueTextBubble.swift
  • Sources/RadiantKit/Views/Video.swift
  • Sources/RadiantPaging/ContainerView.swift
  • Sources/RadiantPaging/PageView.swift
  • Sources/RadiantProgress/CopyOperation.swift
  • Sources/RadiantProgress/DownloadDelegate.swift
  • Sources/RadiantProgress/DownloadOperation.swift
  • Sources/RadiantProgress/Downloader.swift
  • Sources/RadiantProgress/FileOperationProgress.swift
  • Sources/RadiantProgress/ObservableDownloader+Internal.swift
  • Sources/RadiantProgress/ObservableDownloader.swift
  • Sources/RadiantProgress/ObserverContainer.swift
  • Sources/RadiantProgress/PreviewOperation.swift
  • Sources/RadiantProgress/ProgressOperation.swift
  • Sources/RadiantProgress/ProgressOperationView.swift
  • Tests/RadiantKitTests/AppStorageDateTests+NonOptional.swift
  • Tests/RadiantKitTests/AppStorageDateTests+Optional.swift
  • Tests/RadiantKitTests/AppStorageDateTests.swift
💤 Files with no reviewable changes (1)
  • Sources/RadiantProgress/PreviewOperation.swift
🧰 Additional context used
📓 Path-based instructions (5)
**/*.swift

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.swift: All Swift source files require copyright headers managed by Scripts/header.sh
Use swift-format (v600.0.0) with configuration in .swift-format for code formatting
Use SwiftLint (v0.58.0) with rules defined in .swiftlint.yml for Swift style validation
All UI components must be isolated with the @MainActor attribute
Closures crossing actor boundaries must be marked as @Sendable
Use nonisolated sparingly and only when necessary in actor-isolated code
Use protocol names as descriptive nouns (e.g., CodablePackage, ProgressOperation, FileTypeSpecification) for protocol definitions
Use full words for generic type parameters (e.g., FileType, ValueType) instead of single letters
Follow the environment key naming pattern: <Action>Key (e.g., NextPageKey, PreviousPageKey, CancelPageKey) for SwiftUI EnvironmentKey definitions
Use #if canImport() or #if os() directives for platform-specific code
Implement strict concurrency checking with Sendable conformance requirements throughout the codebase
Use the @Observable macro for iOS 17+ reactive state management in observable types
Use property wrappers @AppStored and @DefaultWrapped for persistent storage patterns
Code must be compatible with strict concurrency checking and Sendable requirements across all platforms

Files:

  • Sources/RadiantProgress/ProgressOperation.swift
  • Sources/RadiantKit/Views/PreferredLayout.swift
  • Sources/RadiantKit/TransformedValueObject.swift
  • Sources/RadiantDocs/CodablePackageDocument.swift
  • Sources/RadiantDocs/UTType.swift
  • Sources/RadiantKit/Views/Button.swift
  • Sources/RadiantKit/Views/GuidedLabeledContentDescriptionView.swift
  • Sources/RadiantKit/Views/GuidedLabeledContent.swift
  • Sources/RadiantKit/AppKit/NSWindowAdaptorModifier.swift
  • Sources/RadiantDocs/Primitives/InitializablePackage.swift
  • Tests/RadiantKitTests/AppStorageDateTests+Optional.swift
  • Sources/RadiantProgress/ObservableDownloader+Internal.swift
  • Sources/RadiantProgress/Downloader.swift
  • Sources/RadiantKit/Views/ValueTextBubble.swift
  • Sources/RadiantKit/ViewExtensions/IdentifiableViewBuilder.swift
  • Sources/RadiantProgress/ProgressOperationView.swift
  • Sources/RadiantPaging/PageView.swift
  • Sources/RadiantDocs/Primitives/FileType.swift
  • Tests/RadiantKitTests/AppStorageDateTests+NonOptional.swift
  • Sources/RadiantKit/URLImage.swift
  • Sources/RadiantProgress/FileOperationProgress.swift
  • Sources/RadiantKit/PropertyWrappers/AppStored.swift
  • Sources/RadiantKit/PropertyWrappers/AppStorage/AppStorage+AppStored.swift
  • Sources/RadiantProgress/CopyOperation.swift
  • Sources/RadiantKit/Color.swift
  • Sources/RadiantProgress/ObservableDownloader.swift
  • Sources/RadiantPaging/ContainerView.swift
  • Tests/RadiantKitTests/AppStorageDateTests.swift
  • Sources/RadiantKit/Views/Video.swift
  • Sources/RadiantProgress/DownloadOperation.swift
  • Sources/RadiantDocs/Primitives/InitializablePackageOptions.swift
  • Sources/RadiantKit/PropertyWrappers/AppStorage/AppStorage+DefaultWrapped.swift
  • Sources/RadiantKit/Views/SliderStepperView.swift
  • Sources/RadiantKit/PropertyWrappers/AppStorage/AppStorage+ExpressibleByNilLiteral.swift
  • Sources/RadiantProgress/DownloadDelegate.swift
  • Sources/RadiantProgress/ObserverContainer.swift
**/RadiantProgress/**/*.swift

📄 CodeRabbit inference engine (CLAUDE.md)

**/RadiantProgress/**/*.swift: Use ProgressOperation<ValueType: BinaryInteger & Sendable> for flexible progress reporting in RadiantProgress module
RadiantProgress module should use swift-log for Linux compatibility when reporting progress

Files:

  • Sources/RadiantProgress/ProgressOperation.swift
  • Sources/RadiantProgress/ObservableDownloader+Internal.swift
  • Sources/RadiantProgress/Downloader.swift
  • Sources/RadiantProgress/ProgressOperationView.swift
  • Sources/RadiantProgress/FileOperationProgress.swift
  • Sources/RadiantProgress/CopyOperation.swift
  • Sources/RadiantProgress/ObservableDownloader.swift
  • Sources/RadiantProgress/DownloadOperation.swift
  • Sources/RadiantProgress/DownloadDelegate.swift
  • Sources/RadiantProgress/ObserverContainer.swift
**/RadiantDocs/**/*.swift

📄 CodeRabbit inference engine (CLAUDE.md)

Use DocumentFile<FileType: FileTypeSpecification> for type-safe file handling in RadiantDocs module

Files:

  • Sources/RadiantDocs/CodablePackageDocument.swift
  • Sources/RadiantDocs/UTType.swift
  • Sources/RadiantDocs/Primitives/InitializablePackage.swift
  • Sources/RadiantDocs/Primitives/FileType.swift
  • Sources/RadiantDocs/Primitives/InitializablePackageOptions.swift
**/Tests/**/*.swift

📄 CodeRabbit inference engine (CLAUDE.md)

**/Tests/**/*.swift: Run tests using swift test and filter specific tests with swift test --filter RadiantKitTests.<TestClassName>/<testMethodName>
Ensure tests pass on both macOS and Linux platforms

Files:

  • Tests/RadiantKitTests/AppStorageDateTests+Optional.swift
  • Tests/RadiantKitTests/AppStorageDateTests+NonOptional.swift
  • Tests/RadiantKitTests/AppStorageDateTests.swift
**/Tests/RadiantKitTests/**/*.swift

📄 CodeRabbit inference engine (CLAUDE.md)

Add tests to Tests/RadiantKitTests/ for new features targeting the appropriate module

Files:

  • Tests/RadiantKitTests/AppStorageDateTests+Optional.swift
  • Tests/RadiantKitTests/AppStorageDateTests+NonOptional.swift
  • Tests/RadiantKitTests/AppStorageDateTests.swift
🧠 Learnings (16)
📓 Common learnings
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/Tests/RadiantKitTests/**/*.swift : Add tests to `Tests/RadiantKitTests/` for new features targeting the appropriate module
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to Package.swift : Build the package using Swift 6.0 or later with `swift build` command
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to Package.swift : Apply `swiftSettings` for experimental Swift 6 features to all new targets in Package.swift (AccessLevelOnImport, BitwiseCopyable, IsolatedAny, MoveOnlyPartialConsumption, NestedProtocols, NoncopyableGenerics, TransferringArgsAndResults, VariadicGenerics)
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/RadiantProgress/**/*.swift : Use `ProgressOperation<ValueType: BinaryInteger & Sendable>` for flexible progress reporting in RadiantProgress module
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/RadiantProgress/**/*.swift : Use `ProgressOperation<ValueType: BinaryInteger & Sendable>` for flexible progress reporting in RadiantProgress module

Applied to files:

  • Sources/RadiantProgress/ProgressOperation.swift
  • Sources/RadiantProgress/ObservableDownloader+Internal.swift
  • Sources/RadiantProgress/ProgressOperationView.swift
  • Sources/RadiantProgress/FileOperationProgress.swift
  • Sources/RadiantProgress/CopyOperation.swift
  • Sources/RadiantProgress/DownloadOperation.swift
  • Sources/RadiantProgress/DownloadDelegate.swift
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/RadiantDocs/**/*.swift : Use `DocumentFile<FileType: FileTypeSpecification>` for type-safe file handling in RadiantDocs module

Applied to files:

  • Sources/RadiantKit/Views/PreferredLayout.swift
  • Sources/RadiantDocs/UTType.swift
  • Sources/RadiantKit/Views/GuidedLabeledContentDescriptionView.swift
  • Sources/RadiantKit/AppKit/NSWindowAdaptorModifier.swift
  • Sources/RadiantDocs/Primitives/FileType.swift
  • Sources/RadiantProgress/FileOperationProgress.swift
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to Package.swift : Apply `swiftSettings` for experimental Swift 6 features to all new targets in Package.swift (AccessLevelOnImport, BitwiseCopyable, IsolatedAny, MoveOnlyPartialConsumption, NestedProtocols, NoncopyableGenerics, TransferringArgsAndResults, VariadicGenerics)

Applied to files:

  • .devcontainer/swift-6.3/devcontainer.json
  • .devcontainer/swift-6.2/devcontainer.json
  • .devcontainer/swift-6.0/devcontainer.json
  • .swiftlint.yml
  • .devcontainer/swift-6.1/devcontainer.json
  • .swift-format
  • Sources/RadiantDocs/Primitives/InitializablePackageOptions.swift
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to Package.swift : Build the package using Swift 6.0 or later with `swift build` command

Applied to files:

  • .devcontainer/swift-6.3/devcontainer.json
  • Mintfile
  • .devcontainer/swift-6.2/devcontainer.json
  • .devcontainer/swift-6.0/devcontainer.json
  • .devcontainer/devcontainer.json
  • .devcontainer/swift-6.1/devcontainer.json
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/*.swift : Use swift-format (v600.0.0) with configuration in `.swift-format` for code formatting

Applied to files:

  • Mintfile
  • .swift-format
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/*.swift : Use SwiftLint (v0.58.0) with rules defined in `.swiftlint.yml` for Swift style validation

Applied to files:

  • Mintfile
  • .swiftlint.yml
  • .swift-format
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Use the lint script (`./Scripts/lint.sh`) to format code, add copyright headers, and validate against swift-format and swiftlint rules

Applied to files:

  • Mintfile
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/*.swift : Code must be compatible with strict concurrency checking and Sendable requirements across all platforms

Applied to files:

  • .swiftlint.yml
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/*.swift : Implement strict concurrency checking with Sendable conformance requirements throughout the codebase

Applied to files:

  • .swiftlint.yml
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/Tests/RadiantKitTests/**/*.swift : Add tests to `Tests/RadiantKitTests/` for new features targeting the appropriate module

Applied to files:

  • Tests/RadiantKitTests/AppStorageDateTests+Optional.swift
  • Tests/RadiantKitTests/AppStorageDateTests+NonOptional.swift
  • Tests/RadiantKitTests/AppStorageDateTests.swift
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/*.swift : Use property wrappers `AppStored` and `DefaultWrapped` for persistent storage patterns

Applied to files:

  • Tests/RadiantKitTests/AppStorageDateTests+Optional.swift
  • Tests/RadiantKitTests/AppStorageDateTests+NonOptional.swift
  • Sources/RadiantKit/PropertyWrappers/AppStored.swift
  • Sources/RadiantKit/PropertyWrappers/AppStorage/AppStorage+AppStored.swift
  • Tests/RadiantKitTests/AppStorageDateTests.swift
  • Sources/RadiantKit/PropertyWrappers/AppStorage/AppStorage+DefaultWrapped.swift
  • Sources/RadiantKit/PropertyWrappers/AppStorage/AppStorage+ExpressibleByNilLiteral.swift
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/*.swift : Use the `Observable` macro for iOS 17+ reactive state management in observable types

Applied to files:

  • Sources/RadiantProgress/ObservableDownloader+Internal.swift
  • Sources/RadiantProgress/FileOperationProgress.swift
  • Sources/RadiantProgress/ObserverContainer.swift
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/*.swift : Use full words for generic type parameters (e.g., FileType, ValueType) instead of single letters

Applied to files:

  • Sources/RadiantDocs/Primitives/FileType.swift
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/Tests/**/*.swift : Ensure tests pass on both macOS and Linux platforms

Applied to files:

  • Tests/RadiantKitTests/AppStorageDateTests+NonOptional.swift
  • Tests/RadiantKitTests/AppStorageDateTests.swift
📚 Learning: 2026-01-07T01:07:59.379Z
Learnt from: CR
Repo: brightdigit/RadiantKit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-07T01:07:59.379Z
Learning: Applies to **/*.swift : Follow the environment key naming pattern: `<Action>Key` (e.g., NextPageKey, PreviousPageKey, CancelPageKey) for SwiftUI EnvironmentKey definitions

Applied to files:

  • Sources/RadiantKit/PropertyWrappers/AppStored.swift
🧬 Code graph analysis (1)
Tests/RadiantKitTests/AppStorageDateTests+NonOptional.swift (1)
Tests/RadiantKitTests/AppStorageDateTests+Optional.swift (4)
  • enabled (42-70)
  • enabled (72-99)
  • enabled (101-133)
  • enabled (135-163)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: claude-review
  • GitHub Check: Build on macOS (watchos, macos-15, /Applications/Xcode_16.4.app, Apple Watch Ultra 2 (49mm), 11.5)
  • GitHub Check: Build on macOS (macos, macos-26, /Applications/Xcode_26.2.app)
  • GitHub Check: Build on macOS (ios, macos-15, /Applications/Xcode_16.4.app, iPhone 16 Pro, 18.6)
  • GitHub Check: Build on macOS (visionos, macos-26, /Applications/Xcode_26.2.app, Apple Vision Pro, 26.2)
  • GitHub Check: Build on macOS (watchos, macos-26, /Applications/Xcode_26.2.app, Apple Watch Ultra 3 (49mm), 26.2)
  • GitHub Check: Build on Android (6.1, 28)
  • GitHub Check: Build on Android (nightly-main, 34)
  • GitHub Check: Build on Android (6.2, 33)
  • GitHub Check: Build on Windows (windows-2025, swift-6.2-release, 6.2-RELEASE)
  • GitHub Check: Build on Windows (windows-2022, swift-6.2-release, 6.2-RELEASE)
🔇 Additional comments (68)
Sources/RadiantKit/TransformedValueObject.swift (1)

110-111: Documentation formatting improvement looks good.

The indentation adjustment for the transform parameter description improves readability and aligns with Swift documentation conventions.

Sources/RadiantKit/AppKit/NSWindowAdaptorModifier.swift (1)

69-70: LGTM!

The documentation correctly aligns with the function signature where both parameters are intentionally unused.

Sources/RadiantKit/PropertyWrappers/AppStored.swift (1)

48-55: LGTM!

The formatting adjustments to the switch cases improve readability while maintaining the existing key generation logic.

Sources/RadiantKit/PropertyWrappers/AppStorage/AppStorage+ExpressibleByNilLiteral.swift (1)

43-52: LGTM!

The documentation comment indentation and brace placement adjustments are consistently applied across all initializers, improving readability without changing functionality.

Sources/RadiantKit/PropertyWrappers/AppStorage/AppStorage+AppStored.swift (1)

61-62: LGTM!

Documentation comment formatting and brace placement adjustments are consistent with the other AppStorage extension files in this PR.

Also applies to: 189-203

Tests/RadiantKitTests/AppStorageDateTests+NonOptional.swift (3)

38-66: Well-structured test organization with proper platform guards.

The test structure correctly:

  • Uses @MainActor as required by coding guidelines
  • Implements proper cleanup with defer { store.removePersistentDomain(...) }
  • Guards for platform availability with both compile-time (#if canImport(SwiftUI)) and runtime (#available) checks
  • Uses #function for unique UserDefaults suite names to prevent test pollution

The Issue.record calls for unavailable platforms ensure tests report clearly rather than silently passing on Linux.


68-98: LGTM!

The update test properly verifies both the wrappedValue mutation and the underlying UserDefaults persistence.


100-127: LGTM!

The reflecting key test validates that the .reflecting key type generates keys containing the type name, which is the expected behavior from the AppStored protocol extension.

Sources/RadiantKit/PropertyWrappers/AppStorage/AppStorage+DefaultWrapped.swift (1)

41-42: LGTM!

Formatting adjustments are consistent with the other AppStorage extension files in this PR.

Also applies to: 143-144

Tests/RadiantKitTests/AppStorageDateTests.swift (2)

40-58: Clean test type definitions with appropriate key types.

The four test enums correctly define:

  • TestDateStored and TestOptionalDateStored with .describing key type
  • TestReflectingDateStored and TestReflectingOptionalDateStored with .reflecting key type

This allows the test extensions to verify both key generation strategies.


62-75: Good use of enum namespace pattern for test organization.

The AppStorageDateTests enum serves as a namespace for the test extensions in the +NonOptional.swift and +Optional.swift files. The centralized isAppStorageDateAvailable property enables consistent platform gating via @Test(.enabled(if:)).

Tests/RadiantKitTests/AppStorageDateTests+Optional.swift (3)

38-70: Well-structured optional date storage tests.

The test suite correctly:

  • Uses @MainActor as required by coding guidelines
  • Verifies that optional storage starts as nil
  • Tests mutation from nil to a value and verifies underlying storage
  • Follows the same platform guard pattern as the non-optional tests

101-133: Comprehensive nil lifecycle testing.

The testOptionalDateSetToNil test properly verifies the complete optional value lifecycle: initial state → set value → verify → set nil → verify both wrapper and underlying storage are nil.


135-163: LGTM!

The reflecting key test for optional dates properly validates both the key generation and storage persistence, complementing the non-optional reflecting key test.

Sources/RadiantProgress/DownloadDelegate.swift (2)

49-71: LGTM! Documentation and parameter naming are clear.

The updated documentation accurately reflects the parameter naming changes. Using _ for the unused downloadTask parameter improves code clarity.


99-112: LGTM! Documentation and implementation are correct.

The parameter naming and documentation accurately reflect the usage. The task parameter is appropriately marked as unused with _.

Sources/RadiantDocs/Primitives/FileType.swift (1)

54-54: LGTM! Documentation formatting improved.

The additional indentation aligns the parameter description consistently with SwiftDoc formatting conventions.

Sources/RadiantKit/URLImage.swift (1)

39-39: LGTM! Documentation added for View body property.

The documentation comment follows standard SwiftUI conventions and improves API documentation completeness.

Sources/RadiantProgress/Downloader.swift (1)

51-52: LGTM! Documentation formatting improved.

The multi-line parameter description is now properly indented for better readability.

Sources/RadiantDocs/UTType.swift (1)

59-61: LGTM! Code formatting improved for consistency.

The opening brace placement aligns with swift-format conventions and improves readability of the if-let binding.

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

79-82: LGTM! Documentation improvements enhance API clarity.

The formatting adjustments for multi-line parameter descriptions and addition of explicit Returns: sections improve the documentation quality and follow Swift documentation conventions.

Also applies to: 117-117, 129-131

.devcontainer/swift-6.0/devcontainer.json (1)

2-2: LGTM! Improved container naming for clarity.

The name change from "Swift" to "Swift 6.0" provides better identification when multiple Swift version containers are available (6.0, 6.1, 6.2, 6.3 as indicated in the PR).

Sources/RadiantProgress/FileOperationProgress.swift (1)

35-35: LGTM! Public API documentation added.

The documentation comment accurately describes the class's role as an observable wrapper for SwiftUI views, improving API discoverability.

Sources/RadiantKit/Views/GuidedLabeledContentDescriptionView.swift (2)

53-56: LGTM! Concise formatting improves readability.

The switch cases have been reformatted to single-line expressions, making the code more concise while maintaining identical logic.

Also applies to: 61-64, 69-72


75-75: LGTM! Documentation enhancements.

The addition of a view description comment and improved parameter documentation formatting enhance API clarity.

Also applies to: 86-89

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

38-42: LGTM!

Documentation parameter descriptions are properly reformatted to respect line length while maintaining clarity.

Also applies to: 52-53

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

56-70: LGTM!

Good addition of documentation for the body property and the primary initializer. The parameter descriptions are well-formatted and provide clear guidance.

Also applies to: 92-93

Sources/RadiantKit/Color.swift (1)

50-63: LGTM!

Formatting cleanup improves readability. The hex color parsing logic remains correct for 3-digit (RGB 12-bit), 6-digit (RGB 24-bit), and 8-digit (ARGB 32-bit) formats.

.swift-format (2)

9-13: Configuration changes look reasonable.

The disabled options (indentSwitchCaseLabels, line break settings, BeginDocumentationCommentWithOneLineSummary) align with the formatting patterns observed in the updated source files. These provide more flexibility in code layout while maintaining consistency through other enforced rules.

Also applies to: 29-29


45-45: The NoLeadingUnderscores rule is safe to enable and poses no compatibility issues with property wrapper usage.

Property wrapper backing storage is synthesized by the compiler with leading underscores (e.g., _currentPageID) but does not appear in source code. Swift-format's rule only triggers on explicitly written underscore-prefixed identifiers in your source, and the codebase contains no such patterns.

Likely an incorrect or invalid review comment.

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

57-60: LGTM!

Formatting adjustment aligns with swift-format configuration. The result builder logic remains correct.

Sources/RadiantPaging/PageView.swift (2)

54-65: LGTM!

Switch case formatting and body documentation are well-aligned with the project's updated style guidelines. The navigation availability logic correctly handles all edge cases.

Also applies to: 68-68


88-105: LGTM!

Documentation parameter formatting is consistent with other files in this PR.

.devcontainer/swift-6.3/devcontainer.json (1)

5-8: Remove this comment — claim about inconsistency is incorrect.

All devcontainers in this repository (swift-6.0, swift-6.1, swift-6.2, swift-6.3, and the main config) consistently use "remoteUser": "root". The swift-6.3 configuration is not inconsistent with other devcontainers; it follows the same pattern. The mismatch between the vscode user created by the common-utils feature and the root remoteUser exists uniformly across all configurations and appears intentional.

Likely an incorrect or invalid review comment.

.devcontainer/swift-6.1/devcontainer.json (1)

2-3: LGTM! Container configuration updated to stable release.

The changes update the container to use the stable Swift 6.1 image instead of the nightly build, and improve the container name for better clarity. This aligns with the broader devcontainer standardization across Swift versions in this PR.

Sources/RadiantPaging/ContainerView.swift (2)

99-99: Documentation improvement LGTM.

The added inline documentation for the body property follows SwiftUI conventions and improves code readability.


118-119: Documentation reflow LGTM.

The parameter documentation has been reflowed for better readability with no semantic changes.

Sources/RadiantProgress/CopyOperation.swift (2)

55-55: LGTM! Modifier ordering standardized.

The reordering of nonisolated and access control modifiers (private, public) improves consistency across the codebase. This appears to be an automated formatting change from swift-format.

Also applies to: 68-68, 104-104


76-77: Documentation reflow LGTM.

The parameter documentation has been reflowed for improved readability with no semantic changes.

Also applies to: 80-81

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

72-72: Documentation improvement LGTM.

The added inline documentation for the body property follows SwiftUI conventions and improves consistency.


101-102: Documentation reflow LGTM.

The parameter documentation has been reflowed for better readability with no semantic changes.

Also applies to: 106-107

Sources/RadiantProgress/ObservableDownloader.swift (3)

77-77: LGTM! Visibility change necessary for file split refactoring.

Changing completion from private to internal is appropriate given the extraction of internal helpers to ObservableDownloader+Internal.swift. This allows the extension to access the completion callback.


172-172: Documentation reflow LGTM.

The parameter documentation has been reflowed for improved readability with no semantic changes.


190-203: All three async methods are properly defined in the extension file.

The extension file ObservableDownloader+Internal.swift correctly defines:

  • finishedDownloadingToAsync(_:) at line 44
  • progressUpdatedAsync(_:) at line 48
  • didCompleteAsync(withError:) at line 52

The internal implementation helpers have been successfully extracted as intended.

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

44-45: LGTM! Formatting and documentation improvements.

The changes improve code consistency by standardizing where-clause formatting and adding documentation for the body property. All modifications are non-functional and align with the PR's maintainability objectives.

Also applies to: 58-58, 94-96, 113-117, 127-128

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

52-54: LGTM! Improved parameter clarity.

Renaming unused context parameters to _ appropriately signals that these NSViewRepresentable protocol conformance parameters are not utilized in the implementation.

Also applies to: 65-67

Sources/RadiantProgress/ObservableDownloader+Internal.swift (2)

44-50: LGTM! Clean forwarding implementations.

The async forwarding methods for location and progress updates are straightforward and appropriate. Combine subjects handle thread-safety internally.


34-62: Integration verified: all properties and method calls are correctly implemented.

All referenced properties (locationURLSubject, downloadUpdate, resumeDataSubject, completion) are defined in the main ObservableDownloader class with correct types. All internal methods are properly called from ObservableDownloader.swift (lines 191-202) with appropriate Task { @MainActor in ... } wrapping for concurrency safety, and onCompletion is called from SetupPublishers.swift. The integration is complete and functioning as expected.

.swiftlint.yml (2)

133-138: Excellent addition! Enforces strict concurrency safety.

The no_unchecked_sendable custom rule directly supports the project's coding guidelines requiring strict concurrency checking. Preventing @unchecked Sendable ensures proper Sendable conformance throughout the codebase.

As per coding guidelines: "Implement strict concurrency checking with Sendable conformance requirements throughout the codebase."


90-92: LGTM! Improved linting configuration.

The additions strengthen code quality checks:

  • Analyzer rules catch unused imports and declarations
  • Error-level severity for file_name and fatal_error_message ensures consistency
  • Disabled rules prevent noise in areas where the team has made intentional style choices

Also applies to: 120-132

.devcontainer/devcontainer.json (1)

3-3: Use the official swift:6.2 stable image instead of the nightly build.

The change from swiftlang/swift:nightly-6.1-jammy to swift:6.2 improves build stability by using an official, stable release image from Docker Hub's library instead of a nightly build.

Sources/RadiantDocs/CodablePackageDocument.swift (1)

85-87: LGTM! Formatting adjustment aligns with project style.

The brace placement on a new line for the if-let binding is a formatting-only change with no functional impact.

Sources/RadiantProgress/ProgressOperationView.swift (1)

47-47: LGTM! Documentation improvement.

The added documentation comment improves clarity for the public body property.

Sources/RadiantProgress/DownloadOperation.swift (5)

43-45: LGTM! ProgressOperation conformance enables flexible progress reporting.

The conformance to ProgressOperation aligns with the RadiantProgress module's pattern for flexible progress reporting.

Based on learnings, this is the recommended approach for progress operations in the RadiantProgress module.


52-52: LGTM! Appropriate use of nonisolated for Sendable URL.

The nonisolated modifier is correctly applied to the id property since URL is Sendable and immutable, making it safe for concurrent access across actor boundaries.


59-61: LGTM! totalValue property enables progress percentage calculations.

The computed property correctly maps download.totalBytesExpectedToWrite to the generic ValueType, enabling progress percentage calculations via the ProgressOperation protocol.


67-74: LGTM! Documentation formatting improves readability.

The improved line breaks and indentation in the parameter documentation enhance readability without changing semantic meaning.


97-97: LGTM! Documentation formatting improves consistency.

The single-line documentation for the destinationURL parameter improves consistency with the rest of the codebase.

Sources/RadiantDocs/Primitives/InitializablePackage.swift (1)

52-53: LGTM! Documentation formatting adjustment.

The indentation adjustment to the parameter documentation improves consistency without changing the semantic meaning.

.devcontainer/swift-6.2/devcontainer.json (1)

1-40: Swift 6.2 image is available and stable.

The swiftlang/swift:6.2 Docker image exists on Docker Hub and is stable. Swift 6.2 was officially released on September 15, 2025. The dev container configuration is valid.

Sources/RadiantProgress/ProgressOperation.swift (2)

32-32: LGTM!

The protocol documentation clearly describes the purpose of ProgressOperation.


42-45: LGTM!

The function documentation is clear and follows proper documentation patterns.

Sources/RadiantDocs/Primitives/InitializablePackageOptions.swift (6)

32-32: LGTM!

The struct documentation clearly describes the purpose of InitializablePackageOptions.


50-50: Appropriate use of SwiftLint directive.

The swiftlint:disable/enable identifier_name directives are correctly placed around the long identifier completeFileProtectionUntilFirstUserAuthentication, which matches Foundation's naming convention and should not be shortened.

Also applies to: 55-55


64-65: LGTM!

The documentation for the .none constant is clear and appropriate.


66-67: LGTM!

The documentation for the rawValue property follows standard patterns.


72-75: LGTM!

The initializer documentation is clear and follows proper documentation patterns.


81-81: LGTM!

The minor documentation wording improvement enhances clarity.

Comment on lines +1 to +3
swiftlang/swift-format@602.0.0
realm/SwiftLint@0.62.2
peripheryapp/periphery@3.2.0
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

SwiftLint 0.59.0 0.60.0 0.61.0 0.62.0 0.62.2 breaking changes new rules

💡 Result:

Summary of notable breaking changes and new/renamed rules in SwiftLint 0.59.0 → 0.62.2

  • 0.59.0

    • Breaking: removed tracking of correction positions; SwiftLint now prints number of corrections instead. [1]
  • 0.60.0

    • Breaking:
      • Removed boolean support for the validates_start_with_lowercase option — use severity values (off/warning/error). [1][2]
      • Requires macOS 13+ to run. [1][2]
      • swiftlint_linux.zip renamed to swiftlint_linux_amd64.zip (arm64 added separately). [1][2]
      • redundant_optional_initialization replaced by implicit_optional_initialization (redundant_optional_initialization remains an alias). [1][2]
  • 0.61.0

    • Breaking:
      • If SWIFTLINT_DISABLE_SOURCEKIT is set to block loading libsourcekitdInProc, SourceKit‑dependent rules are disabled and a warning is printed per rule. [1]
      • operator_whitespace rule removed and merged into function_name_whitespace (which gained additional spacing checks and autocorrect). [1]
  • 0.62.0

    • Breaking:

      • SwiftLint now requires Swift 6+ to build. (SPM plugins still work down to Swift 5.9.) [1]
      • The SwiftLintBinary.artifactbundle.zip internal structure/path layout simplified (affects Xcode Run Script path usage). [1]
      • sorted_imports behavior changed: imports directly adjacent are treated as a group; groups separated by non-imports or blank lines remain separate; comments attach to their import group. [1]
    • New rule (added in 0.62.0):

      • prefer_asset_symbols (suggest using asset symbols vs string image names). [1]
  • 0.62.2

    • New rule:
      • incompatible_concurrency_annotation (flags declarations that need @preconcurrency to stay Swift 5 compatible). [3]
    • Enhancements:
      • modifier_order: added isolation modifier group to configure nonisolated position. [3]
    • Bug fixes: several fixes to sorted_imports correction and closure_end_indentation handling of #Preview macros. [3]

Sources:

  • SwiftLint release notes (GitHub Releases). [1]
  • SwiftLint 0.60.0 release details. [2]
  • SwiftLint 0.62.2 release details. [3]

If you want I can paste the exact release-note lines or link to each release.


🌐 Web query:

periphery 3.0.0 breaking changes migration from 2.x

💡 Result:

Summary of Periphery 3.0.0 breaking changes and migration steps

Breaking changes

  • Periphery 3.0 changes how files are selected: it now scans all source files referenced in the index store (no more explicit --targets). The --targets option is removed. [1]
  • --workspace removed; use --project for both .xcworkspace and .xcodeproj. [1]
  • CocoaPods installer support removed. [2]
  • Swift 5.9 / Xcode 15.2 support removed. [2]
  • Homebrew distribution moved to the official Homebrew repo (peripheryapp/periphery tap is deprecated). [1][2]
  • Bazel support changed: file-targets-path removed; use built-in Bazel support and the --bazel option (and add periphery dep to MODULE.bazel). [1]

Key migration actions

  • Replace any use of --targets by configuring file exclusions (see README Excluding Files) or rely on the new index-store-based scanning. [1]
  • Replace --workspace with --project in scripts/CI. [1]
  • If you installed via the old Homebrew tap, remove/untap and reinstall from official Homebrew:
    brew remove periphery
    brew untap peripheryapp/periphery
    brew update
    brew install periphery. [2]
  • If you used CocoaPods to install Periphery, switch to Homebrew, Mint, or another supported installer. [2]
  • For Bazel users, remove -—file-targets-path usage and follow the MODULE.bazel instructions, then run scans with --bazel. [1]
  • Verify your Xcode/Swift toolchain compatibility (Swift 5.9 / Xcode 15.2 no longer supported by Periphery 3.0). [2]

References

  • 3.0 Migration Guide (peripheryapp/periphery wiki). [1]
  • GitHub Releases — 3.0.0 release notes. [2]
  • periphery README (usage / indexing behavior). [3]

🏁 Script executed:

# Check if .swiftlint.yml references operator_whitespace (removed in 0.61.0)
find . -name ".swiftlint.yml" -o -name ".swiftlint.yaml" | head -5

Repository: brightdigit/RadiantKit

Length of output: 82


🏁 Script executed:

# Check how periphery is configured (look for scripts/config that use --targets)
find . -type f \( -name "Mintfile" -o -name "*.sh" -o -name "*.yml" -o -name "*.yaml" \) | xargs grep -l "periphery" 2>/dev/null | head -10

Repository: brightdigit/RadiantKit

Length of output: 76


🏁 Script executed:

cat .swiftlint.yml

Repository: brightdigit/RadiantKit

Length of output: 3318


🏁 Script executed:

# Check for periphery configuration or usage in build scripts/ci
grep -r "periphery" . --include="*.sh" --include="*.yml" --include="*.yaml" -A 2 -B 2 2>/dev/null | head -50

Repository: brightdigit/RadiantKit

Length of output: 48


Verify compatibility and configuration updates for dependency upgrades.

The dependency versions are being updated significantly with breaking changes:

  • swift-format: 600.0.0 → 602.0.0 (minor version bump)
  • SwiftLint: 0.58.0 → 0.62.2 (breaking changes across multiple versions: 0.60.0 requires macOS 13+; 0.61.0 removes operator_whitespace rule; 0.62.0 requires Swift 6+ to build, changes sorted_imports behavior)
  • periphery: 2.20.0 → 3.2.0 (major version bump with breaking changes: --targets removed, --workspace removed, CocoaPods support dropped)

SwiftLint considerations:

  • .swiftlint.yml includes sorted_imports, which has behavior changes in 0.62.0 (adjacency grouping, comment attachment). Verify imports remain correctly organized after upgrade.
  • SwiftLint 0.62.2 adds a new incompatible_concurrency_annotation rule. If enabled or discovered, it could flag Swift 5 code lacking proper concurrency annotations.
  • SwiftLint 0.62.0+ requires Swift 6+ to build. Confirm your Xcode toolchain and build environment support this.

Periphery considerations:

  • Periphery 3.0.0 removes --targets and --workspace options. Verify any build scripts or CI configurations have been updated accordingly, or rely on the new index-store-based file scanning.
  • If the project uses CocoaPods for Periphery installation, switch to Homebrew, Mint, or another supported installer.

Confirm that the "0 violations" claim holds after running lint and analysis checks with these new versions.

🤖 Prompt for AI Agents
In @Mintfile around lines 1 - 3, Update CI/tooling and config to account for the
upgraded Mintfile deps: ensure the Xcode/swift toolchain is Swift 6+ before
upgrading swift-format to 602.0.0 and SwiftLint to 0.62.2, update .swiftlint.yml
to handle the changed sorted_imports behavior and add/opt-out
incompatible_concurrency_annotation if you must support older concurrency
semantics, and test/rerun swift-format to verify import ordering; for periphery
3.2.0 remove usages of the removed flags (--targets, --workspace) in any scripts
or CI and switch installation method away from CocoaPods if used (use
brew/mint), then run the full lint and periphery analysis with the new versions
and confirm the project still reports 0 violations, adjusting configs or code
until it does.

internal actor ObserverContainer {
/// The download observer.
private nonisolated(unsafe) var observer: DownloadObserver?
nonisolated(unsafe) private var observer: DownloadObserver?
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check the project for similar modifier ordering patterns to verify consistency

# Search for nonisolated(unsafe) patterns followed by access modifiers
echo "=== Searching for nonisolated(unsafe) followed by access modifiers ==="
rg -n 'nonisolated\(unsafe\)\s+(private|internal|public|fileprivate)' --type swift

echo ""
echo "=== Searching for access modifiers followed by nonisolated(unsafe) ==="
# Search for access modifiers followed by nonisolated(unsafe)
rg -n '(private|internal|public|fileprivate)\s+nonisolated\(unsafe\)' --type swift

Repository: brightdigit/RadiantKit

Length of output: 321


🏁 Script executed:

# Check the swift-format configuration for modifier ordering
echo "=== Swift Format Configuration ==="
cat .swift-format

echo ""
echo "=== SwiftLint Configuration ==="
cat .swiftlint.yml

Repository: brightdigit/RadiantKit

Length of output: 5859


🏁 Script executed:

# Check the actual file context
echo "=== Context from ObserverContainer.swift ==="
sed -n '25,40p' Sources/RadiantProgress/ObserverContainer.swift

Repository: brightdigit/RadiantKit

Length of output: 644


Fix modifier ordering to comply with Swift conventions and SwiftLint rules.

Change nonisolated(unsafe) private to private nonisolated(unsafe). Swift conventions and the project's enabled modifier_order SwiftLint rule require access control modifiers to precede other modifiers like nonisolated(unsafe).

🤖 Prompt for AI Agents
In @Sources/RadiantProgress/ObserverContainer.swift at line 32, The property
modifier order on the DownloadObserver property is incorrect; change the
declaration of the `observer` property from `nonisolated(unsafe) private var
observer: DownloadObserver?` to put the access control first by using `private
nonisolated(unsafe) var observer: DownloadObserver?` so it conforms to Swift
conventions and the project's `modifier_order` SwiftLint rule; update the
`observer` declaration in ObserverContainer (the `observer` property)
accordingly.

Addresses CodeRabbit review comments by removing orphaned documentation line and fixes CI workflow to properly detect cache restoration via restore-keys, preventing unnecessary mint installation failures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@claude
Copy link

claude bot commented Jan 7, 2026

Code Review - PR #38: Refactor file organization for improved maintainability

I've completed a thorough review of this PR. Overall, this is an excellent refactoring that significantly improves code organization and maintainability. The changes demonstrate strong architectural planning and adherence to project conventions.


✅ Strengths

1. Excellent Test Organization

  • The split of AppStorageDateTests into logical extensions is exemplary:
    • Main file contains shared test types and helper utilities
    • +NonOptional.swift contains 3 focused tests for non-optional Date handling
    • +Optional.swift contains 4 focused tests for optional Date handling
  • Proper use of @Suite attributes with descriptive names
  • All tests use @MainActor isolation correctly (critical for Swift 6)
  • Comprehensive test coverage with proper cleanup (defer blocks)

2. Clean Code Separation

  • ObservableDownloader+Internal.swift properly extracts implementation details
  • Main file now focuses on public API (reduced from 240 to 195 lines)
  • Separation improves readability without breaking functionality
  • All methods maintain proper access control (internal vs public)

3. DevContainer Improvements

  • Added Swift 6.2 and 6.3 containers for comprehensive testing
  • Proper container naming ("Swift 6.0", "Swift 6.1", etc.)
  • Updated from nightly to stable releases where appropriate
  • Consistent configuration across all containers

4. Linting Configuration Updates

  • Enabled valuable rules: missing_docs, first_where, multiline_arguments
  • Custom rule no_unchecked_sendable enforces strict concurrency safety (critical for Swift 6)
  • Tool version updates: swift-format 602.0.0, SwiftLint 0.62.2, periphery 3.2.0
  • Analyzer rules for unused imports/declarations improve code health

⚠️ Issues & Recommendations

1. Critical: CI Configuration Error (Priority: High)

# .github/workflows/RadiantKit.yml:216
- if: steps.cache-mint.outputs.cache-hit == ''
+ if: steps.cache-mint.outputs.cache-hit \!= 'true'

Issue: The condition == '' will always be true because cache-hit returns 'true' or 'false' (never empty string). This causes Mint to reinstall on every run, wasting CI time.

Impact: Increased CI execution time, unnecessary rebuilds

Fix: Revert to the original \!= 'true' condition

2. Swift-Format Configuration Inconsistencies (Priority: Medium)

Several formatting rule changes may conflict with existing codebase style:

"lineBreakBeforeControlFlowKeywords": false,  // Was true
"lineBreakBeforeEachArgument": false,        // Was true
"indentSwitchCaseLabels": false,             // Was true

Concerns:

  • Changes affect 46 files (indicates reformatting of entire codebase)
  • BeginDocumentationCommentWithOneLineSummary: false may reduce doc quality
  • NoLeadingUnderscores: true could break _var patterns if used

Recommendation: Verify these changes align with team preferences, as they significantly alter code appearance

3. SwiftLint Configuration Complexity (Priority: Low)

  • function_body_length: [50, 76] - The jump from 50 (warning) to 76 (error) is unusual
  • line_length: [100, 200] - 200-line error threshold is very permissive
  • Disabled trailing_comma, switch_case_alignment - Consider if intentional

Recommendation: Consider more consistent thresholds (e.g., 50/60 for functions, 100/120 for lines)

4. Documentation Enhancement (Priority: Low)

ProgressOperation.swift:44-46 has excellent new documentation, but consider adding usage examples:

/// - Parameter fractionDigits: The number of decimal places (0 for "75%", 2 for "75.50%")

🔍 Technical Analysis

Concurrency Safety ✅

  • All @MainActor annotations properly maintained
  • New test files correctly use @MainActor isolation
  • ObservableDownloader+Internal.swift maintains nonisolated patterns correctly
  • No @unchecked Sendable violations (enforced by new linting rule)

Performance Considerations ✅

  • File splitting has zero runtime impact (compile-time organization only)
  • Test isolation via UserDefaults(suiteName:) prevents flaky tests
  • Proper defer cleanup prevents test pollution

Security Review ✅

  • No security concerns identified
  • File operations use proper error handling
  • No hardcoded credentials or secrets
  • InitializablePackageOptions properly handles file protection modes

Backward Compatibility ✅

  • No breaking API changes
  • All public interfaces maintained
  • Module dependencies unchanged
  • Platform support unchanged (iOS 18+, macOS 15+, etc.)

📊 Test Coverage

The PR description claims "All 7 tests passing" which matches:

  • 3 non-optional Date tests
  • 4 optional Date tests
  • All tests properly gated with @Test(.enabled(if: ...)) for platform availability

Recommendation: Run full test suite to verify no regressions from formatting changes across 46 files


🎯 Summary

Category Rating Notes
Code Quality ⭐⭐⭐⭐⭐ Excellent separation of concerns
Architecture ⭐⭐⭐⭐⭐ Follows established patterns
Testing ⭐⭐⭐⭐⭐ Comprehensive and well-organized
Documentation ⭐⭐⭐⭐ Good, could add more examples
CI/Build ⚠️ Critical bug in cache condition

✅ Approval Recommendation

Approve with required fix: This PR is excellent, but the CI cache bug must be fixed before merging.

Required Before Merge:

  1. Fix .github/workflows/RadiantKit.yml:216 cache condition

Recommended (Non-blocking):

  1. Verify formatting changes align with team style preferences
  2. Run full test suite to confirm no regressions from mass reformatting
  3. Consider adjusting SwiftLint thresholds for consistency

Great work on this refactoring! The test file organization is particularly well done and serves as a good example for future splits. The ObservableDownloader separation also improves readability significantly.

Generated by Claude Code

@leogdion leogdion merged commit a65d672 into main Jan 7, 2026
25 checks passed
@leogdion leogdion deleted the lint-fixes branch January 7, 2026 18:20
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