Skip to content

fix(commander): close (✕) button should stop the session, not just hide (same as minimize)#1018

Open
SmolSmolStar wants to merge 2 commits into
web3dev1337:mainfrom
SmolSmolStar:fix/commander-close-stops-session
Open

fix(commander): close (✕) button should stop the session, not just hide (same as minimize)#1018
SmolSmolStar wants to merge 2 commits into
web3dev1337:mainfrom
SmolSmolStar:fix/commander-close-stops-session

Conversation

@SmolSmolStar

Copy link
Copy Markdown
Contributor

Summary

The Commander floating panel's minimize (—) and close (✕) buttons both call hide(), so they do the exact same thing — just hide the panel. That makes one of them redundant and there's no way to actually close the Commander session from the titlebar.

Fix

Make them distinct, matching normal window conventions:

  • Close (✕) → new closeSession(): stops the Commander session (stopCommander()POST /api/commander/stop), then hides the panel. Reopening starts a fresh Commander.
  • Minimize (—) → unchanged hide(): only hides the window, leaves the session running for an instant re-open.

Test plan

  • With the Commander running, click : panel hides, status stays running, reopening is instant.
  • Click : session stops (status → Stopped), panel hides; reopening starts a fresh Commander.

🤖 Generated with Claude Code

SmolSmolStar and others added 2 commits July 13, 2026 02:10
The Commander titlebar's minimize (—) and close (✕) buttons both called hide(),
so they did exactly the same thing (just hide the floating panel). Make them
distinct and match window conventions: close (✕) now stops the Commander session
(via stopCommander) and then hides, so it's a true close; minimize (—) keeps
hiding only, leaving the session running for an instant re-open.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…iately

Review feedback: the close (X) button silently killed a live Commander
session on a single reflexive click, and the panel hung until the stop
round-trip finished. Now a running session asks for confirmation first,
the panel hides optimistically, and the stop call runs in the background
(stopCommander already handles its own errors and never throws).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@web3dev1337

Copy link
Copy Markdown
Owner

Reviewed as part of an open-PR sweep. Pushed one fix on top: close (✕) now asks for confirmation when a session is actually running (it kills the live Commander process — too destructive for an unguarded titlebar click), and the panel hides immediately instead of hanging on the stop round-trip. Verdict after fix: good to merge.

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.

2 participants