Skip to content

fix: reopen recently used sessions on launch (1.37.8) - #35

Merged
writingdeveloper merged 4 commits into
mainfrom
fix/bulk-restore-skip-idle
Oct 15, 2026
Merged

writingdeveloper merged 4 commits into
mainfrom
fix/bulk-restore-skip-idle

Conversation

@writingdeveloper

Copy link
Copy Markdown
Owner

Problem

  • A plain launch (reboot, sign-in, quit) restored nothing. Every open tile became a saved entry, so the person pressed Restore all. That reopened every saved conversation, including ones idle for days. Each one is a whole agent process: on SIHYEONG-4080 (2026-10-12), 8 resumed tiles took about 2.4 GB each, and 2 of them had been unused for 4–5 days.
  • lastActiveMs is the tile's last terminal output. A terminal redraws on its own, so this value cannot tell an idle tile from an active one. Measured on 4080: two conversations unused for 63 h still had lastActiveMs within the last hour.

Change

  • persist() marks open tiles with wasLive. On a launch that is not the restart after an update, the app reopens this machine's wasLive tiles whose conversation was written in the last 48 h. Pinned tiles always reopen. The rest stay in Previous, with a toast saying so. The flag is cleared on launch, so an entry left saved does not reopen by itself later.
  • New cockpit:conversationsLastUsed IPC returns transcript mtimes (Claude jsonl, Codex rollout), batched like sessionsExist.
  • A paired viewer does not auto-open remote tiles. Each machine restores its own tiles, and the viewer adopts them when the machine announces them, as it already does.
  • Restore all and the update relaunch are explicit requests, so they still reopen everything they name.

QA

🤖 Generated with Claude Code

https://claude.ai/code/session_01AwhRmzUt3nLnhqU1NJyzpW

writingdeveloper and others added 4 commits October 14, 2026 10:34
Restore all and the post-update relaunch reopened every saved entry,
however long it had sat untouched. Each one is a whole agent process on
its machine (~1 GB for Claude plus a copy of every configured MCP
server), so a paired deck restoring a host after its reboot brought back
conversations nobody had used for days: on 2026-10-12 SIHYEONG-4080 got
8 resumed tiles at ~2.4 GB each, two of them idle since 10-07.

Bulk restore now reopens only pinned entries and entries active within
the last 24 hours. The rest stay in previous sessions, a toast says how
many were left, and one click still opens any of them. Single-entry
restore (click, last-viewed session on launch) is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AwhRmzUt3nLnhqU1NJyzpW
A plain launch (reboot, sign-in, quit) restored nothing: every open tile
became a saved entry, so the person pressed Restore all and got every
saved conversation back, days-idle ones included. The previous commit
filtered bulk restores by lastActiveMs, but that is the tile's last
output, refreshed on every terminal redraw: measured on SIHYEONG-4080,
two conversations idle for 63 h still saved lastActiveMs within the hour.

- persist() marks open tiles wasLive; a launch that is not an update
  relaunch reopens this machine's wasLive tiles whose conversation was
  written in the last 48 h (pinned always), leaves the rest saved, and
  clears the flag so a left entry does not return by itself later.
- new cockpit:conversationsLastUsed IPC answers transcript mtimes
  (Claude jsonl, Codex rollout), batched like sessionsExist.
- Restore all and the update relaunch are explicit again: they reopen
  everything they name, as their labels say.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AwhRmzUt3nLnhqU1NJyzpW
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AwhRmzUt3nLnhqU1NJyzpW
Advisories published after 1.37.7 failed `npm audit --audit-level=high`
in CI on main as well. `npm audit fix` (in-range: electron 43.7.11,
undici, js-yaml, brace-expansion, http-cache-semantics, source-map-js)
plus vitest 3 -> 4.1.11, which drops tinypool. Tests, launch-restore
and resilience journeys pass on the new tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AwhRmzUt3nLnhqU1NJyzpW
@writingdeveloper
writingdeveloper merged commit 5b8869a into main Oct 15, 2026
40 of 44 checks passed
writingdeveloper added a commit that referenced this pull request Oct 15, 2026
1.37.8 shipped the launch-restore fix (#35), so this candidate becomes
1.37.9. Conflicts: persist() keeps this branch's persistSessions path and
carries main's wasLive flag; package.json/lock take main's dependency
fixes (electron 43.7.11, vitest 4.1.11); README keeps this branch's
rewrite. Candidate docs now say 1.37.9.

Verified on the merged tree: npm test 1320 passed / 1 skipped, build,
check:docs, launch-restore Electron check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AwhRmzUt3nLnhqU1NJyzpW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant