Skip to content

Fixed --continue passed even when no sessions exist for the directory - #8

Merged
oleg68 merged 2 commits into
nbplugins:mainfrom
oleg68:bugfix/continue-absent
Apr 11, 2026
Merged

oleg68 merged 2 commits into
nbplugins:mainfrom
oleg68:bugfix/continue-absent

Conversation

@oleg68

@oleg68 oleg68 commented Apr 11, 2026

Copy link
Copy Markdown
Collaborator

When SessionMode.CONTINUE_LAST was selected, claude --continue was unconditionally appended. If no prior sessions existed for the working directory, the CLI would fail.

Fix: extracted appendSessionFlags() from start(), added ClaudeSessionStore.hasAnySessions() (file-existence check, no parsing), and guard --continue behind it — falls back to a new session silently.

Fixed tab not closing when CLOSE_ONLY is selected in SaveAndSwitchDialog

After stopping and renaming a session, the tab now closes itself via doCloseTab() (which calls TopComponent.close()). A protected hook method was introduced to make the behaviour testable without the full NetBeans platform.

Added "Restart Advanced..." option to Save & Switch dialog

Stops the current session and returns to the selector panel in the same tab, allowing full reconfiguration (directory, profile, mode) before starting a new session.

Also fixed a bug where selecting "Resume specific" in the selector panel showed an empty session list until the profile was changed. Root cause: reloadSessionModePanel() only updated SessionModePanel when mode was already RESUME_SPECIFIC, so the stored workingDir was stale. Fix: always update SessionModePanel on directory/profile changes, and also refresh on pathCombo changes.

Oleg Samarin and others added 2 commits April 11, 2026 10:22
When SessionMode.CONTINUE_LAST was selected, claude --continue was
unconditionally appended. If no prior sessions existed for the working
directory, the CLI would fail.

Fix: extracted appendSessionFlags() from start(), added
ClaudeSessionStore.hasAnySessions() (file-existence check, no parsing),
and guard --continue behind it — falls back to a new session silently.

Fixed tab not closing when CLOSE_ONLY is selected in SaveAndSwitchDialog

After stopping and renaming a session, the tab now closes itself via
`doCloseTab()` (which calls `TopComponent.close()`). A protected hook
method was introduced to make the behaviour testable without the full
NetBeans platform.

Added "Restart Advanced..." option to Save & Switch dialog

Stops the current session and returns to the selector panel in the same
tab, allowing full reconfiguration (directory, profile, mode) before
starting a new session.

Also fixed a bug where selecting "Resume specific" in the selector panel
showed an empty session list until the profile was changed. Root cause:
reloadSessionModePanel() only updated SessionModePanel when mode was
already RESUME_SPECIFIC, so the stored workingDir was stale. Fix: always
update SessionModePanel on directory/profile changes, and also refresh
on pathCombo changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oleg68
oleg68 merged commit 4ec2910 into nbplugins:main Apr 11, 2026
3 checks passed
@oleg68
oleg68 deleted the bugfix/continue-absent branch April 11, 2026 08:54
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