Skip to content

Integration: fix/screenstatekit-library merged and verified#1

Closed
nashysolutions wants to merge 3 commits intomainfrom
test/all-fixes
Closed

Integration: fix/screenstatekit-library merged and verified#1
nashysolutions wants to merge 3 commits intomainfrom
test/all-fixes

Conversation

@nashysolutions
Copy link
Owner

Summary

This branch merges fix/screenstatekit-library and exists as an integration staging ground where the ScreenStateKit changes were verified alongside all four companion Definery PRs before any individual branch is merged to main.

Changes included (from fix/screenstatekit-library):

Integration verification

All changes were tested in combination with:

  • fix/observable-granularity@Observable granularity on HomeViewState
  • fix/task-lifecycleCancelBag-based task lifecycle in HomeViewStore
  • fix/view-dispatch-consistencysend(action:) adoption in SwiftUI views
  • fix/shimmer-gradientPhaseShimmerModifier replacing Shimmer library

Results: build ✅ · 28/28 tests ✅ · 0 SwiftLint violations ✅

Profiler comparison (After.trace vs baseline): hitches 4 → 1, cause-graph edges 34,232 → 24,085, HomeSnapshot invalidation cascade (11,307 edges) eliminated entirely.

Test plan

  • Build succeeds against a Definery project consuming this branch
  • store(task:identifier:) stores tasks atomically with no TOCTOU window under concurrent dispatch
  • StateUpdatable.updateState mutations from network calls are not animated
  • send(action:) awaits the full action lifecycle and propagates cancellation correctly

🤖 Generated with Claude Code

nashysolutions and others added 3 commits February 24, 2026 09:39
…t animation

- ScreenState: change open class Sendable to @unchecked Sendable with a doc
  comment stating the invariant all subclasses must maintain (fixes anthony1810#19)
- CancelBag: add async-safe store(task:identifier:) that inserts synchronously
  within actor isolation, eliminating the TOCTOU window between registration
  and storage (fixes anthony1810#20)
- NonIsolatedActionLocker: add doc comment explicitly marking it not thread-safe
  and directing users to IsolatedActionLocker for concurrent use (fixes anthony1810#21)
- StateUpdatable.updateState: change default animation from .smooth to .none
  so state mutations from network responses are no longer animated by default;
  callers can opt in at the call site where animation is intentional (fixes anthony1810#22)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The protocol previously only exposed nonisolated receive(action:), which
spawns an unstructured fire-and-forget task with no cancellation support.
Callers in async contexts (SwiftUI .task, .refreshable) had to reach into
conforming types' internal isolatedReceive method to get awaitable dispatch.

Adding func send(action: Action) async makes the safe, structured path part
of the public contract. receive(action:) is retained for sync contexts
(button callbacks, onAppear) where awaiting is not possible (fixes anthony1810#15).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nashysolutions
Copy link
Owner Author

Closing — re-opening as a cross-fork PR targeting anthony1810/ScreenStateKit:main.

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