Repository navigation
feat(web): refine workspace, model setup and native session workflows - #598
Conversation
tt-a1i
left a comment
There was a problem hiding this comment.
审查提交:ece3e4201cc22b5ef719266fc55d3fa717ef6fd1。
需要修改后再合并。
具体问题
P2 — 逐文件详情丢失重命名的旧路径 · web/host/git-review.ts:283
真实临时 Git 仓库执行 git mv old.txt new.txt:staged summary 为 renamed、+0/-0;请求 new.txt 详情却变成 added、/dev/null 全文件新增。filePath pathspec 只包含新路径,截掉 rename source。
P2 — 摘要 revision 未包含 index 内容身份,刷新仍保留旧暂存差异 · web/host/git-review.ts:540
保持工作文件不变,用 git update-index 将暂存 blob 从 staged-a 改为 staged-b,两者 +1/-1;两个 summary revision 完全相同,detail 内容不同。ReviewPanel effect 依赖该 revision 并保留 loadedFile,故刷新相同路径时不会重新读,继续显示旧暂存内容。应包含所选比较两端的 Git 对象身份。
P2 — POSIX 权限位断言阻断 Windows CI · tests/web/model-configuration.test.ts:67
当前 GitHub Windows job 在新增用例此行失败,实际 mode 438(0666)对期望 384(0600);Windows 不提供同样的 POSIX 权限位语义。应按平台验证适用的文件权限,不能把此失败当作 Windows 凭据泄漏证据。run 35565898489。
验证范围
已审阅生产代码、相关原生配置测试及五份历史验证记录。80 个 Node 测试通过,218 个 UI/集成测试通过。独立真实 Git 复现上述两个差异问题。
限制与后续
本轮未重新运行完整浏览器 E2E、真实模型或 Windows 本地测试;当前远端 E2E 在真实嵌入 Chromium 首帧仍 hidden 处失败,原因未定位,不能引用 PR 描述的旧本机 56/56 替代当前 CI。源码/原生集成验证不等于浏览器全面验收。
已核对的 CI 失败
Run 35565898489:Web E2E:真实 Chromium 初始图像 5 秒后仍为 hidden;根因未定。Windows:新增 models.json 用例无条件断言 POSIX 0600,实际 0666。前者需要复现,后者是明确的平台测试问题。
tt-a1i
left a comment
There was a problem hiding this comment.
复审提交 4480b8d88a9453eea7b2cfed3e26a50d7927770b。
本轮新增了会话历史、后台执行投影、地址草稿和 Chromium 启动/清理诊断;此前 Windows POSIX 权限断言已按平台修正。不过两个确定性 Git review 问题在当前 head 仍存在,且当前 Node 24 检查新增失败,因此仍需修改。
P2 — 逐文件详情仍丢失 rename 的旧路径 · web/host/git-review.ts:283
详情查询仍把 pathspec 限定为新路径。真实 git mv old.txt new.txt 的摘要能识别 rename,但打开 new.txt 详情会截掉 source,退化为 /dev/null 到新文件的 added diff。当前 head 没有修改这条生产路径或增加 rename detail 回归。
P2 — summary revision 仍不包含 index 内容身份 · web/host/git-review.ts:540
revision 目前使用工作树文件的 size/mtime/ctime;纯 git update-index 可以在工作文件完全不变时替换 staged blob。相同路径和相同 +/- 统计仍产生相同 revision,UI 会继续保留旧的暂存详情。revision 需要纳入所选比较两端的 Git object/index 身份。
P2 — 当前 Node 24 CI 在本 PR 修改的 wheel 合并用例失败 · tests/web/workbar-input.spec.ts:202
Run 35736169313 中 coalesces wheel deltas while an input request is in flight 期望首次 browserAction 已调用一次,实际为 0;全量结果 464 pass / 1 fail。请定位时序问题或修正确定性等待后重跑,不应以其他 job 或旧本地结果代替当前 head 的集成检查。
验证边界:没有对 115 个文件做完整浏览器人工验收;以上前两项来自可重复的真实 Git 行为,第三项来自当前远端日志。最新 Chromium cleanup 增量保留原始启动错误并等待 close 后删 profile,未发现额外阻断。
ProblemThe composer-level file bubble accumulated pre-existing dirty files, while a long Session could say its history was exhausted even when an individual message body was only a truncated preview (observed on the resident 57161 service). ValueThe conversation now shows only changes recorded during each user turn, next to its answer. Older native turns and the full visible body of a truncated user/assistant item can be restored without raising the bounded snapshot size. Approach
ValidationCommit 94059b5: ImpactNo model-facing tool or package configuration change. Turn diffs are bounded private Session evidence (200 files / 256 KiB, 64 MiB baseline quota); a partial or unavailable baseline is explicitly distinguished from verified zero changes. Existing Session data and the resident service were left untouched. Research, limits, and ablation: https://github.com/testikun/openpi/blob/codex/web-ux-597/docs/research/WEB_TURN_EVIDENCE_AND_ITEM_RECOVERY_2026-09-23.md |
tt-a1i
left a comment
There was a problem hiding this comment.
复审当前提交 50fc08222094b23a33e894bf00e58cc3c687f303:之前指出的 Git review rename 详情和 staged revision 身份问题,在本轮新增的 web/host/git-review.ts 改动中已有针对性修复;旧 review 的这两点不再作为当前阻断项。
当前提交的 CI 仍未通过。Web E2E run 36527876084 有 10 个失败(58 个通过),涉及本 PR 的浏览器增强、紧凑导航、移动侧栏、设置页和恢复流程;其中浏览器增强用例的 Extensions.loadUnpacked CDP 命令在 CI Chromium 中不存在,紧凑导航用例找不到 .sidebar-scope-note。Windows 全量套件另外有 2 个失败:artifact HTTP 测试期望 200 实际 403,文件保存测试的断言也失败。请先修复或明确隔离这些当前 head 的失败,并让同一提交的 Web E2E 与 Windows 作业通过,再复审合并。当前没有充分证据把这批失败归为无关环境波动。
tt-a1i
left a comment
There was a problem hiding this comment.
复审当前提交 563d6808ebbfee27c6bb6aeb02e7b593a656ee0c。之前的 Web E2E 和 Windows CI 阻断已解决:当前五项 CI 均成功,且与当前 main 的 merge-tree 无冲突。旧失败不再作为本轮阻断。
P2 — 固定旧版 comparison 时,按需详情仍读当前工作区,并被标成旧 revision
位置:web/ui/src/features/review/ReviewPanel.tsx:196-199,以及 web/ui/src/features/review/use-git-review.ts:173-178。
真实临时 Git 仓库加实际 ReviewPanel 复现:两个已跟踪文件都有工作区改动;打开 a.txt 固定 revision A;随后把 b.txt 从 OLD_PINNED_B 改为 NEW_UNADOPTED_B 并刷新 summary 为 revision B。面板仍显示“Show latest diff”,未点击采用新版;此时点击旧版文件树里的 b.txt,展示的却是 NEW_UNADOPTED_B。
原因是 readFile 只发送 source/file,没有固定 comparison 的身份;返回后还丢弃服务端 revision。ReviewPanel 再用闭包中的旧 revision 给当前 diff 贴标签。文件切换、重试或延迟详情请求都可能混合不同时间的内容、路径和统计,破坏这个 PR 新增的“固定所选版本,显式采用更新”行为。
请把详情读取绑定到所选 comparison 的身份:保留一致的内容快照,或在内容改变时明确拒绝读取并要求采用最新版本;不要把当前内容赋给旧 revision。增加两个文件、工作区改变后切换尚未加载文件的回归用例;仅测试已加载文件在刷新后不重新加载不能覆盖此路径。
验证:独立 checkout 的 bun run check 通过;bun run test 为 2,045 Node 测试通过、8 skipped,以及 855 Vitest 测试通过;额外真实 Git + UI 复现用例确认上述行为。没有新增全套浏览器人工验收或真实模型调用;Web E2E / Windows 结论来自该 head 的远端 CI run 36710907638。
tt-a1i
left a comment
There was a problem hiding this comment.
复核修复提交 b22b16df88c2fea95e7e3df25321abc252d69a46:上一轮指出的 diff 版本混用问题已修复。
逐文件请求现在携带所选 summary revision;Host 在详情读取前后核对 comparison,发生变更时返回 revision_changed;UI 核对服务端 revision,只有显式采用最新版本后才显示新版详情。已加载的旧 diff 保持可读。
新增真实 Git + UI 回归覆盖:固定 a.txt 后修改 b.txt、切换未加载文件、重试拒绝、显式采用更新后正确显示;另有原生 Git staged/index 和 HTTP revision 回归。独立 checkout 的 bun run check 通过,完整测试 2,046 Node pass / 8 skipped、856 Vitest pass。该 head 与当前 main 无 merge-tree 冲突。
代码 review 阻断已解除。当前新 head 的远端 CI 尚在运行,合并仍等待其全部通过;不沿用旧 head 的绿色结果。
tt-a1i
left a comment
There was a problem hiding this comment.
复核最新 head 39007747328217de0ad46d1ffba8c6b188f9344b:diff 详情的 comparison revision 绑定已修复,读取前后验证版本,UI 拒绝旧版列表下的新内容;真实 Git、HTTP、staged index 和 UI 切换/重试/显式采用更新回归通过。
后续提交仅修正真实 Git 回归测试的等待时间。保留原始失败 run 36740954333:Windows 在新增 UI 用例的首个 figure 查询处超过默认 1 秒,日志仍为 Reading Git changes;其余全部 Node/HTTP 检查及 Web E2E 成功。现改为等待实际状态,异步等待上限 15 秒、用例上限 60 秒,没有改动断言或跳过 Windows。额外人为延迟首个读取 1.2 秒的本地回归也通过。
最新本地 bun run check 和完整 bun run test 再次通过:2,046 Node pass / 8 skipped、856 Vitest pass。当前 CI run 36742402541 的 Node 22/24/26 已成功,Windows 与 Web E2E 尚在运行;合并仍需等待全部通过。代码 review 无剩余阻断。
…inuity (#640) * feat(web): preserve drafts, history reading and workbar continuity Follow up merged PR #598; refs #639. * docs(web): link issue and PR with publication validation Refs #639 and #640. Preserve failed attempts and manual evidence boundaries. * fix(web): preserve history navigation intent and portable validation * fix(web): retain pane widths until matching saved preferences arrive --------- Co-authored-by: testikun <[email protected]> Co-authored-by: tt-a1i <[email protected]>
Problem
Daily Web work could lose drafts or reading position across Session switches, confuse live execution with history, and obscure settings outcomes. The sidebar lacked pinned conversations and compact activity cues. The composer exposed several competing model controls, and provider setup required a long form with one-at-a-time model entry.
The workbench also lacked a compact path to child work and sent sources. File changes were mixed with workspace Git totals, limited responses could appear complete, and the image-streamed browser made ordinary typing and selection cumbersome. Related to #597; follows merged #561.
Value
Keep ongoing conversations stable while operators switch Sessions, inspect results, configure providers and continue writing during compaction. Use a restrained workspace sidebar, one model/thinking entry, searchable batch model setup and direct access to child work. Preserve native execution evidence and exact Session ownership throughout.
Approach
Validation
563d680: all five jobs passed (Node 22.19.0, 24, 26; Web E2E including Plan Ready; Windows process lifecycle and full suite).bun run check: passed, including configuration/documentation contracts, Web typecheck/build, formatting, lint and TypeScript.bun run test: 2,045 Node tests passed, 8 skipped; 855 Vitest tests passed.Browser checks use isolated temporary workspaces and deterministic provider fixtures. They do not claim a new live-provider benchmark. The existing large-bundle advisory remains.
Impact
ui.webPinnedSortis the new package preference (manualorupdated); setup/status/default documentation is wired through the shared contract. Up to 100 pins use existing workspace metadata; read acknowledgements are tab-scoped.