fix: refresh magic notes after external updates
Subscribe the open Magic Notes workspace to committed database changes from desktop and Agent/MCP writes. Preserve selections and unsaved drafts during refresh and external deletion. File-level commit includes existing runtime edits in shared files; their remaining dependencies are still in the working tree. Release note: Magic Notes now updates automatically after Agent/MCP edits while preserving your selection and unsaved drafts.
This commit is contained in:
@@ -1604,6 +1604,12 @@ const desktopApi: DesktopApi = {
|
||||
handler
|
||||
)
|
||||
},
|
||||
onChanged: (listener) => {
|
||||
const handler = (): void => listener()
|
||||
ipcRenderer.on(ipcChannels.magicNotesChanged, handler)
|
||||
return () =>
|
||||
ipcRenderer.removeListener(ipcChannels.magicNotesChanged, handler)
|
||||
},
|
||||
onTodoStatusChanged: (listener) => {
|
||||
const handler = (): void => listener()
|
||||
ipcRenderer.on(ipcChannels.magicTodosStatusChanged, handler)
|
||||
|
||||
Reference in New Issue
Block a user