Skip to content

fix: close the window from the last conversation tab - #866

Merged
wibus-wee merged 2 commits into
mainfrom
lody/1e1f4e0b-5f0
Sep 21, 2026
Merged

wibus-wee merged 2 commits into
mainfrom
lody/1e1f4e0b-5f0

Conversation

@wibus-wee

Copy link
Copy Markdown
Member

Problem / pressure

Cmd/Ctrl+W in a Session window opened with modifier-click closed its sole conversation tab and left a draft instead of closing the window. The close resolver accepted but ignored the visible conversation tab count.

Summary

Yield to native window close when one conversation tab remains, including a child or draft, without changing shared Session closure state. Keep focused side-panel close priority, individual closure with multiple conversation tabs, and explicit tab × behavior. Update the bilingual window Spec and decision note, and extend the owning regression suite.

Visual explanation

Cmd/Ctrl+W
  focused side-panel tab → close that tab
  conversation with multiple tabs → close active tab
  conversation with one tab → native window close/hide

Before / after

Before After
A lone conversation closes into a draft. Its window closes/hides through the existing native handler; shared tab state stays open.
Primary and auxiliary windows use tab-first handling regardless of count. Both use the same last-tab window-close rule.

Test plan

  • Passed: Oxfmt 0.65.0 check on the three changed TypeScript files; git diff --check.
  • Added regression cases for the last parent, child, and draft tab, plus focused and hidden side panels.
  • Blocked by missing checkout dependencies: pnpm check (tsgo), pnpm format (oxfmt), and targeted Vitest (vitest).
  • pnpm run docs check: 34 pre-existing submodule link errors, no new errors.
  • Native Electron interaction has not been tested in this checkout.

@wibus-wee
wibus-wee marked this pull request as ready for review September 21, 2026 03:58
@wibus-wee
wibus-wee merged commit 461ab25 into main Sep 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant