Skip to content

fix(vue): keep live-query writes flowing after an interrupted discovery - #932

Merged
omegent-app[bot] merged 2 commits into
mainfrom
fix/live-query-discovery-leak
Oct 26, 2026
Merged

omegent-app[bot] merged 2 commits into
mainfrom
fix/live-query-discovery-leak

Conversation

@omegent-app

@omegent-app omegent-app Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Why

Follow-up to #930, found during its Sol review. beginLiveQueryFetch incremented discovering before awaiting source.ready(), but the caller only recorded the result after the await. If a live fetch was interrupted during that await (unmount, superseding refresh), the finalizer ran with false and never decremented. From then on, every repository write was buffered and never dispatched, so all live queries went stale.

What

  • liveQueryInvalidation.ts: add a synchronous acquireLiveQueryFetch plus liveQueryReady. beginLiveQueryFetch stays as a deprecated export (it is reachable through the ./* subpath export).
  • atomQuery.ts: wrap the live fetch in Effect.acquireUseRelease, so endLiveQueryFetch always gets the acquired token, including after an interrupt or a ready() failure.
  • Regression test: mount an observed live query whose source never becomes ready, unmount it, then check that a later write still invalidates another live query. Fails on main, passes here.
  • Patch changeset for @effect-app/vue.

opened by andreasimonecosta in chat thread Discord · Discord · T3

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…fore ready

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pkg-pr-new

pkg-pr-new Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@effect-app/cli

npm i https://pkg.pr.new/@effect-app/cli@932

effect-app

npm i https://pkg.pr.new/effect-app@932

@effect-app/eslint-codegen-model

npm i https://pkg.pr.new/@effect-app/eslint-codegen-model@932

@effect-app/eslint-shared-config

npm i https://pkg.pr.new/@effect-app/eslint-shared-config@932

@effect-app/infra

npm i https://pkg.pr.new/@effect-app/infra@932

@effect-app/vue

npm i https://pkg.pr.new/@effect-app/vue@932

@effect-app/vue-components

npm i https://pkg.pr.new/@effect-app/vue-components@932

commit: 9fa3728

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omegent-app
omegent-app Bot merged commit 2debb81 into main Oct 26, 2026
5 checks passed
@omegent-app
omegent-app Bot deleted the fix/live-query-discovery-leak branch October 26, 2026 09:19
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.

0 participants