Skip to content

fix(dispatch): close selected dispatch agent - #44

Merged
Juliusolsson05 merged 2 commits into
mainfrom
fix/dispatch-close-focused-target
May 5, 2026
Merged

Juliusolsson05 merged 2 commits into
mainfrom
fix/dispatch-close-focused-target

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Summary

  • route close-focused through the explicit session close path when Dispatch Mode has a selected row
  • prevents Cmd/Option-W from closing the grid pane focused underneath Dispatch instead of the visible dispatch selection
  • keeps normal grid close behavior unchanged outside Dispatch Mode

Root cause

closeFocused() always read activeTab.focusedSessionId. Dispatch Mode keeps its selected row in dispatchMode.focusedSessionId, and that selection can point at a detached agent with no tile-tree leaf. Closing from Dispatch could therefore act on the stale grid focus under the dispatch UI, which looked random to the user.

The existing closeSession(targetId) path already handles explicit-id closes for both detached and grid sessions, so Dispatch close now delegates there.

Verification

  • npm run build:app

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