Repository navigation
fix(gpui): 统一退出协调器(关窗即退出、批次中确认、系统终止) - #90
Merged
Merged
Conversation
Closing the main window now quits the application instead of leaving a windowless process that holds the instance marker. Quitting while a batch runs asks first and waits for in-flight writes off the UI thread. The Dock's Quit and session end reach the coordinator through a new applicationShouldTerminate: hook in the vendored macOS platform. A latch refuses batches that race the quit, and number drafts are committed before the settings are flushed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…terminate Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
实现
docs/GPUI_MACOS_LIFECYCLE_PLAN.md的 PR-A(L1–L4、L7)。修复
框架补丁
gpui-pre/gpui-pre-macos新增applicationShouldTerminate:询问(App::on_should_terminate,按kAEQuitReason区分会话结束;状态被借用时回复取消并从主队列重新发起),已登记到覆盖登记表,说明见docs/GPUI_PATCHES.md。与方案的偏差
见方案第 7 节:会话结束同步等待、不注册 on_reopen、规划/输出安全确认阶段退出不询问(未写文件)、确认前不关闭已开对话框。
验证
tests/quit.rs4 项、终止决策表单元测试),clippy-D warnings通过,覆盖登记表verify.py与工具测试通过。🤖 Generated with Claude Code