Skip to content

fix(cli): hide Resume previous session when no previous sessions exist - #30

Merged
jongracecox merged 1 commit into
mainfrom
worktree/20260520-no-resume-when-no-previous-sessions
May 20, 2026
Merged

fix(cli): hide Resume previous session when no previous sessions exist#30
jongracecox merged 1 commit into
mainfrom
worktree/20260520-no-resume-when-no-previous-sessions

Conversation

@jongracecox

Copy link
Copy Markdown
Owner

Summary

  • Omit the "Resume previous session" entry from the session actions menu when get_sessions_for_path(session.path) returns no sessions.
  • Previously the entry was always shown for worktree/direct sessions, leading to an empty picker on selection.

Test plan

  • uv run pytest (150 passed)
  • Updated existing resume-picker tests to provide a fake ClaudeSession.
  • Added test_resume_picker_hidden_when_no_previous_sessions covering the new behavior.
  • Adjusted test_inactive_worktree_shows_launch since Launch is now the first item when no previous sessions exist.

Previously the session actions menu always showed 'Resume previous
session' for worktree/direct sessions, even when there were no prior
Claude sessions for that path. Selecting it just landed on an empty
picker. Now the entry is omitted entirely when the path has no
sessions in ~/.claude/projects/.
@jongracecox
jongracecox merged commit 2837636 into main May 20, 2026
5 checks passed
@jongracecox
jongracecox deleted the worktree/20260520-no-resume-when-no-previous-sessions branch May 20, 2026 15:55
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