Repository navigation
fix(app): resume the last session at launch instead of a new one - #301
Merged
Merged
Conversation
LaunchNewSession redirected every desktop boot to a new-session draft, so a window with work open still came up on an empty prompt. A window with tabs open on the showing side now resumes that side's last session, falling back to an already-open tab when that history is unusable; a new session is only for a window with nothing open. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
quickbeard
force-pushed
the
fix/startup-last-session
branch
from
August 22, 2026 10:39
26d47ab to
4adc3f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue 2 of two. Independent of #300 — different file, no overlap beyond both touching CHANGELOG.
Problem
LaunchNewSessionredirected every desktop boot to a new-session draft, unconditionally:So a window with sessions open still came up on an empty prompt.
Fix
The rule you asked for: a new session opens only when there is nothing else open.
layout.home.lastSession, validated withsessionAliveexactly as the Code/Work switch does, so a deleted session or a departed server never becomes a dead route).Read per side, so Code and Work each come up where they were left rather than one deciding for the other.
Verification
The decision chain is extracted into an exported pure
launchLandingand unit-tested — the same splitworkspace/side.ts'sfolderEntryalready uses, and for the same stated reason: this path is desktop-only (there is no "launch" distinct from "navigate to /" in a browser), so the web e2e harness cannot drive it. Seven tests cover resuming past an open tab, resuming past a leftover draft, both unusable-history fallbacks, the nothing-open case, draft reuse, and that a window which will not resume never waits on the server.Four of them fail against the old always-new-session path (confirmed by disabling the branch and re-running).
test:browser124 pass,test:unit690 pass, typecheck clean.Not verified in the running desktop app — it is desktop-only by design, and I cannot see the Electron window from here. Worth one launch with sessions open before merging.
DIVERGENCES: the existing
LaunchNewSessionrow rewritten to describe the new chain. CHANGELOG entry under Desktop / Web UI.🤖 Generated with Claude Code