Skip to content

desktop: workspace tabs, sidebar browser and community account - #9

Closed
taisuii wants to merge 45 commits into
mainfrom
codex/workspace-tabs-and-compact-menus
Closed

taisuii wants to merge 45 commits into
mainfrom
codex/workspace-tabs-and-compact-menus

Conversation

@taisuii

@taisuii taisuii commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

变更

  • 每会话工作标签页、紧凑菜单与 dock 标签
  • 侧栏会话浏览器、项目树、回合导航与搜索
  • 社区账号登录(loopback + PKCE)
  • 对话顶栏恢复项目选择器与「执行环境」弹窗;目录不可用时提供「重新选择目录」

验证

  • npm run build:ui 通过
  • npm run check:ui:账号 fixture、项目选择、目录重连、执行环境等步骤已通过;最后停在 WDH 组件未安装(测试 CloakBrowser 按钮不渲染),属本机组件状态
  • 未做 Windows 原生窗口验收

本 PR 体量较大,建议按 draft 审阅。

taisuii and others added 3 commits October 28, 2026 19:09
- workspace tabs, compact menus and dock tab handling
- session sidebar, turn navigation and project tree
- community account login through the loopback browser flow
- UI fixtures for account, conversation and sidebar
…e header

- render ProjectPicker in both empty and session headers
- add a direct 重新选择目录 action to the unavailable-directory banner
- reintroduce the 查看执行环境 dialog with capability and workspace details
@taisuii
taisuii marked this pull request as draft October 30, 2026 12:03
mymac and others added 26 commits October 30, 2026 20:05
The packaged smoke test assumed a draft session and the removed workspace-set RPC. Create a project with a signed folder grant and a session under it, then assert the session workspace points at that directory.
session-snapshot exposes the project root after realpath resolution and does not include the availability field; compare canonical paths instead.
Type only after the interactive shell has printed its prompt, extend the Windows timeouts, and include the output tail when verification times out so CI logs show what the PTY produced.
Wait for the interactive prompt before writing, so typed-ahead input is not lost on a cold Windows runner; include the PTY output tail when the marker never arrives.
The PTY echoed the typed line but never accepted it, so send the command and the Enter keystroke as separate writes and use CRLF on Windows.
Send Enter as its own write, then allow up to 20s for the interactive prompt to execute and render the marker on slow Windows runners.
…Y follow-up

The Windows runner echoes the typed command but never executes it; keep the Linux/macOS coverage and record the Windows gap explicitly until it can be debugged on a real machine.
Kernel info, download, probe and repair used the session-scoped browser manager, so a fresh install with zero projects failed at the plugin page. Give kernel operations their own browser host rooted at the user data dir.
Assert that a brand-new data directory stays at zero sessions and still exposes kernel-info without a session error.
Keep one title and one action in the center, and drop the repeated sidebar hint and the project picker when no project exists.
The download button was a sibling of the gapped flex container, so it stuck to the file name field; group progress and button with margins. Drop the stale system Chrome copy.
check:ui used to time out waiting for the kernel probe when WDH or CloakBrowser was absent. Ask the sidecar for kernel state and fail with an actionable message.
Typing "baidu" became https://baidu/, which has no TLD and fails DNS. Guess .com for a single word, search for phrases, and keep explicit URLs unchanged.
…rors

The controlled input could navigate with the previous render's text if Enter arrived before the last state update. Read the live input value instead, and turn raw Chromium network errors into readable messages.
…age header

The header only needs the session identity and run state. Project switching already lives in the session menu (移动到项目…), project creation/editing in the sidebar, and the execution environment entry duplicated the permission model. Update the UI contract checks to follow that decision instead of preserving the old widgets.
Ask for the reverse-engineering domains, experience level and an optional model key on first launch. Persist the profile in settings, inject it into the agent system prompt, skip without nagging, and allow rerunning the wizard from the model settings.
Script and command tools keep the model-set timeoutMs with documented caps; browser, debugger and MCP calls now get category budgets too. A timeout aborts the underlying work through the call signal and returns an actionable error instead of stalling the run. ask_user stays exempt; the system prompt and tool descriptions explain defaults and caps.
Subagents now receive a bounded prompt made of the current goal, recent user/assistant messages and the workspace root unless with_context=false, so they stop guessing about the parent conversation. Paused or failed goals render an inline banner with the stop reason and a one-click 继续目标 action instead of hiding resume inside the goal popover.
agent_spawn now returns immediately and the parent gets a completion notice (queued mid-run or delivered at the next turn) instead of polling. agent_message continues a settled child with the same read-only history and context, and the UI shows a completion toast. Each round keeps the 10-step/5-minute budget.
agent_message now delivers a mid-run steer when the child is still working: the text becomes a user instruction before the next model decision, instead of forcing the parent to wait for completion. Settled children keep the existing continuation path; queueSteer refuses once the child stopped.
agent_spawn mode=fork seeds the child history with the parent's completed user/assistant turns instead of a short summary. The concurrency cap now comes from settings (1–8, default 3) and is editable in 运行参数; depth stays 1 because research children have no delegation tools.
- goal resume keeps token accounting and goal actions/updates carry a revision CAS
- fork seeds only completed turns (tool calls included, in-flight turn and attachments excluded)
- subagent notifications persist in session state so they survive a restart
- steer is accepted only while the child turn is still open
- integration CI caches and installs CloakBrowser, and check:ui accepts a deterministic data dir
- fixture picks the last real user prompt, so injected subagent notices no longer hijack it
- goal resume assertions target the new inline banner
- Windows terminal uses the OS ConPTY instead of the bundled conpty.dll
- integration keeps its temporary UI data dir outside the checkout so the Git tab still sees a non-repository workspace
- completed reasoning is checked after expanding the process summary
- account logout failure asserts the retained profile instead of overlay-dependent visibility
- Windows terminal sends a second Enter after the line settles
taisuii added 16 commits October 31, 2026 22:33
… event

- every check:ui context skips the first-run onboarding via an init script
- terminal worker tracks win32-input-mode and encodes CR as a VK_RETURN sequence for PSReadLine
- terminal tests send a single Enter again
The browser init-script hook stalled app boot in the headless check; write the completed onboarding preference through the sidecar instead and keep the page untouched.
…tegrity budget

PSReadLine's win32-input-mode turns a raw CR into a line break, so interactive input never submits; the terminal now starts PowerShell without that module. The integrity helper compiles C# and can exceed 45s on a loaded runner, so allow 90s.
…th CRLF

Integration installs the kernel with the job token now that WDH sends Authorization headers. On Windows the terminal translates a submitted CR into CRLF because the console treats a bare CR as an in-line return.
… commit

PSReadLine's win32-input-mode escape sequence can be split across ConPTY chunks, so track a small tail instead of matching one chunk. Actions checkout needs the full commit SHA for the token-aware WDH ref.
ConPTY plus PSReadLine's win32-input-mode turns raw CR into a line break in CI, so Windows terminals now use node-pty's winpty backend, which translates console characters into key input.
Windows CI types immediately after spawn; PowerShell has printed the prompt but is still binding PSReadLine, so the first lines and Enter can be lost. Wait for the prompt plus a short settle in both terminal tests.
The diagnostic opens three PTYs and compares raw CR, CRLF and win32-input-mode Enter submissions, printing platform, PowerShell and Node versions plus the last output tail. A raw-input env switch lets it bypass the worker translation.
- goal continuations record their source and a goal snapshot, and are broadcast live to the UI
- conversation turns derive an expandable trigger row (DSH TurnTriggerNodeView style): target icon, 继续执行目标, time, stop status, objective/summary/next action
- old histories without metadata are recognised by the internal continuation prefix
- check:ui starts an auto-continuing goal and asserts the row and its expanded content
- browser_new_tab keeps the current page and its form state while probing another target
- goal updates distinguish no-goal / paused / no-active-turn instead of the misleading /goal message
- approval denials say what needed approving and how to proceed
- child jobs get unbuffered UTF-8 output, PowerShell output encoding, heartbeat fields (time/bytes) and a tail read
- regression tests cover the new tab tool, blocked goals and job heartbeat
browser_upload selects a workspace file into a page file input after the normal external-action approval; paths outside the workspace are rejected. The system prompt now tells the agent to save screenshots into the workspace first.
Maps the user-reported long-chain failures to concrete state-machine and product causes, adds case studies, additional findings and a four-week priority roadmap, and records the fixes shipped in this branch.
… audit

browser_upload called Page APIs on BrowserManager's lightweight page proxy and threw at runtime; remove it until the component exposes an upload action. Replace the Lead summary with the independently verified audit (872 lines), annotated with the removal and current test counts.
The dependency probe reported available even when initialize/wrap failed in real sessions, which forced standard mode into a hard isolation failure instead of the unisolated approval path. The probe now executes a real sandboxed echo and only reports available if it succeeds.
Controlled lab results: the agent solved a simple FNV-1a signature via shell/node tools, skipped the browser entirely, and a browser-forced run failed on a polluted tool name from the free OpenAI-compatible model. Direct browser checks (launch/snapshot/requests/new tab) passed; take_screenshot was unavailable.
taisuii added a commit that referenced this pull request Nov 1, 2026
check:ui 的终端用例在 CI 上红在 Terminal UI input failed,
PR #9 原始提交就是同一处失败。xterm 按 keydown 逐字符处理,
一次性灌整串在冷启动的 runner 上会丢字符。
taisuii added a commit that referenced this pull request Nov 1, 2026
* WIP: checkpoint workspace tabs and macOS handoff

* desktop: finish workspace tabs, sidebar browser and account

- workspace tabs, compact menus and dock tab handling
- session sidebar, turn navigation and project tree
- community account login through the loopback browser flow
- UI fixtures for account, conversation and sidebar

* desktop: restore project picker and execution environment in the stage header

- render ProjectPicker in both empty and session headers
- add a direct 重新选择目录 action to the unavailable-directory banner
- reintroduce the 查看执行环境 dialog with capability and workspace details

* desktop: update packaged sidecar smoke test for project-scoped sessions

The packaged smoke test assumed a draft session and the removed workspace-set RPC. Create a project with a signed folder grant and a session under it, then assert the session workspace points at that directory.

* desktop: compare the smoke session workspace by real path

session-snapshot exposes the project root after realpath resolution and does not include the availability field; compare canonical paths instead.

* desktop: wait for the PowerShell prompt in terminal tests

Type only after the interactive shell has printed its prompt, extend the Windows timeouts, and include the output tail when verification times out so CI logs show what the PTY produced.

* desktop: type terminal commands only after the PowerShell prompt

Wait for the interactive prompt before writing, so typed-ahead input is not lost on a cold Windows runner; include the PTY output tail when the marker never arrives.

* desktop: submit PowerShell commands with CRLF in terminal tests

The PTY echoed the typed line but never accepted it, so send the command and the Enter keystroke as separate writes and use CRLF on Windows.

* desktop: give PowerShell terminal input a longer settle window

Send Enter as its own write, then allow up to 20s for the interactive prompt to execute and render the marker on slow Windows runners.

* desktop: skip the interactive terminal tests on Windows pending ConPTY follow-up

The Windows runner echoes the typed command but never executes it; keep the Linux/macOS coverage and record the Windows gap explicitly until it can be debugged on a real machine.

* Revert "desktop: skip the interactive terminal tests on Windows pending ConPTY follow-up"

This reverts commit 3b2b3d9.

* desktop: keep kernel management available before any session

Kernel info, download, probe and repair used the session-scoped browser manager, so a fresh install with zero projects failed at the plugin page. Give kernel operations their own browser host rooted at the user data dir.

* desktop: cover kernel management on a first run

Assert that a brand-new data directory stays at zero sessions and still exposes kernel-info without a session error.

* desktop: simplify the empty workspace state

Keep one title and one action in the center, and drop the repeated sidebar hint and the project picker when no project exists.

* desktop: space out the kernel download controls and fix the plugin copy

The download button was a sibling of the gapped flex container, so it stuck to the file name field; group progress and button with margins. Drop the stale system Chrome copy.

* desktop: fail UI checks when the plugin runtime is missing

check:ui used to time out waiting for the kernel probe when WDH or CloakBrowser was absent. Ask the sidecar for kernel state and fail with an actionable message.

* desktop: assert the first-run empty state has a single call to action

* desktop: resolve bare address input into a domain guess or search

Typing "baidu" became https://baidu/, which has no TLD and fails DNS. Guess .com for a single word, search for phrases, and keep explicit URLs unchanged.

* desktop: read the address bar value at enter and translate browser errors

The controlled input could navigate with the previous render's text if Enter arrived before the last state update. Read the live input value instead, and turn raw Chromium network errors into readable messages.

* desktop: remove duplicate project and environment entries from the stage header

The header only needs the session identity and run state. Project switching already lives in the session menu (移动到项目…), project creation/editing in the sidebar, and the execution environment entry duplicated the permission model. Update the UI contract checks to follow that decision instead of preserving the old widgets.

* desktop: add first-run onboarding for domain, level and model key

Ask for the reverse-engineering domains, experience level and an optional model key on first launch. Persist the profile in settings, inject it into the agent system prompt, skip without nagging, and allow rerunning the wizard from the model settings.

* desktop: bound every tool call with an explicit timeout budget

Script and command tools keep the model-set timeoutMs with documented caps; browser, debugger and MCP calls now get category budgets too. A timeout aborts the underlying work through the call signal and returns an actionable error instead of stalling the run. ask_user stays exempt; the system prompt and tool descriptions explain defaults and caps.

* desktop: give research subagents parent context and surface paused goals

Subagents now receive a bounded prompt made of the current goal, recent user/assistant messages and the workspace root unless with_context=false, so they stop guessing about the parent conversation. Paused or failed goals render an inline banner with the stop reason and a one-click 继续目标 action instead of hiding resume inside the goal popover.

* desktop: make research subagents async and continuable

agent_spawn now returns immediately and the parent gets a completion notice (queued mid-run or delivered at the next turn) instead of polling. agent_message continues a settled child with the same read-only history and context, and the UI shows a completion toast. Each round keeps the 10-step/5-minute budget.

* desktop: let the parent steer a running research subagent

agent_message now delivers a mid-run steer when the child is still working: the text becomes a user instruction before the next model decision, instead of forcing the parent to wait for completion. Settled children keep the existing continuation path; queueSteer refuses once the child stopped.

* desktop: add fork mode and configurable subagent capacity

agent_spawn mode=fork seeds the child history with the parent's completed user/assistant turns instead of a short summary. The concurrency cap now comes from settings (1–8, default 3) and is editable in 运行参数; depth stays 1 because research children have no delegation tools.

* desktop: harden goal accounting, fork seeds and subagent delivery

- goal resume keeps token accounting and goal actions/updates carry a revision CAS
- fork seeds only completed turns (tool calls included, in-flight turn and attachments excluded)
- subagent notifications persist in session state so they survive a restart
- steer is accepted only while the child turn is still open

* desktop: run the UI regression with a real kernel and OS ConPTY

- integration CI caches and installs CloakBrowser, and check:ui accepts a deterministic data dir
- fixture picks the last real user prompt, so injected subagent notices no longer hijack it
- goal resume assertions target the new inline banner
- Windows terminal uses the OS ConPTY instead of the bundled conpty.dll

* desktop: fix the UI regression harness and Windows terminal enter

- integration keeps its temporary UI data dir outside the checkout so the Git tab still sees a non-repository workspace
- completed reasoning is checked after expanding the process summary
- account logout failure asserts the retained profile instead of overlay-dependent visibility
- Windows terminal sends a second Enter after the line settles

* desktop: make UI checks deterministic and send Windows Enter as a key event

- every check:ui context skips the first-run onboarding via an init script
- terminal worker tracks win32-input-mode and encodes CR as a VK_RETURN sequence for PSReadLine
- terminal tests send a single Enter again

* desktop: mark onboarding complete through settings for UI checks

The browser init-script hook stalled app boot in the headless check; write the completed onboarding preference through the sidecar instead and keep the page untouched.

* desktop: run the Windows terminal without PSReadLine and widen the integrity budget

PSReadLine's win32-input-mode turns a raw CR into a line break, so interactive input never submits; the terminal now starts PowerShell without that module. The integrity helper compiles C# and can exceed 45s on a loaded runner, so allow 90s.

* desktop: pin the token-aware WDH build and submit Windows commands with CRLF

Integration installs the kernel with the job token now that WDH sends Authorization headers. On Windows the terminal translates a submitted CR into CRLF because the console treats a bare CR as an in-line return.

* desktop: detect Windows input mode across chunks and pin the full WDH commit

PSReadLine's win32-input-mode escape sequence can be split across ConPTY chunks, so track a small tail instead of matching one chunk. Actions checkout needs the full commit SHA for the token-aware WDH ref.

* desktop: use winpty for the Windows terminal input path

ConPTY plus PSReadLine's win32-input-mode turns raw CR into a line break in CI, so Windows terminals now use node-pty's winpty backend, which translates console characters into key input.

* desktop: submit Windows terminal lines with CRLF under winpty

* desktop: wait for the shell prompt to settle before terminal input

Windows CI types immediately after spawn; PowerShell has printed the prompt but is still binding PSReadLine, so the first lines and Enter can be lost. Wait for the prompt plus a short settle in both terminal tests.

* desktop: add a Windows terminal input diagnostic

The diagnostic opens three PTYs and compares raw CR, CRLF and win32-input-mode Enter submissions, printing platform, PowerShell and Node versions plus the last output tail. A raw-input env switch lets it bypass the worker translation.

* desktop: show goal continuation turns in the conversation

- goal continuations record their source and a goal snapshot, and are broadcast live to the UI
- conversation turns derive an expandable trigger row (DSH TurnTriggerNodeView style): target icon, 继续执行目标, time, stop status, objective/summary/next action
- old histories without metadata are recognised by the internal continuation prefix
- check:ui starts an auto-continuing goal and asserts the row and its expanded content

* desktop: add browser tabs, explain denials and make jobs observable

- browser_new_tab keeps the current page and its form state while probing another target
- goal updates distinguish no-goal / paused / no-active-turn instead of the misleading /goal message
- approval denials say what needed approving and how to proceed
- child jobs get unbuffered UTF-8 output, PowerShell output encoding, heartbeat fields (time/bytes) and a tail read
- regression tests cover the new tab tool, blocked goals and job heartbeat

* desktop: add browser file upload and screenshot guidance

browser_upload selects a workspace file into a page file input after the normal external-action approval; paths outside the workspace are rejected. The system prompt now tells the agent to save screenshots into the workspace first.

* desktop: document the long-run agent audit

Maps the user-reported long-chain failures to concrete state-machine and product causes, adds case studies, additional findings and a four-week priority roadmap, and records the fixes shipped in this branch.

* desktop: remove the broken upload tool and land the verified long-run audit

browser_upload called Page APIs on BrowserManager's lightweight page proxy and threw at runtime; remove it until the component exposes an upload action. Replace the Lead summary with the independently verified audit (872 lines), annotated with the removal and current test counts.

* desktop: verify sandbox availability with a real isolated run

The dependency probe reported available even when initialize/wrap failed in real sessions, which forced standard mode into a hard isolation failure instead of the unisolated approval path. The probe now executes a real sandboxed echo and only reports available if it succeeds.

* docs: add the web reverse-engineering capability test report

Controlled lab results: the agent solved a simple FNV-1a signature via shell/node tools, skipped the browser entirely, and a browser-forced run failed on a polluted tool name from the free OpenAI-compatible model. Direct browser checks (launch/snapshot/requests/new tab) passed; take_screenshot was unavailable.

---------

Co-authored-by: mymac <you@example.com>
Co-authored-by: taisuii <tais00@qq.com>
@taisuii

taisuii commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

已被 #18 取代并收敛为单一 PR:内容全部包含在 feat/paste-and-seat 中,且修掉了合并时被静默回退的 CI 加固与思考块跨刷新展开的冲突。

@taisuii taisuii closed this Nov 2, 2026
@taisuii
taisuii deleted the codex/workspace-tabs-and-compact-menus branch November 21, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant