Skip to content

docs: Comprehensive documentation improvements#14

Merged
takeshishimada merged 11 commits intomainfrom
docs/fix-documentation-issues
Oct 30, 2025
Merged

docs: Comprehensive documentation improvements#14
takeshishimada merged 11 commits intomainfrom
docs/fix-documentation-issues

Conversation

@takeshishimada
Copy link
Copy Markdown
Contributor

Summary

This PR provides comprehensive improvements to Flow's DocC documentation based on a detailed three-round review of all documentation files. The changes enhance clarity, add missing explanations, and improve the learning experience for both beginners and advanced users.

Changes by Priority

High Priority (Critical Issues)

  • ✅ Add thread-safety warning for @unchecked Sendable in Middleware
  • ✅ Improve concept guidance in Getting Started with clearer step titles
  • ✅ Add Quick Reference table to Core Elements for quick API lookup
  • ✅ Expand Store, Feature, and ActionHandler sections with detailed explanations
  • ✅ Simplify Result-Returning Actions example (replaced complex parent-child with login example)
  • ✅ Add comprehensive error handling to Practical Guide examples

Medium Priority (Important Improvements)

  • ✅ Add multiple middleware usage section with execution order explanation
  • ✅ Expand .just() explanation comparing with .none
  • ✅ Simplify Task Priority section with reference table
  • ✅ Verify .run/.none explanations (confirmed sufficient)

Low Priority (Polish)

  • ✅ Add Overview section to Flow landing page with design philosophy
  • ✅ Add quick example to Flow.md for 30-second understanding
  • ✅ Add detailed .cancellable() explanation with parameter descriptions

Statistics

  • Files Modified: 6 (all Flow DocC files)
  • Commits: 12
  • Lines Changed: +307, -71 (net +236 lines)

Key Improvements

1. Beginner-Friendly Enhancements

  • Clear step titles in Getting Started
  • 30-second overview in Flow.md
  • Quick Reference table in Core Elements

2. Concept Explanations

  • Clear comparison of .none, .run, .just()
  • Detailed ActionTask type descriptions
  • .cancellable() parameter explanations

3. Practical Examples

  • Error handling patterns with .catch
  • Multiple middleware execution order
  • Task Priority selection guide

4. Safety Improvements

  • @unchecked Sendable warnings
  • Task ID naming conventions
  • MainActor isolation explanations

Testing

  • All documentation builds successfully
  • Code examples compile correctly
  • Links and cross-references work
  • Markdown formatting is correct

Related Issues

Addresses documentation gaps identified in comprehensive DocC review.


🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

takeshishimada and others added 11 commits October 31, 2025 00:50
Add warning block and inline comments to clarify that @unchecked Sendable
bypasses Swift's concurrency checks and requires manual thread-safety
guarantees. Explain that this is safe in Flow due to MainActor isolation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Enhance step titles to briefly introduce key concepts (State, Actions,
ActionHandler, Store) and add a guidance note directing readers to
CoreConcepts for detailed explanations. This maintains the quick-start
focus while providing better context.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Add a reference table summarizing the five core elements with their
purposes and key APIs. This provides readers with a quick overview
before diving into detailed sections.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Add detailed explanations and practical examples for:
- Store: Key responsibilities, @State lifecycle, sending actions
- Feature: Benefits (cohesion, reusability, type safety) with complete implementation
- ActionHandler: How it works with sync/async examples

This balances the document sections and provides better guidance for developers.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Replace complex parent-child navigation example with a simpler login
validation example. The new example better demonstrates:
- Basic ActionResult definition
- .just() for immediate results
- .run with result returns
- Result type handling

Moves advanced parent-child patterns to PracticalGuide reference.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Enhance error handling across multiple patterns:
- Task Cancellation: Add cancelInFlight explanation and .catch example
- Parallel Processing: Add .catch for handling failed concurrent operations
- Parent-Child Communication: Add .failure case handling

These additions demonstrate proper error handling in real-world scenarios.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Add section explaining how to chain multiple middleware with .use() and
describe the execution order (beforeAction: top-down, afterAction:
bottom-up, onError: top-down). Includes practical example combining
logging, analytics, and error reporting.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Add detailed explanation comparing .just() with .none and listing common
use cases (validation, state calculations, cache hits). This clarifies
when to use .just() for synchronous results vs .run for async results.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Replace four separate code examples with a concise reference table and
two focused examples. Add note clarifying that priority affects
scheduling but doesn't guarantee order. Makes the section more scannable
while preserving essential information.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive Overview section with:
- Design philosophy (view-local, unidirectional, type-safe, concurrency)
- Quick counter example for 30-second understanding
- Architecture diagram reference
- Comparison with global store architectures

This helps visitors quickly assess if Flow fits their needs.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive explanation of .cancellable(id:cancelInFlight:) with:
- Parameter descriptions (id for identification, cancelInFlight behavior)
- Task ID naming conventions
- Scoping information

This clarifies task cancellation mechanics for developers.

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

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 30, 2025
@takeshishimada takeshishimada merged commit 0d137a4 into main Oct 30, 2025
9 checks passed
@takeshishimada takeshishimada deleted the docs/fix-documentation-issues branch October 30, 2025 16:42
@takeshishimada takeshishimada self-assigned this Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant