mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 00:02:30 +00:00
The worker writes a turn's rows in transactions it does not wait for, so one can land after the flow reports itself finished. The chat read the conversation once at that point and then deleted every row the stream had put on screen, on the assumption the server's copies had replaced them. When the answer's copy had not arrived, the reader watched their answer appear and then vanish, and nothing fetched it again until they reloaded the page. A row the server sends now takes the place of the one standing in for it, keeping what only the stream knew — a tool's call and result, the model's thinking — and taking the server's id, which is what moves the read cursor past it. A row standing for nothing is appended. Nothing is deleted, so an answer outlives a write that is late or never comes, and the chat is never in a position to conclude that it is not coming. The last read of a turn is repeated a few times while rows the turn opened are still unaccounted for, and then stopped: what is left standing is the only copy there is. It waits only on rows that turn opened, so one an earlier turn left behind cannot make every turn after it wait the budget out. Ending a turn settles what it leaves mid-flight. A card opens on a call and closes on its result, and the result need never come — an agent answering through an output schema streams the call and nothing else, and Stop is an end of its own — so without this a card spins for as long as the chat is open, and the turn can never report itself as failed. Rows sit in the order they were shown rather than by sequence, so the cursor is the furthest row a conversation holds rather than the last one in the list: read from the end, an appended row would move it backwards and keep it there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Windmill frontend
The Windmill frontend written in Svelte 5 + Tailwind CSS
The frontend is under AGPL, see the LICENSE file at the root of this repo