## Issue Description
关闭 Qoder 时先后出现两个弹窗:「保存文件更改?关闭前还有 1 个文件未保存。」和「部分文件未能保存。请处理冲突或写入错误后重试。」。两个弹窗都只显示聚合数量,不显示是哪个文件,也没有失败原因(磁盘内容已变化 / 只读 / 权限不足 / 路径不可写 / 写入错误)。按钮只有「取消 / 全部放弃 / 全部保存」,全是全局操作,没有逐文件入口。结果:点「全部保存」继续失败且不说明原因,点「全部放弃」有丢失未保存内容的风险,用户完全无法处理。
Steps to Reproduce
- 在编辑器里新建或修改一个 .md 文件,让标签处于未保存(脏)状态。本次场景:新建文件,路径位于会被外部程序清理或占用的微信临时目录(J:\…\xwechat_files\…\temp\InputTemp\)。
- 不保存,直接关闭 Qoder。
- 出现「关闭前还有 N 个文件未保存」——无文件名。
- 点「全部保存」,写入失败(该文件被创建成 0 字节),出现「部分文件未能保存。请处理冲突或写入错误后重试。」——仍无文件名、无原因。
能否稳定复现:同一台机器同一天至少遇到 2 次。
Expected Behavior
弹窗列出每个受影响文件(文件名 + 完整路径,可点击跳到对应标签页),标明各自状态与失败原因,并提供逐文件操作(保存该文件 / 解决冲突 / 从磁盘重新加载 / 跳过并保留在缓冲区)。
产品里已有可直接复用的文案键:markdownSaveState(dirty 已修改 / conflict 磁盘内容已变化 / error 保存失败)、saveFile 保存文件、resolveFileConflict 解决冲突、fileSaved「已保存 {{name}}」。
而当前 unsavedCloseDescription 的模板是「关闭前还有 {{count}} 个文件未保存。」,unsavedCloseSaveFailed 是「部分文件未能保存。请处理冲突或写入错误后重试。」——模板里只有 count 一个插值,根本没有放文件名和原因的位置。
Actual Behavior
两个弹窗只有聚合数量与全局按钮,没有任何文件名、路径或原因码。
日志侧同样查不到:%APPDATA%\com.qoder.app.stable\logs\\main.log 与 renderer.log 中没有 dirty / unsaved / save-failed 事件,也没有 Backups 目录。也就是说 UI 和日志两处都无法定位文件,最终只能从编辑器 hot-exit 备份逐字节反推,才找回那个被写成 0 字节的新建文件的正文。
Screenshots / Screen Recordings
见附图(第二个弹窗)。
Operating System
Windows 11 — 10.0.26200.9457, x64(installType=user,安装路径 D:\Program Files\Qoder)
Current Qoder Version (Menu → About Qoder → Copy)
Qoder Desktop 0.4.3(production / stable)
发生时间:2026-10-10 约 04:34 与 12:01(本地 UTC-07:00)
English summary: On quit, Qoder shows “Save changes? N file(s) not saved.” and then “Some files could not be saved. Resolve the conflict or write error and retry.” Neither dialog names the file or states the failure reason, and the only controls are Cancel / Discard All / Save All, so Save All keeps failing silently while Discard All risks data loss. main.log and renderer.log contain no dirty / unsaved / save-failed events either, so the file could only be identified from the editor’s hot-exit backup (a newly created file had been written as 0 bytes). Expected: list each affected file with path, concrete state and per-file actions, reusing the strings already present in the app (markdownSaveState / saveFile / resolveFileConflict) — the current unsavedCloseDescription template only interpolates {{count}} and has no slot for a file name or reason. Environment: Qoder Desktop 0.4.3, Windows 11 10.0.26200.9457 x64.
