Repository navigation
Version 1.6.1 - #89
Merged
Merged
Conversation
match() picked the stale branch only for a literal Task (isTask(s) && s.isPending()). Two cases fell back to ok and showed the retained value with no in-flight signal: - a List or Store derived from an async computation, whose async state lives in an internal Task registered via registerAsyncSource - a Slot backed by a Task, which is how Le Truc stores writable props, so an async thunk passed into a child prop lost its stale state getAsyncSource() now follows a Slot's current() backing, through chains of slots, to the signal that carries the async state. Mutually delegating slots resolve to no async source instead of looping. isPending(slot) and abort(slot) therefore act on the backing signal. match() uses isPending() and no longer imports the deprecated isTask. Update JSDoc for isPending, abort, and the stale handlers, plus api-facts.md, signal-types.md, and README.md, which described stale as Task-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugfix/async state resolution
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Fixed
match()ignored thestalehandler for any signal that was not a literalTask(src/nodes/effect.ts,src/graph.ts): Previously,match()chosestaleonly whenisTask(s) && s.isPending(). Two cases fell back tookand showed the retained value with no in-flight signal: (1) aListorStorederived from an async computation, whose asynchrony lives in an internalTaskregistered through the ADR-0018 async-source registry; (2) aSlotwhose backing signal is aTask. Integration layers store writable props as slots, so an async value passed into one lost itsstalestate. Nowmatch()uses the freeisPending()utility, and the async-source resolver follows a slot'scurrent()backing (and chains of slots) to the signal that carries the async state.isPending(slot)andabort(slot)therefore act on the backing signal. Mutually delegating slots resolve to no async source and do not loop. A slot backed by aSlotDescriptorhas no async source. Effects that usestalenow run it during a re-fetch in these cases; effects without astalehandler are not affected.