Skip to content

feat(vue): add query-owned live invalidation - #856

Merged
patroza merged 2 commits into
mainfrom
t3code/sa-401-query-owned-live-invalidation
Aug 6, 2026
Merged

feat(vue): add query-owned live invalidation#856
patroza merged 2 commits into
mainfrom
t3code/sa-401-query-owned-live-invalidation

Conversation

@omegent-app

@omegent-app omegent-app Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Why

Consumers already record query read dependencies, but live refresh currently requires applications to repeat those dependencies manually. That duplication is stringly typed and cannot safely cover writes received while the initial query is still discovering its reads.

What

Adds live: true | { maxDelayMs } to Vue query options and a transport-neutral live invalidation coordinator.

How

The coordinator waits for transport readiness before a live fetch, buffers writes across the complete retry lifecycle, installs the query reads, then replays matching writes. Active queries are matched by exact dependency type/name/ID, can coalesce reactions client-side, and fail safe after transport resets. Applications provide readiness, write subscription, and query invalidation adapters.

Remarks

The API is additive and existing queries remain unchanged unless live is enabled. A changeset for @effect-app/vue is included. Scanner SA-401 is the first consumer.


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

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
@pkg-pr-new

pkg-pr-new Bot commented Aug 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

@effect-app/cli

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

effect-app

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

@effect-app/eslint-codegen-model

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

@effect-app/eslint-shared-config

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

@effect-app/infra

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

@effect-app/vue

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

@effect-app/vue-components

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

commit: 7bd6f89

* feat(repository): own dependency read scopes

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

* feat(repository): derive dependency scopes from queries

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

* refactor(repository): derive dependencies from schema annotations

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

* refactor(repository): remove manual read scope API

Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>

---------

Co-authored-by: omegent-app[bot] <306514130+omegent-app[bot]@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
@patroza
patroza marked this pull request as ready for review August 6, 2026 18:26
@patroza
patroza merged commit 99c43c4 into main Aug 6, 2026
1 check passed
@patroza
patroza deleted the t3code/sa-401-query-owned-live-invalidation branch August 6, 2026 18:27
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.

1 participant