fix: sync todo completion with source notes

Completing a Magic Notes todo updated the stored checklist but left the cached
source note stale until the workspace was remounted. Todo updates now return
the refreshed source note and update the active note cache immediately for
both completion and reopening.

Release note: 修复在待办视图勾选或取消待办后,源笔记必须切换页面才显示最新状态的问题;现在会即时同步。
This commit is contained in:
mesalogo
2026-08-21 23:27:41 +08:00
parent 63f0f7f0b0
commit fee4686750
7 changed files with 114 additions and 20 deletions
+2 -1
View File
@@ -107,6 +107,7 @@ import type {
MagicNoteDetail,
MagicNotesSnapshot,
MagicTodoItem,
MagicTodoUpdateResult,
MagicTodosSnapshot
} from '../shared/magic-notes-contracts'
import type {
@@ -1113,7 +1114,7 @@ const desktopApi: DesktopApi = {
ipcRenderer.invoke(
ipcChannels.magicTodosUpdate,
input
) as Promise<MagicTodoItem>,
) as Promise<MagicTodoUpdateResult>,
analyzeTodo: (todoId, options) =>
ipcRenderer.invoke(ipcChannels.magicTodosAnalyze, {
todoId,