diff --git a/CHANGELOG.md b/CHANGELOG.md
index 56c3225e..752ce884 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,4 @@
+- Fixed toolbar button focusing an existing session tab instead of opening a new one when all open tabs have active sessions
- Reorganized General and Advanced settings tabs: moved technical settings (hang timeout, MCP port, Enable MCP integration, session list limit, debug mode) to Advanced
- Fixed prompt area being collapsible to zero height by dragging the divider
- Fixed terminal scrolling to the beginning and locking when a choice/confirmation menu appears (https://github.com/nbclaudecodegui/NetbeansClaudeCodeGui/issues/22)
diff --git a/pom.xml b/pom.xml
index 5884868c..b4ef043c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
io.github.nbclaudecodegui
netbeans-claude-code-gui
- 0.22.16-SNAPSHOT
+ 0.22.17-SNAPSHOT
nbm
Netbeans Claude Code GUI
NetBeans plugin that provides a GUI for Claude Code CLI — run claude code sessions directly inside the IDE.
diff --git a/src/main/java/io/github/nbclaudecodegui/ui/ClaudeSessionTab.java b/src/main/java/io/github/nbclaudecodegui/ui/ClaudeSessionTab.java
index a211caad..0aed0335 100644
--- a/src/main/java/io/github/nbclaudecodegui/ui/ClaudeSessionTab.java
+++ b/src/main/java/io/github/nbclaudecodegui/ui/ClaudeSessionTab.java
@@ -614,7 +614,6 @@ public void autoStart(File dir, String profileName, String extraCliArgs,
selectorPanel.setProfile(profileName);
selectorPanel.preselectForDirectory(dir);
selectorPanel.setExtraCliArgs(extraCliArgs);
- selectorPanel.lock();
startSession(dir, profileName, extraCliArgs != null ? extraCliArgs : "",
mode != null ? mode : SessionMode.NEW, resumeSessionId);
}
@@ -661,7 +660,6 @@ public String getSelectedProfileName() {
/** Fired by the selector panel when the user confirms a valid directory. */
private void onDirectoryOpened(File dir, String profileName, String extraCliArgs,
SessionMode mode, String resumeSessionId) {
- selectorPanel.lock();
startSession(dir, profileName, extraCliArgs, mode, resumeSessionId);
}
@@ -671,6 +669,7 @@ private void startSession(File dir, String profileName, String extraCliArgs) {
private void startSession(File dir, String profileName, String extraCliArgs,
SessionMode mode, String resumeSessionId) {
+ selectorPanel.lock();
this.activeResumeSessionId = resumeSessionId;
Path configDir = null;
if (!ClaudeProfile.DEFAULT_NAME.equals(profileName)) {