Skip to content

feat(web): refine workspace, model setup and native session workflows - #598

Merged
tt-a1i merged 57 commits into
openpi-dev:mainfrom
testikun:codex/web-ux-597
Sep 30, 2026
Merged

tt-a1i merged 57 commits into
openpi-dev:mainfrom
testikun:codex/web-ux-597

Conversation

@testikun

@testikun testikun commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Add a Pinned section with exact Session identities, drag/keyboard ordering and recently updated sorting. Pin/unpin lives on the row icon; the overflow menu keeps rename/archive. Running, unread completion and attention marks share one size and alignment. Completion is acknowledged after four visible seconds; disconnection never implies completion. Sidebar and model design.
  • Rework only the model settings content into provider cards, inline editors, built-in/custom provider modes, credential controls and searchable model discovery with batch selection. Keep unsaved drafts across settings tabs, validate capacities using K/M notation, and preserve unknown/private native configuration fields. Discovery imports explicitly reported limits and capabilities; unavailable metadata remains unset and can be entered manually. The combined model/thinking popover uses Pi's actual available levels and preserves model identity even when display names match.
  • Simplify the rounded composer and its DSH-inspired action menu. Reuse native File, Goal, Plan, Compact and Model actions; move runtime and credential inspection into Settings. Preserve drafts, attachments, keyboard navigation and mobile reachability. Native compaction holds accepted messages in a bounded queue with explicit retry/clear. Web goal feedback and continuation reuse the existing Session bridge. Composer lifecycle.
  • Add a two-circle session overview entry with Git totals, recent sources and a subagent summary. Child lists use stable colored robot icons, grouped live/completed/history records and preserved scroll/focus. Sources come from native user messages, with exact Session-bound image and file access; the existing Workbar retains the Files entry. Overview and source design.
  • Use one Workbar diff reader for workspace changes and saved turn evidence. Wide panels retain a searchable file tree beside the diff; narrow panels keep list/detail navigation. Pin the selected revision until explicit adoption of new changes. Paginate large comparisons with honest complete/partial counts. Record bounded native write/edit evidence so unrelated untracked files cannot erase a turn's file card. Review design and evidence limits.
  • Preserve message order, native timing, drafts and history reading windows. Match tool results without duplicating text. A verified append now updates the visible reading window synchronously, preserving live message DOM. Appearance preferences use the existing validated writer. Display and turn evidence.
  • Provide workspace file browsing, inline previews and explicit revision-checked UTF-8 edits using existing artifact grants. Replace the CDP/PNG browser with native iframe tabs and an optional Chrome/Edge navigation bridge. Files · Browser extension and limitations.
  • Integrate current main, including Plan Ready's native approval handoff and Pi transcript compatibility, while retaining exact Session ID/path guards, draft ownership, admission recovery and compaction queues. Resolve conflicts in source, tests and CI, then rebuild committed Web assets.
  • Preserve Windows file replacement by closing the verified read descriptor before synchronous rename, and use native path joins when aggregating newly created file evidence. Extension E2E uses full Chromium; terminal focus tests wait for the restart action to become available.

Validation

  • CI on 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.
  • Plan provider Chromium suite: all 5 scenarios passed, including light/dark streaming, questions, Plan Ready preparation, Session switching and explicit implementation admission.
  • Full workbench Chromium suite: all 78 scenarios passed, covering desktop/mobile layouts, settings/provider discovery, unified model/thinking controls, pins, archives, queues, source/file/review panels, child inspection and native browser behavior. The extension navigation/popup scenario also passed three consecutive runs.
  • Removing the synchronous verified-history projection reproduced the live-message interruption regression; the required projection was restored. The redundant Plan Ready label was removed because the composer already displays the native state.

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

  • User-visible: workspace navigation, pins/activity cues, provider setup, unified model/thinking selection, composer actions/queue, native timing, child/source inspection, file/review panels and browser interaction change. The outer settings layout remains unchanged.
  • Model-visible context/tools: no new model tool, provider stack or child authority. Pi owns model selection and thinking levels. Plan implementation remains explicitly authorized; Web feedback reuses native extension behavior.
  • Runtime/lifecycle: Session ID and path bind prompts, Plan approvals, queues, reads and writes. Uncertain admission is never silently resubmitted. Queues and released-Session completion receipts are bounded Host-lifetime resources; restarting the server does not retain undelivered messages. Goal continuation stops after host/Session detachment.
  • Persisted configuration/data: native model definitions change only after explicit save through atomic revision checks. Unknown discovery capabilities are not inferred from model names. Temporary discovery credentials are not persisted. ui.webPinnedSort is the new package preference (manual or updated); setup/status/default documentation is wired through the shared contract. Up to 100 pins use existing workspace metadata; read acknowledgements are tab-scoped.
  • Compatibility/limits: saved file evidence covers native write/edit only, with bounded content and explicit unknown statistics; shell/child/external writes are outside that evidence. Old records remain readable. Review is read-only and never substitutes current workspace content for an unavailable saved diff. File editing is explicit and revision checked, not a lock against external writers. Native browser behavior remains subject to CSP, authentication and cross-origin restrictions; the optional extension is not an isolation boundary between untrusted loopback apps. No dependency is added.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 20, 2026
@github-actions github-actions Bot added the area:setup OpenPI setup, configuration, or setup documentation label Sep 21, 2026
@testikun testikun changed the title fix(web): improve session isolation and workbar interactions fix(web): enable native settings and improve browser, Git and file interactions Sep 21, 2026

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查提交: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。前者需要复现,后者是明确的平台测试问题。

@testikun testikun changed the title fix(web): enable native settings and improve browser, Git and file interactions fix(web): improve settings, workbar interactions and execution feedback Sep 22, 2026
@testikun
testikun requested a review from a team as a code owner September 22, 2026 12:26
@github-actions github-actions Bot added the area:github GitHub workflows, templates, ownership, or tests label Sep 22, 2026
@testikun testikun changed the title fix(web): improve settings, workbar interactions and execution feedback fix(web): improve native settings, session history and workbar interactions Sep 22, 2026

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复审提交 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,未发现额外阻断。

@testikun

Copy link
Copy Markdown
Collaborator Author

Problem

The 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).

Value

The 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

  • Follow the public Codex App Server separation of paged turns and explicit item reads, using Pi native Session entry IDs, branch ancestry, and 32k-character item pages. The UI no longer shows a misleading global truncation/start banner.
  • A Web-only Pi extension captures a pre-turn Git baseline and persists bounded temporal change evidence as a native custom entry. The inline card previews three files and opens the saved diff; the existing manual Git Review workbar remains.
  • Reconcile optimistic, live, and native user messages by exact ancestry and a bounded one-for-one display association. Older Sessions are not backfilled. Temporal Git comparison cannot attribute a writer, so no unreliable Undo command is exposed.
  • Fix the file-reference dialog contrast and wait for its entry transition before accessibility inspection. The separate 57162 preview uses an isolated Pi configuration; the resident 57161 was not restarted.

Validation

Commit 94059b5: bun run check passed; bun run test passed (Node 1,948 pass / 5 skip, Vitest 498 pass); production-build Chromium E2E passed 67/67, including desktop/mobile turn review, full-message recovery, history/observer reconciliation, and file-reference accessibility. Two earlier full browser runs encountered independent input/transition timing failures; the final full run passed after the dialog correction. Git diff whitespace check passed. GitHub CI on this commit remains pending.

Impact

No 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 tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复审当前提交 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 作业通过,再复审合并。当前没有充分证据把这批失败归为无关环境波动。

@testikun testikun changed the title fix(web): preserve session workflows, native browsing and inline Files feat(web): refine workspace, model setup and native session workflows Sep 30, 2026
@testikun
testikun requested a review from tt-a1i September 30, 2026 12:00

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复审当前提交 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
tt-a1i previously approved these changes Sep 30, 2026

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复核修复提交 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 tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复核最新 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 无剩余阻断。

@tt-a1i
tt-a1i merged commit 657eff9 into openpi-dev:main Sep 30, 2026
6 checks passed
tt-a1i added a commit that referenced this pull request Oct 1, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:github GitHub workflows, templates, ownership, or tests area:setup OpenPI setup, configuration, or setup documentation documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants