mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-09 16:05:42 +00:00
Removed the SessionWrapper $effect that retroactively committed the session's workspace from the in-memory chat history. When opening a session whose previous commit attempt had failed (or whose response was lost) the effect ran in a tight retry loop, flooding the user with `workspace_pkey` violations from `create_workspace_fork`. The send path already commits through `AIChatManager.beforeSend` → `commitSessionWorkspace`, which is the deterministic moment-of-action. The $effect was a redundant reactive bridge that turned every backend failure into an infinite retry. Also hardens `materializeFork`/`commitSessionWorkspace` so the most common cause of the duplicate-key error self-heals: - `materializeFork` short-circuits when `fork.id` is already in `$userWorkspaces` (the previous create actually succeeded, we just lost the response). On a `workspace_pkey` catch, refresh the workspace list and adopt the existing row instead of toasting an error. - On a real `materializeFork` failure, `commitSessionWorkspace` now drops `pending_fork` so the session falls through to the workspace-pick fallback instead of looping on the same broken intent.
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