Skip to content

fix(vue): flush stream write-deps on first arrival - #867

Merged
omegent-app[bot] merged 1 commit into
mainfrom
fix/stream-first-write-flush
Aug 18, 2026
Merged

fix(vue): flush stream write-deps on first arrival#867
omegent-app[bot] merged 1 commit into
mainfrom
fix/stream-first-write-flush

Conversation

@omegent-app

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

Copy link
Copy Markdown
Contributor

Why

Long-running stream: true commands (One-Pick Stapeldruck) create a job on the first write, then print for tens of seconds. @effect-app/vue makeStreamMutation2 accumulated write-deps and only invalidated queries when the stream settled. GetActiveJob stayed on its pre-start snapshot (null) for the whole print. Combined with #864 (refetch only mounted queries) the operator saw no in-page job / Continue until park or reload.

Scanner: https://github.com/macs-holding/scanner/pull/2236

What

Flush derived write-dep invalidation once when the first write set is visible on a stream value, then again on settlement. Server invalidation keys stay settlement-only — per-chunk key flush is what caused the One-Pick List storm (#1836).

How

makeStreamMutation2 taps each value, and if write-deps have arrived and have not been flushed yet, runs invCache with those writes and no server keys. A later item write (PickItem) waits for ensuring. Test: first write invalidates GetActiveJob while the stream is still gated; settlement then invalidates List as well.

Remarks

Changeset: patch @effect-app/vue

opened by enricopolanski in chat thread Discord · Discord · T3


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

Server invalidation keys stay settlement-only so list queries are not
refetched per chunk. The first write-dep set now invalidates matching
queries while the stream is still open (job create → GetActiveJob).

Co-authored-by: Enrico Polanski <16064771+enricopolanski@users.noreply.github.com>
Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
@omegent-app
omegent-app Bot marked this pull request as ready for review August 18, 2026 08:33
@pkg-pr-new

pkg-pr-new Bot commented Aug 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@effect-app/cli

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

effect-app

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

@effect-app/eslint-codegen-model

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

@effect-app/eslint-shared-config

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

@effect-app/infra

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

@effect-app/vue

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

@effect-app/vue-components

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

commit: 3cccfe3

@omegent-app
omegent-app Bot merged commit 61a3931 into main Aug 18, 2026
6 checks passed
@omegent-app
omegent-app Bot deleted the fix/stream-first-write-flush branch August 18, 2026 08:36
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