mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 00:02:30 +00:00
Three of the last five review rounds were the same defect with a different trigger: some path decided a chat was free, or stuck, without the run having said so. `Turn` gave that question an owner, but the holds taken before a turn exists were left outside it, and the two that were are what these fix. The read that opens a conversation now starts a turn before it awaits. That read is how the chat finds out whether a run owns the conversation, so it holds the chat while it is out — and Stop, the panel going away, and a later send all have to be able to reach it. Each ends the turn, and a read whose turn is over writes nowhere: it can no longer drop the rows a live turn is writing, nor resume on top of the turn that replaced it. `#resumeRunningTurn` carries that turn on rather than starting a second, which would end the read that produced the rows it reasons over. A read that fails leaves the chat held, since whether a run owns the agent memory is exactly what could not be read. `#holdUnreadableChat` is the one place that happens, and it holds only a turn that still holds the chat — a read outruns a Stop and fails after it, and taking the hold back then would shut a composer the reader was just handed. The run request is not tied to the turn's handle, so the whole of it is a window in which Stop can land, on a turn with no job to cancel yet. The run it returns is then nobody's: it is cancelled, and the send reports that nothing ran. Which turn is running is asked of the server rather than read back to through the transcript. The kind is checked again here, because the caller takes that row's job as the turn's: every other kind names the agent step's own job, and a turn named with that has Stop cancel the step while the rest of the flow runs on. 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