You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
Lifecycle management no longer takes your editor tabs away for good (#369) — with lifecycle management enabled, a managed project whose window is unfocused goes dormant after Background → Dormant minutes (default 2) without an MCP tool call, and the dormant transition closed every open editor tab permanently: the user came back to an empty editor and rebuilt their tab set from Recent Files. The countdown itself was never stale — every tool call on a managed project already restarted it, as a new regression test now proves — but a human-plus-agent workflow has plenty of two-minute gaps (the agent thinking or running builds, the user reading a reply), so the result was that tabs vanished "right after" the last call. The dormant transition now remembers the tabs it closes (in tab order, with the selected one) and reopens them the moment the project window regains focus, or when the project is released; an MCP wake still leaves them closed, since the agent needs no editors and reopening them would spend the memory dormant freed. The remembered set is persisted, so it survives an IDE restart and a lifecycle close-and-reopen — cases where the IDE itself saved the workspace with no editors and would otherwise have lost them. Two adjacent gaps are closed as well: on an IDE restart the focus listener could be registered after the restored window had already taken focus, so a managed project sat in background — countdown running — while the user worked in it and went dormant two minutes later; the listener now catches up on the current focus state, and recording a reopen no longer demotes a project the focus listener has already promoted to active. Switching lifecycle management off in Settings now also stops countdowns that were already armed, instead of letting the last one close the editors anyway.
ide_lifecycle_log and mcp-lifecycle.log say what happened, not only when — the bare [mcp_call] project line was the one-off enrollment, but read like a per-call marker, which is exactly what made #369 look like a timer that was never reset. Log lines now name their event ([mcp_call] kmo3: enroll), and events carry an optional detail: enrollment states which mode it started in and the dormant rule that applies, timer:inactivity states how long the project had no MCP call and what started the countdown, and the new editors_closed / editors_restored events count the tabs closed and reopened. The health check's "open count below minimum" note now says such windows were closed by the user or an IDE shutdown, never by the lifecycle manager, which cannot close below the floor.