refactor(data): scope async resource consumers - #563
Open
beruro wants to merge 17 commits into
Open
Conversation
beruro
force-pushed
the
junyu/async-resource-lifecycle
branch
from
July 30, 2026 07:07
9c4d6e6 to
eb16aff
Compare
beruro
force-pushed
the
junyu/scoped-loader-consumers
branch
from
July 30, 2026 07:07
d2355fc to
5f7f585
Compare
beruro
force-pushed
the
junyu/async-resource-lifecycle
branch
from
July 30, 2026 07:49
eb16aff to
59189c0
Compare
beruro
force-pushed
the
junyu/scoped-loader-consumers
branch
from
July 30, 2026 07:49
5f7f585 to
3e6b103
Compare
beruro
force-pushed
the
junyu/async-resource-lifecycle
branch
from
July 30, 2026 08:04
59189c0 to
a739c82
Compare
beruro
force-pushed
the
junyu/scoped-loader-consumers
branch
from
July 30, 2026 08:04
3e6b103 to
c294fbf
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
July 30, 2026 15:09
a739c82 to
d16c8e5
Compare
Pre-commit hook ran. Total eslint: 10, total circular: 0
Pre-commit hook ran. Total eslint: 10, total circular: 0
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/scoped-loader-consumers
branch
from
July 30, 2026 15:12
c294fbf to
feb4335
Compare
…e-lifecycle' into HEAD # Conflicts: # src/engines/ChatPanel/panels/ProjectPanelView.tsx # src/modules/MainApp/WorkManagement/useGitHubWorkItemsLoadLifecycle.ts # src/modules/ProjectManager/LinearProjects/useLinearIndexData.tsx # src/modules/ProjectManager/WorkItems/hooks/useProjectData/useProjectData.ts # src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/hooks/useWorkstationIssues.ts
…e-lifecycle' into HEAD # Conflicts: # src/modules/ProjectManager/WorkItems/hooks/useProjectData/useProjectData.ts
beruro
marked this pull request as draft
August 10, 2026 03:35
beruro
force-pushed
the
junyu/async-resource-lifecycle
branch
2 times, most recently
from
August 10, 2026 05:24
fb403e6 to
5f991c2
Compare
beruro
marked this pull request as ready for review
August 11, 2026 05:16
…into sync-pr-563 # Conflicts: # src/engines/ChatPanel/panels/ProjectPanelView.tsx # src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/hooks/useWorkstationIssues.ts
Pre-commit hook ran. Total eslint: 0, total circular: 0
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
Shared application loaders could publish late results after project, workspace, session, or browser scope changes. Some polling/countdown work also continued while hidden, browser diagnostic state could outlive the owning surface, and Tauri event consumers could leak subscriptions when cleanup ran before asynchronous listener registration resolved.
Solution
AsyncUnlistenScopeto own asynchronously-created Tauri listener handles, release late handles, roll back partial registration, and make disposal idempotent.Potential risks
Performance audit
Verdict: pass. Each retained subscription has one Effect-owned scope; cleanup is symmetric, late handles self-release, partial setup rolls back, and no unbounded timer/cache was added.
Verification
Validated locally after merging current #562 head
8618af370into head49864e065without conflicts:pnpm install --frozen-lockfile— PASS. The optional legacynode-sassnative postinstall warning did not block installation or checks.pnpm typecheck— PASS.git diff --cached --checkbefore the merge commit — PASS.Because this stacked PR targets
junyu/async-resource-lifecycle, full frontend/Rust CI may not run until #562 lands and this PR is retargeted todevelop.