8000 fix(ui): quit when the last kagan window closes, even with a plugin loaded by aorumbayev · Pull Request #151 · kagan-sh/kagan · GitHub
[go: up one dir, main page]

Skip to content

fix(ui): quit when the last kagan window closes, even with a plugin loaded - #151

Merged
aorumbayev merged 8 commits into
mainfrom
fix/quit-with-plugin-window
Nov 13, 2026
Merged

aorumbayev merged 8 commits into
mainfrom
fix/quit-with-plugin-window

Conversation

@aorumbayev
Copy link
Copy Markdown
Member

Why

On Windows and Linux, closing the last kagan window should quit kagan (PR #143). quit.rs checked cx.windows().is_empty(), but every loaded plugin keeps its own window (activation.rs) until the plugin is deactivated. With any plugin loaded, the list was never empty, so closing the main window left kagan running with no window. Same cause as #150: a plugin's window counted as kagan's.

What

  • kagan_windows moves from ui_driver.rs to kagan/window.rs; kg ui and quit both ask it.
  • Quit asks "is any kagan window left" through none_left(cx); only the quit call itself stays platform-gated.
  • Regression test with no platform gate (a_plugin_window_alone_leaves_no_kagan_window); it fails without the fix.
  • Decision 273 gains one sentence; Cost +7.

@aorumbayev
aorumbayev marked this pull request as ready for review November 13, 2026 03:12
@aorumbayev
aorumbayev merged commit 4046afb into main Nov 13, 2026
37 of 39 checks passed
@aorumbayev
aorumbayev deleted the fix/quit-with-plugin-window branch November 13, 2026 03:28
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

0