mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-19 16:03:29 +00:00
The /sessions sidebar eagerly warmed a full runtime (AIChatManager + loaded chat history + an IndexedDB connection) for every visible session, so the page's mounted weight grew linearly (O(number of non-archived in-family sessions)) and never released as sessions accumulate over time. Cap the warm runtimes with an MRU (the active session + up to MAX_WARM_RUNTIMES) and dispose the rest, mirroring the existing preview-tab and editor MRU caps. Sessions holding volatile state — a mid-stream generation, a pending tool confirmation, or unsent composer text — are kept warm so nothing is cancelled or lost (protect-not-persist; the composer draft lives in AIChatInput local state and isn't persisted). Cold (evicted) sessions show the neutral status dot with no unread badge until reopened. Measured ~1.5-2x the transcript size per resident session; the change converts O(N) growth into O(1). Co-Authored-By: Claude Opus 4.8 (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