Skip to content

feat: add SwiftUI signal bindings - #1

Merged
lancy merged 1 commit into
mainfrom
codex/swiftui-adapter
Nov 6, 2026
Merged

lancy merged 1 commit into
mainfrom
codex/swiftui-adapter

Conversation

@lancy

@lancy lancy commented Nov 6, 2026

Copy link
Copy Markdown
Owner

SwiftUI consumers can now share CCState's cached resources and commands through an optional CCStateSwiftUI product. The core remains independent of SwiftUI and no third-party package dependencies are added.

  • Add an explicitly owned StoreProvider, typed loadable/resolved/status reads, stable state and command writers, and local loadable command phases.
  • Own subscriptions in SwiftUI view storage, read after subscribing, reject obsolete completions after target/provider changes, and report cleanup failures. UI disposal never cancels shared Tasks or business commands.
  • Add native counterparts for all 68 tests in pinned ccstate-react 6.1.0, 13 additional observation/hosting/projection/ownership checks, a public API compiler fixture, and usage/compatibility documentation.
  • Run the unchanged upstream core and React suites together in CI, verify both inventories, and build the new product for iOS Simulator.

Validation: all 279 unchanged upstream reference cases passed; the 210-case Swift core matrix and eight native core checks passed in Debug and Release; all 68 SwiftUI counterparts and 13 additional native checks passed in Debug and Release. Strict Swift formatting, warnings-as-errors production build, positive API and README example type-checks, negative compiler fixtures, inventory guards, Python syntax/local documentation links, and actionlint passed. Simulator builds produced both CCState and CCStateSwiftUI modules for arm64 and x86_64.

Native UI execution is tested with NSHostingView on macOS; Simulator validation compiles the libraries. React DOM/StrictMode/profiler timing is explicitly adapted to native observation and ARC rather than claimed identical. This PR does not migrate the Okou app or claim application performance improvements.

@lancy
lancy merged commit d75c85c into main Nov 6, 2026
2 checks passed
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