Files
MooTool/next-compose/docs/diff/366-quicknote-git-flush-skip-clean.md
RememBerBerandCursor c834db2a83 feat(next-compose): 对照 Electron 落地 F00–F25 与 A01–A03 主体能力
将 Vault/Git/MCP/AI、壳层主题密度、25 工具真实闭环与 desktopTest 638 项及 DIFF-065–471 文档/证据一并纳入仓库,便于持续对齐验收;产品窗 IME/冲突与三平台发行仍待验。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-17 06:51:45 +08:00

16 lines
845 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DIFF-366:随手记 Vault Git flush 跳过干净文档
## 问题
JSON Vault Git 已在 [DIFF-332](332-json-git-flush-skip-clean.md) 在 `editor.text == savedText` 时跳过 `onFlush` 写盘。随手记 `onFlush` 每次仍调用 `quickNoteVaultSaveIfNeeded`(虽因 `quickNoteDirty` 很快返回),未显式跳过;且 metadata 与正文一致时应对齐 `isVaultEditorDirty()` / Electron `dirty`(含 metadata)。
## 行为
- 提取 `quickNoteGitFlushBeforeAction`:`currentFile` 为空时沿用未命名守卫;已命名且 `!quickNoteDirty(session)` 时返回 `null`(不写盘);脏时 `quickNoteVaultSaveIfNeeded`,失败返回 `error` 或 `quickNote.saveFailed`。
- `QuickNoteScreen` Git 对话框 `onFlush` 委托上述函数。
## 验证
- `QuickNoteGitFlushTest`
- `./gradlew :composeApp:desktopTest --offline`