Skip to content

refactor: Polish effect API and documentation#14

Merged
couchdeveloper merged 1 commit into
mainfrom
develop
May 26, 2026
Merged

refactor: Polish effect API and documentation#14
couchdeveloper merged 1 commit into
mainfrom
develop

Conversation

@couchdeveloper
Copy link
Copy Markdown
Owner

This PR tightens the public API and documentation around EffectView’s effect runtime.

The main API-level change is that TransducerEffect is now a public struct backed by an internal effect representation, so callers use the documented helper functions (run, task, request, cancel, sequence, etc.) instead of depending on underscored enum cases.

It also updates terminology around event dispatching, replacing stale enqueue / perform references with the current post / send / request model, and clarifies when try? is appropriate versus when dispatch failures should be propagated as runtime failures.

  • Hide effect implementation details behind TransducerEffect

  • Rename runtime boundary error type to RuntimeError

  • Comment out unfinished low-level Transducer.run API

  • Route initial event failures through runtime control instead of printing

  • Clarify post, send, and request semantics in docs

  • Update examples to use public effect helper APIs

  • Add README framing for Transducer as reducer-like but effect-emitting

  • Expand docs around dispatch failure and try? usage

  • Fix typos and stale terminology across docs, tests, and examples

  • swift test

  • Passes: 58 tests in 8 suites

Known existing warnings remain for deprecated SwiftUI onChange(of:perform:) usage in tests.

This PR tightens the public API and documentation around EffectView’s
effect runtime.

The main API-level change is that `TransducerEffect` is now a public
struct backed by an internal effect representation, so callers use the
documented helper functions (`run`, `task`, `request`, `cancel`,
`sequence`, etc.) instead of depending on underscored enum cases.

It also updates terminology around event dispatching, replacing stale
`enqueue` / `perform` references with the current `post` / `send` /
`request` model, and clarifies when `try?` is appropriate versus when
dispatch failures should be propagated as runtime failures.

- Hide effect implementation details behind `TransducerEffect`
- Rename runtime boundary error type to `RuntimeError`
- Comment out unfinished low-level `Transducer.run` API
- Route initial event failures through runtime control instead of printing
- Clarify `post`, `send`, and `request` semantics in docs
- Update examples to use public effect helper APIs
- Add README framing for `Transducer` as reducer-like but effect-emitting
- Expand docs around dispatch failure and `try?` usage
- Fix typos and stale terminology across docs, tests, and examples

- `swift test`
- Passes: 58 tests in 8 suites

Known existing warnings remain for deprecated SwiftUI
`onChange(of:perform:)` usage in tests.
@couchdeveloper couchdeveloper merged commit 01a6f37 into main May 26, 2026
1 check passed
@couchdeveloper couchdeveloper deleted the develop branch May 26, 2026 17:48
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