Skip to content

Fix actionable upstream issues - #5

Merged
SHIINASAMA merged 6 commits into
mainfrom
codex/fix-upstream-issues
Sep 11, 2026
Merged

SHIINASAMA merged 6 commits into
mainfrom
codex/fix-upstream-issues

Conversation

@SHIINASAMA

@SHIINASAMA SHIINASAMA commented Sep 10, 2026

Copy link
Copy Markdown

Summary

This PR applies the actionable upstream findings that were grouped in the fork issues below. It is intentionally left open for review and is not merged.

Upstream context:

Review follow-up

  • Split now owns its default FractionHolder with @StateObject; .fraction(FractionHolder) keeps an explicit caller-owned holder separate and observed.
  • All fluent modifiers now carry an uninstalled fractionSeed instead of reading a wrapped @StateObject; only body reads the installed object when composing the child Split.
  • Explicit holders no longer seed any StateObject, so replacing a caller-owned holder during a mounted View rebuild does not retain the old holder in SwiftUI state storage.
  • Removed the unconditional .animation(.default, value: hide.side?.rawValue) so callers control whether hide/show changes animate and which transaction animation is used.
  • Added a deployment- and SDK-safe runtime resolver for the modern macOS 15 cursor selectors, with the macOS 12–14 fallback preserved.
  • Added regression coverage for Split holder identity, forced hide/show animation, and modern/fallback cursor availability. The onChange source check now targets the deprecated one-argument closure shape instead of matching every overload.
  • Added a mounted NSHostingView rebuild regression test that verifies a replaced caller-owned holder is released and no pre-install StateObject access warning occurs.

Implementation notes

  • Public Split/HSplit/VSplit APIs are unchanged.
  • Fraction updates use publisher-backed observation and avoid re-publishing an unchanged clamped value.
  • Explicit FractionHolder inputs remain caller-owned across all Split modifiers.
  • macOS cursor handling uses update-safe AppKit cursor rects; Catalyst retains the existing hover fallback.

Verification

  • swift test --scratch-path /tmp/SplitView-review-full-tests — 14 tests, 0 failures
  • swift test --scratch-path /tmp/SplitView-review-lifecycle-green --filter 'ObservationTests|StateObjectLifecycleTests' — 4 tests, 0 failures
  • swift build --scratch-path /tmp/SplitView-review-macos — passed
  • swift build --sdk "$(xcrun --sdk iphoneos --show-sdk-path)" --triple arm64-apple-ios15.0 --scratch-path /tmp/SplitView-review-iphoneos — passed
  • swift build --sdk "$(xcrun --sdk macosx --show-sdk-path)" --triple arm64-apple-ios15.0-macabi --scratch-path /tmp/SplitView-review-catalyst — passed
  • Demo xcodebuild builds for macOS, iOS, and Mac Catalyst — all exit 0; the Demo currently resolves the upstream Package URL, so these validate the example project rather than directly integrating the local fork checkout
  • git diff --check — passed

No comments or messages were posted to the upstream repository.

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