docs: Improve core documentation#13
Merged
takeshishimada merged 6 commits intomainfrom Oct 30, 2025
Merged
Conversation
Add explicit warning to State associatedtype documentation that @observable macro is required but cannot be enforced by type system. Missing this macro causes SwiftUI views to not update automatically. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add inline comments and documentation note explaining that the state parameter in .run closures refers to the same instance as the outer state parameter (reference type semantics). This clarifies that mutations inside .run are immediately visible to outer scope. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add ActionExecution typealias to ActionHandler.swift for better discoverability. Previously only defined in ActionProcessor.swift, users now have direct access to the type definition when working with ActionHandler. Includes comprehensive documentation and usage examples. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add documentation clarifying that handle() is called once during Store initialization and the returned ActionHandler is reused for all subsequent actions. Prevents confusion about lifecycle management. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive documentation for method chaining methods: - onError: Clarify that multiple calls replace previous handler - transform: Add detailed logging example showing use case - use: Document middleware execution order (registration order) Includes practical examples for each method to guide users. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2bedcb2 to
92d7c61
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive documentation improvements for core Flow types (Feature, ActionHandler) based on code review feedback. All changes are documentation-only with one refactoring to improve API discoverability.
Changes
1. Add @observable requirement warning to Feature protocol
@Observablemacro2. Clarify state parameter in .run closure examples
stateparameters refer to same instance (reference type), which may be confusing without clarification3. Re-export ActionExecution typealias in ActionHandler
4. Document Feature.handle() call semantics
5. Fill ActionHandler documentation gaps
onError: Clarify multiple calls replace previous handler + add exampletransform: Add detailed logging example showing practical use caseuse: Document middleware execution order (registration order) + add exampleTesting
Impact
🤖 Generated with Claude Code