refactor(async): add scoped resource lifecycle - #562
Open
beruro wants to merge 5 commits into
Open
Conversation
This was referenced Jul 29, 2026
beruro
force-pushed
the
junyu/async-resource-lifecycle
branch
from
July 30, 2026 07:07
9c4d6e6 to
eb16aff
Compare
beruro
force-pushed
the
junyu/async-resource-lifecycle
branch
3 times, most recently
from
July 30, 2026 15:09
a739c82 to
d16c8e5
Compare
beruro
force-pushed
the
junyu/async-resource-lifecycle
branch
from
August 10, 2026 04:05
5587700 to
fb403e6
Compare
Pre-commit hook ran. Total eslint: 10, total circular: 0
Pre-commit hook ran. Total eslint: 10, total circular: 0
beruro
force-pushed
the
junyu/async-resource-lifecycle
branch
from
August 10, 2026 05:24
fb403e6 to
5f991c2
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.
Problem
The legacy async-data helper does not make scope changes, stale completions, unmount cancellation, or hidden-window polling ownership explicit, allowing old requests and duplicate timers to outlive their consumer.
Solution
Potential risks
Verification
Validated locally after merging current
develop(017fb9afa) into head8618af370without conflicts:pnpm install --frozen-lockfile— PASS. The optional legacynode-sassnative postinstall could not build under the local Node/Python combination, but installation completed and repository checks ran normally.pnpm exec vitest run src/hooks/async/useAsyncResource.test.ts src/hooks/async/useVisibilityPolledData.test.ts src/util/core/__tests__/latestScopedTask.test.ts src/util/core/__tests__/visibilityAwarePoll.test.ts— PASS, 4 files / 18 tests.pnpm typecheck— PASS.git diff --cached --checkbefore the merge commit — PASS.Published GitHub CI on head
8618af370is fully green: Frontend typecheck/lint/test, Rust clippy, and AI attribution all passed.