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
{{ message }}
Repository navigation
(restore): quit during a restore can save a duplicate fresh session or drop an attaching continuation #550
Follow-ups from the review of #548 (integration of #477, #479 and #518). Neither PR shows these alone: the scheduled saves stop during runRestore, and only #479's final exit flush reaches the windows below.
A quit during a fresh restore saves two new sessions.launchNewSession (public/app.js:1349,1363) adds the new id to pendingSessions/openSessions before await openTerminal, while the fresh item is still in restoreInFlight. A quit in that window saves [{cleared, active, fresh}, {started-1, fresh}], and the next start opens two new sessions in the project. Repro written outside the repo. Fix: drop the in-flight fresh item once this restore has created a pending session for its project.
A quit while a continuation opens as attach drops it from the saved set. The entry is open with attach=true and item.sessionId is already the new id (app.js:310), but keepAttached is set only after the open returns (:329, :1550). The held filter (app.js:210) skips it. Fix: also keep entries that are open as attach and still in restoreInFlight.
clearOwner on the process-table path is untested.test/cli-session-state.test.js:540-561 injects readParentPid, which turns the table off. Add a test with readProcessTable injected and win32 as the platform.
All three are narrow: a quit during restore, and a test gap. Bugs 1 and 2 are red-first.
Activity
(restore): keep the saved active mark on a fresh entry while it opens (…
(restore): never save two active entries, and clear the opening mark …
(restore): a quit during restore keeps neither a duplicate fresh sess…
(restore): keep the saved active mark on a fresh entry while it opens (…
(restore): never save two active entries, and clear the opening mark …
(restore): a quit during restore neither duplicates a fresh session n…