feat(agera,kida,nanoviews): bottom-up deferred effect scopes - #189
Merged
Conversation
- rework the defer layer into a LazyMode one-shot token state machine (LAZY -> STARTED -> STOPPED): two-pass start runs children before parents, stop is total and children-first, `moveScope` is removed - `boundDeferScope` anchors pin the swap position structurally; swaps destroy the previous content first, while its DOM is still attached - `for_` owns its rows: free-standing row scopes are started and stopped in visual order via the items list; an eager teardown holder guarantees row cleanup even for periods stopped before their first start - kida `unsafeRun` switches the DI context without untracking; mount/unmount are batched, so the DI context and render writes never leak into the flush - fix zombie effects after mid-start teardown, a `checkDirty` crash on emptied pending scopes, stuck `mounted(true)` on discarded subscriptions and incomplete cleanup of effects disposed during their own warmup
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #189 +/- ##
==========================================
+ Coverage 83.96% 84.23% +0.26%
==========================================
Files 138 138
Lines 2988 3026 +38
Branches 564 565 +1
==========================================
+ Hits 2509 2549 +40
+ Misses 340 339 -1
+ Partials 139 138 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Redesign of the deferred-effect-scope mechanism: view effects now start bottom-up (children before parents) and are destroyed children-first, while store effects keep their current behavior.
moveScopeis removedboundDeferScopeanchors pin the swap position structurally; swaps destroy the previous content first, while its DOM is still attachedfor_owns its rows: free-standing row scopes are started and stopped in visual order via the items list; an eager teardown holder guarantees row cleanup even for periods stopped before their first startunsafeRunswitches the DI context without untracking; mount/unmount are batched, so the DI context and render writes never leak into the flushcheckDirtycrash on emptied pending scopes, stuckmounted(true)on discarded subscriptions and incomplete cleanup of effects disposed during their own warmupVerified with the full test chain (agera 113, kida 61, nanoviews 72, store 57), size-limit across all packages and a real-browser benchmark at parity.
🤖 Generated with Claude Code