Skip to content

Fixed toolbar button focusing an existing session tab instead of opening a new one when all open tabs have active sessions - #85

Merged
oleg68 merged 1 commit into
nbplugins:release/0.21from
oleg68:bugfix/0.21/toolbar-opens-new-tab-when-all-active
Apr 22, 2026
Merged

oleg68 merged 1 commit into
nbplugins:release/0.21from
oleg68:bugfix/0.21/toolbar-opens-new-tab-when-all-active

Conversation

@oleg68

@oleg68 oleg68 commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Moved selectorPanel.lock() into startSession() so it is called centrally for every code path that launches a session. Previously onSaveAndSwitch() called startSession() without locking the selector panel first — after cleanupChatLayout() called unlock(), the Open button remained enabled, causing isSessionActive() to return false for an active session. The toolbar's openNewOrFocus() would then find that tab and focus it instead of creating a new empty one.

…ing a new one when all open tabs have active sessions

Moved selectorPanel.lock() into startSession() so it is called
centrally for every code path that launches a session. Previously
onSaveAndSwitch() called startSession() without locking the selector
panel first — after cleanupChatLayout() called unlock(), the Open
button remained enabled, causing isSessionActive() to return false
for an active session. The toolbar's openNewOrFocus() would then find
that tab and focus it instead of creating a new empty one.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oleg68
oleg68 merged commit 3728d39 into nbplugins:release/0.21 Apr 22, 2026
3 checks passed
@oleg68
oleg68 deleted the bugfix/0.21/toolbar-opens-new-tab-when-all-active branch April 22, 2026 14:01
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