Skip to content

fix(webui): Make cross-session switching transactional - #8882

Merged
doudouOUC merged 5 commits into
QwenLM:mainfrom
doudouOUC:fix/transactional-cross-session-switching
Aug 11, 2026
Merged

fix(webui): Make cross-session switching transactional#8882
doudouOUC merged 5 commits into
QwenLM:mainfrom
doudouOUC:fix/transactional-cross-session-switching

Conversation

@doudouOUC

Copy link
Copy Markdown
Collaborator

What this PR does

This PR makes modern WebUI load/resume switches to a different logical session transactional. The current session remains the visible owner while the target restores and is replayed into an isolated, bounded staging store; only a fully staged target that still wins the lifecycle/deadline arbitration is committed. Failed, timed-out, superseded, malformed, or stale targets are discarded and detached best-effort without clearing the current transcript, stopping its event stream, or replacing its connection state.

The restore coordinator permits one ordinary restore RPC at a time, coalesces identical targets, retains only the latest queued target, and fences late results by exact attachment and environment identity. Commit installs the target transcript, session/client/workspace references, connection state, staged notices and side channels in one synchronous ownership handoff before the public load promise resolves, then starts the prepared target runner without issuing a second restore.

The main WebShell provider now stays mounted across modern controlled session/workspace changes. Navigation paths share transactional ownership fences and write gates, preserve source metadata while a target is pending or fails, hide stale metadata on the first committed target frame, and delay the scheduled-run catch-up timeout until restore has committed. Daemons that explicitly lack client_identity keep the existing keyed, detach-first compatibility behavior; unknown capabilities and malformed modern ownership fail closed.

Why it's needed

Before this change, selecting another session immediately detached the current session, aborted its event stream, cleared its transcript, and published the target as loading before the target restore had succeeded. A large-session timeout or other restore failure therefore left the user on an empty/error target and stopped the conversation that had been usable. PR #8691 made restore deadlines safe and observable, and PR #8833 fenced late attachment work; this PR adds the missing client-side transaction boundary for ordinary and controlled cross-session load/resume.

Reviewer Test Plan

How to verify

Start with session A connected and containing a visible transcript, then delay the completed response for loading session B. Confirm that A stays connected, retains its transcript, continues receiving live events, and still accepts existing control operations while B is pending. Release B and confirm that the first committed state consistently contains B's session, client, workspace, and replay, with A detached only after commit.

Repeat with B returning a structured HTTP 504 and with B being superseded by later targets. Confirm that A remains usable after failure, only one ordinary restore is in flight, an intermediate queued target is never sent, and a late result cannot replace the latest owner. For a controlled workspace target, confirm that unresolved/failed workspace resolution keeps A mounted and rolls the host back once without a retry loop.

The focused regression suites cover WebUI restore arbitration, pure staging, attachment cleanup, controlled transitions, WebShell owner fences, navigation, queued prompts, background tasks, and artifacts. The real-daemon integration test exercises delayed-success and structured-504 scenarios through qwen serve.

Evidence (Before & After)

Before: deterministic baseline runs on pre-change main showed action-driven and controlled switches detach A, abort A's stream, clear its transcript, and expose B/loading before B settled; a rejected B left an empty B/error state. A same-workspace controlled target also remounted the session provider.

After: the real-daemon integration test completed B's restore but withheld the response for about five seconds. During that gate A remained connected, accepted a control request, and received a new live event; releasing the response atomically installed B. A structured B restore 504 preserved A and surfaced session_restore_timeout with HTTP status 504. Focused verification passed 279 WebUI action/provider tests and 418 affected WebShell tests; repository build, typecheck, bundle, and focused ESLint also passed.

Tested on

OS Status
🍏 macOS
🪟 Windows ⚠️
🐧 Linux ⚠️

Environment (optional)

macOS Darwin 25.4.0 arm64, Node.js v22.22.3, npm 10.9.8. Real-daemon integration used QWEN_SANDBOX=false with the built qwen serve bundle and a mock ACP child.

Risk & Scope

  • Main risk or tradeoff: This is a cross-package WebUI/WebShell ownership change at the repository's 1,000+ production-line advisory threshold (9 production files, raw net +1,500), so restore arbitration, React lifecycle handoff, and host navigation deserve maintainer review. Staging temporarily holds A's store and B's replay, and best-effort detach failure can retain an invisible client reference until the existing reaper runs.
  • Not validated / out of scope: Same-logical-session reload, clientId-only handoff, epoch/ring resync and live-journal repair transactions are reserved for PR3c; branch creation/adoption and its timeout contract are reserved for PR3d. JSONL streaming/selective restore, checkpointing, a global attachment scheduler, SDK self-heal, and an 80 MiB CI timing threshold are also out of scope. Windows and Linux were not tested locally.
  • Breaking changes / migration notes: No daemon, REST, ACP, or WebSocket protocol changes and no migration are required. The connection state and provider expose additive optional transition/owner hooks. Daemons known not to support client_identity retain the prior destructive switching behavior.

Linked Issues

Refs #8678

中文说明

本 PR 做了什么

本 PR 将现代 WebUI 中切换到不同逻辑会话的 load/resume 改为事务化。目标会话恢复并在隔离、有界的 staging store 中重放期间,当前会话仍然是可见 owner;只有完成全部 staging 且仍通过生命周期/截止时间仲裁的目标才会提交。失败、超时、被替换、格式错误或过期的目标会被丢弃并尽力 detach,不会清空当前 transcript、停止其事件流或替换其连接状态。

restore coordinator 同时只允许一个普通 restore RPC,合并相同目标,只保留最新排队目标,并使用精确 attachment 与环境 identity 隔离迟到结果。commit 在公开 load promise resolve 前,通过一次同步 ownership handoff 安装目标 transcript、session/client/workspace 引用、connection state、已 staging 的 notices 和 side channels,然后直接启动准备好的目标 runner,不会再次发起 restore。

现代受控 session/workspace 变化期间,主 WebShell provider 现在保持挂载。各导航入口共享事务化 ownership fence 和写入 gate,目标 pending 或失败时保留源会话 metadata,目标提交的第一帧隐藏过期 metadata,并将 scheduled-run 的 catch-up timeout 延后到 restore commit 之后。明确缺少 client_identity 的 daemon 继续使用现有 keyed、detach-first 兼容行为;capability 未知和现代 ownership 格式错误则 fail-closed。

为什么需要

变更前,选择另一个会话会在目标 restore 成功之前立即 detach 当前会话、终止其事件流、清空 transcript,并把目标发布为 loading。因此大型会话超时或其他 restore 失败会让用户停留在空白/错误目标,同时停止原本可用的会话。PR #8691 已使 restore deadline 安全且可观测,PR #8833 已隔离迟到 attachment 工作;本 PR 补上普通及受控跨会话 load/resume 所缺少的客户端事务边界。

Reviewer 测试计划

如何验证

先连接 session A 并确保存在可见 transcript,然后延迟 session B 已完成 load 的响应。确认 B pending 期间 A 仍保持 connected、保留 transcript、继续接收实时事件,并且现有控制操作仍能使用。释放 B 后,确认第一个 committed 状态中的 session、client、workspace 和 replay 全部一致属于 B,并且 A 只在 commit 后才 detach。

再让 B 返回结构化 HTTP 504,并让 B 被后续目标替换。确认失败后 A 仍可用、同时只有一个普通 restore 在运行、中间排队目标不会发送、迟到结果不能替换最新 owner。对于受控 workspace 目标,确认 workspace 解析未完成或失败时 A 保持挂载,host 只回滚一次且不会形成重试循环。

focused regression suites 覆盖 WebUI restore 仲裁、pure staging、attachment 清理、受控切换,以及 WebShell owner fence、导航、queued prompts、background tasks 和 artifacts。真实 daemon integration test 通过 qwen serve 覆盖 delayed-success 与结构化 504 场景。

证据(变更前后)

变更前:在变更前 main 上的确定性 baseline 运行表明,action-driven 和 controlled 切换会在 B settle 前 detach A、终止 A 的 stream、清空 transcript 并显示 B/loading;B reject 后停留在空白 B/error 状态。同 workspace 的受控目标还会 remount session provider。

变更后:真实 daemon integration test 完成了 B restore,但将 response 暂停约五秒。在 gate 期间 A 保持 connected、接受 control request 并收到新的 live event;释放 response 后原子安装 B。B 的结构化 restore 504 保留 A,并显示 session_restore_timeout 与 HTTP 504。focused verification 通过 279 个 WebUI action/provider 测试和 418 个受影响 WebShell 测试;仓库 build、typecheck、bundle 与 focused ESLint 也全部通过。

测试平台

OS 状态
🍏 macOS
🪟 Windows ⚠️
🐧 Linux ⚠️

环境(可选)

macOS Darwin 25.4.0 arm64,Node.js v22.22.3,npm 10.9.8。真实 daemon integration 使用 QWEN_SANDBOX=false、已构建的 qwen serve bundle 和 mock ACP child。

风险与范围

  • 主要风险或取舍:这是跨 WebUI/WebShell package 的 ownership 变更,达到仓库 1,000+ 生产行 advisory 阈值(9 个生产文件,原始净增 +1,500),因此 restore 仲裁、React lifecycle handoff 与 host navigation 需要 maintainer review。staging 会短暂同时持有 A store 与 B replay;best-effort detach 失败可能使不可见 client reference 保留到现有 reaper 执行。
  • 未验证/范围外:same-logical-session reload、clientId-only handoff、epoch/ring resync 与 live-journal repair transaction 留给 PR3c;branch creation/adoption 及其 timeout contract 留给 PR3d。JSONL streaming/selective restore、checkpoint、全局 attachment scheduler、SDK self-heal 和 80 MiB CI 时延阈值也不在本 PR 范围内。Windows 与 Linux 未在本地测试。
  • Breaking change / 迁移说明:不修改 daemon、REST、ACP 或 WebSocket 协议,不需要迁移。connection state 与 provider 仅增加可选 transition/owner hooks。明确不支持 client_identity 的 daemon 保留原有 destructive switching 行为。

关联 Issue

Refs #8678

@doudouOUC

Copy link
Copy Markdown
Collaborator Author

E2E verification report

Validated the final PR head 175640d351e166ea801b174442e90aa49e64389f against origin/main@95e17691a97e090f28f3542a013db6319c2a8895.

Baseline

On pre-change main, both action-driven and controlled A→B switches detached A, aborted its SSE, cleared its transcript, and exposed B/loading before B settled. Rejecting B left an empty B/error state, and a same-workspace controlled target remounted the session provider.

Real-daemon scenarios

QWEN_SANDBOX=false npx vitest run --root ./integration-tests --poolOptions.forks.minForks 2 --poolOptions.forks.maxForks 2 cli/qwen-serve-webui-session-switching.test.ts --reporter=verbose

  • Delayed completed response: the daemon completed B restore while the SDK response was gated. A stayed connected, accepted a control request, and received a new live event. Releasing the response atomically installed B's owner and transcript. Passed in 6.4 s.
  • Structured restore timeout: B returned HTTP 504 with code=session_restore_timeout and retryable=true. The public switch rejected with the structured status while A remained connected and retained its transcript. Passed in 6.2 s.

Result: 2/2 passed.

Additional verification

  • WebUI provider/actions: 224/224 + 55/55 passed.
  • Affected WebShell suites: 418/418 passed.
  • WebUI and WebShell typecheck, focused ESLint, repository build, repository typecheck, and bundle: passed.
  • Production diff budget: 9 files, +1848/-348, raw net +1500.

The test environment emitted existing React act(...) warnings; assertions and daemon process outcomes passed. The approximately 80 MiB manual memory/trace run remains intentionally outside CI and was not repeated because this PR does not optimize JSONL or replay cost.

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

🖼️ web-shell visual preview

Rendered against a mock daemon (no real backend): the PR base vs this PR head 5651663. Only screenshots that changed are shown (flows below, if any, are head-only) — refreshes on every push.

Screenshots · before / after

git-mode-branch-dark before/after

git-mode-branch-light before/after

git-mode-chip-dark before/after

git-mode-chip-light before/after

git-mode-popover-dark before/after

git-mode-popover-light before/after

Full-resolution recordings (.webm) are attached to the workflow run.

Qwen Code · web-shell visuals

@doudouOUC
doudouOUC marked this pull request as ready for review August 10, 2026 14:16
@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Qwen Triage finishedview run. See the stage comments in this thread for the result.

Qwen Triage 已完成 —— 查看运行。结果见本线程中的各阶段评论。

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Re-run after two more review rounds were addressed and the branch was rebased twice. Gate still passes:

  • Template: complete ✓
  • Problem: observed, not theoretical — fix(serve): Preserve the current session when a large restore times out #8678 documents the destructive switch (A detached, stream aborted, transcript cleared before B settles) with a before/after baseline on pre-change main. Unchanged since the last pass.
  • Direction: aligned. Session restore/switch reliability remains a live product area, and this is still the client-side transaction boundary the issue series was missing.
  • Size: cross-package (webui + web-shell), so core-protection sizing applies. Of ~6.8k changed lines: ~2.4k production (10 files), ~4.4k test, ~83 docs. A fix type isn't hard-blocked, but this stays well past the 1,000-line advisory threshold — maintainer awareness flag stands (and has now been delivered, see Stage 3).
  • Approach: slice scope unchanged. The two commits added since the first pass map one-to-one onto the Critical findings of the R1/R2 review rounds (operation tokens for busy-state clears, logical-session identity for settlement guards, queued-prompt payload recovery), and the latest rebase absorbs [webshell]retry session switch while closing #8864, fix(webui): allow retry after session load timeout #8883, and fix(web-shell): improve subagent panel responsiveness #8915 with only integration hunks — I diffed the old head against the rebased one file-by-file; the transactional logic itself is untouched. No drive-by changes.
  • Risk: no high-risk-path matches from the revert-history signal. The earlier conflict with main is resolved — branch is MERGEABLE. One junction deserves the reviewer's eye: fix(webui): allow retry after session load timeout #8883 (retry after session load timeout) landed in the same load-failure area this PR fences — noted in Stage 2.

Moving on to code review. 🔍

中文说明

在作者处理了另外两轮评审意见并两次 rebase 之后重新运行。门禁仍然通过:

  • 模板:完整 ✓
  • 问题:已观测到的真实问题——fix(serve): Preserve the current session when a large restore times out #8678 记录了破坏性切换(B 落定前 A 就被 detach、事件流中断、transcript 被清空),并提供了改动前 main 上的 before/after 基线。与上轮一致。
  • 方向:对齐。会话恢复/切换可靠性仍是活跃领域,本 PR 依然是该 issue 系列缺失的客户端事务边界。
  • 规模:跨包改动(webui + web-shell),适用核心模块保护核算。约 6.8k 行改动中:约 2.4k 行生产代码(10 个文件),约 4.4k 行测试,约 83 行文档。fix 类型不做硬性拦截,但仍远超 1,000 行建议线——维护者关注标记继续有效(且现已落实,见 Stage 3)。
  • 方案:切片范围不变。首轮之后新增的两个提交与 R1/R2 评审轮次的 Critical 发现一一对应(忙碌状态清除改用操作 token、结算守卫改用逻辑会话身份、排队 prompt 载荷恢复),最新 rebase 吸收了 [webshell]retry session switch while closing #8864fix(webui): allow retry after session load timeout #8883fix(web-shell): improve subagent panel responsiveness #8915 且只有集成块——我逐文件对比了旧 head 与 rebase 后的 head,事务化逻辑本身未被改动。无夹带改动。
  • 风险:回滚历史信号未命中高风险路径。此前与 main 的冲突已解决——分支 MERGEABLE。一个交汇点值得评审者注意:fix(webui): allow retry after session load timeout #8883(会话加载超时后重试)合入了本 PR 所围栏的同一块加载失败区域——见 Stage 2。

进入代码审查。🔍

Qwen Code · qwen3.8-max

Reviewed at 824dfa5eda8ab9f4cf3e10d645f627cfaa723192 · re-run with @qwen-code /triage

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Code review

Both blockers from my last pass are resolved, and the two review rounds since then landed cleanly.

1. The web-shell suite is green again. The two missed SDK mocks were extended minimally — index.test.tsx gains useConnection (plus a features field on the mock capabilities) and ChatPane.test.tsx gains useDaemonSessionOwnerGuard. On the pre-rebase head the full Linux suite ran green: web-shell 178 files / 3103 tests passed (was 89 failed | 3001 passed), webui 34 files / 510 passed, and every other package green.

2. The R1/R2 Critical fixes are real fixes, not patches over symptoms. I reviewed the ~230 production lines added by the two fix commits: the passive-assistant timer is cleared inside commitCrossSession before target prompt state publishes; settlement guards (assistant.done, setPromptStatus('idle'), recap/BTW resolution) switched from object identity to logical-session identity (sessionId + normalized workspace), so a same-logical reattach settles instead of orphaning; plan-preparation and model-action busy states use monotonic operation tokens invalidated on logical-session change, fixing the stuck-spinner A→B→A case; handleRetry no longer consumes its latch when write-blocked; queued-prompt edit removal now reports the true removal result across an owner change and restores the payload exactly once, with interrupted (submitting / failed-edit) prompts recovered into the editor before the owner-reset wipes the queue; a stale branchSession result detaches without handoff, and requireStableSession() now also blocks while a source-bound operation is in flight. Each item corresponds to a named Critical in the R1/R2 ledgers, and each comes with regression tests (the test delta is ~4x the production delta).

3. The rebases were faithful. The branch was rebased over #8864 (first pass) and then again over #8883/#8915 this morning. I diffed the pre-rebase head against the current one for every changed file: 15 of 21 files are byte-identical, and the other 6 differ only by the merged PRs' own hunks — #8883's manual-clear/retry path (manualSessionClearRef, full connection reset, single-batch replay dispatch, watchdog test) and #8915's subagent-panel animation deferral. No transactional logic was touched during conflict resolution. One junction to keep an eye on: #8883 (retry after session load timeout) and this PR both reason about load failure — #8883 covers same-session retry via manual clear, this PR fences cross-session transitions. The two mechanisms coexist cleanly in the diff, but the integration suite that would exercise them together is a merge-queue leg, so the queue run is where that interaction gets its first CI signal.

No new Critical findings from me on this head. The 19 deferred R1/R2 Suggestions are recorded per-thread under the mature-PR rule — they should land as follow-up issue(s) so they aren't lost.

sequenceDiagram
    participant P1 as User
    participant P2 as WebShell wrapper
    participant P3 as Session coordinator
    participant P4 as Daemon restore RPC
    participant P5 as Staging store
    participant P6 as Source session A
    P1->>P3: switch to session B
    P3->>P3: coalesce identical targets, keep latest only
    P3->>P6: keep A mounted - stream, transcript, prompts
    P3->>P4: restore B with stable client id
    P4->>P5: replay B into shadow transcript
    P5->>P3: staged target ready
    P3->>P3: guards - lifecycle, deadline, identity
    alt commit
        P3->>P6: flush and stop A
        P3->>P2: install B synchronously, notify commit
    else failure, timeout, supersede
        P3->>P4: detach staged B best-effort
        P3->>P2: keep A, surface structured failure
    end
Loading
Files changed (21 of 21 shown)
File What changed
packages/webui/src/daemon/session/DaemonSessionProvider.tsx Core of the PR: cross-session coordinator (intent queue, single restore slot), pure staging into a shadow store, synchronous commit, owner-guard context; now also clears the passive-assistant timer on commit and exposes the source-bound in-flight counter
packages/webui/src/daemon/session/actions.ts Routes cross-logical switches through the coordinator; write gates on mutating actions; logical-session settlement guards; rejects same-logical legacy loads while a target is pending; stale branch results detach without handoff
packages/webui/src/daemon/session/types.ts DaemonSessionTransition, owner guard/snapshot types, onSessionTransitionCommit prop
packages/web-shell/client/components/WorkspaceSessionProvider.tsx One provider stays mounted for modern daemons; desired vs committed target; latched stable failures; reports committed ownership to the host
packages/web-shell/client/App.tsx Write-blocked state while a target is pending; owner-guarded continuations; operation tokens for plan/model busy states; logical session key
packages/web-shell/client/hooks/useQueuedPrompts.ts Owner-fenced flushes; payload restored exactly once across owner change; interrupted prompts recovered before owner reset
packages/web-shell/client/hooks/useSessionArtifacts.ts Owner-guarded artifact reporting across switches
packages/web-shell/client/hooks/useBackgroundTasks.ts Owner-guarded background-task refresh
packages/webui/src/daemon-react-sdk.ts Exports the owner-guard hook and transition types
packages/webui/README.md Documents the new hook and transition semantics
docs/design/2026-08-10-transactional-webui-session-switching.md Design doc for the slice
integration-tests/cli/qwen-serve-webui-session-switching.test.ts Real-daemon delayed-success and structured-504 scenarios
packages/webui/src/daemon/session/DaemonSessionProvider.test.tsx Arbitration, staging, commit, fencing, write gates, plus the R1/R2 regression cases
packages/webui/src/daemon/session/actions.test.ts Routing, gates, source-bound in-flight marking, logical-settlement cases
packages/web-shell/client/App.test.tsx App coverage incl. owner guards, operation tokens, same-ID and A-B-A regressions
packages/web-shell/client/components/WorkspaceSessionProvider.test.tsx Desired-vs-committed wrapper behavior
packages/web-shell/client/hooks/useBackgroundTasks.test.tsx Owner-guard cases
packages/web-shell/client/hooks/useQueuedPrompts.dom.test.tsx Owner-fence and payload-recovery cases
packages/web-shell/client/hooks/useSessionArtifacts.test.tsx Owner-guard cases
packages/web-shell/client/index.test.tsx SDK mock extended with useConnection — fixes the top-level boundary suite
packages/web-shell/client/components/ChatPane.test.tsx SDK mock extended with useDaemonSessionOwnerGuard

Test evidence (from the PR's own CI via API — no PR code executed here)

One correction to my previous comment: the macOS/Windows unit legs and the integration suite are merge_group-only jobs by design (ci.yml) — they never run on pull_request events, so their "skipped" status is expected here, not a gap caused by this PR. The merge queue will exercise them (including the new real-daemon integration test and the #8883 junction).

The head moved once while this review was running (a final rebase over #8883/#8915 at 07:08 UTC, content verified above). On the pre-rebase head e3e0825d, CI was fully green — Qwen Code CI success with the Linux unit suite at 3103/3103 web-shell and 510/510 webui. The rebased head below is mid-flight; the finalize job will update this table when it settles.

Final CI results for 824dfa5 (auto-updated by the triage finalize job after CI completed):

Check Conclusion
Capture web-shell visuals (ubuntu-latest, Node 22.x) ✅ success
Classify PR ✅ success
Desktop Shell (ubuntu-22.04) ✅ success
Desktop Shell (windows-2022) ✅ success
Test (ubuntu-latest, Node 22.x) ✅ success
web-shell E2E Smoke (ubuntu-latest, Node 22.x) ✅ success

One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。

Not verified: live behavior — unit CI can show the tests pass, not that the transactional path is load-bearing. Sandboxed verification is already in motion for exactly that claim: a @qwen-code /verify job is running as part of this triage run and will post its A/B report in this thread (/tmux is unavailable — the author lacks write access; /verify runs as a sponsored, risk-screened execution). Until that report lands, "A stays connected through a delayed/504 restore and commits atomically" rests on the PR's own integration test and the author's local runs.

中文说明

代码审查:上轮的两个阻塞项均已解决,此后两轮评审的修复也干净落地。

  1. web-shell 测试恢复绿色:两个遗漏的 SDK mock 以最小方式补齐(index.test.tsx 增加 useConnectionChatPane.test.tsx 增加 useDaemonSessionOwnerGuard)。rebase 前的 head 上完整 Linux 套件全绿:web-shell 178 个文件 / 3103 个测试通过(此前为 89 失败 / 3001 通过),webui 34 个文件 / 510 通过,其余包全绿。
  2. R1/R2 的 Critical 修复是真修复:commit 时清理 passive-assistant 定时器;结算守卫从对象身份改为逻辑会话身份(sessionId + 归一化 workspace),同逻辑会话 reattach 不再悬空;plan/model 忙碌状态改用单调操作 token,修复 A→B→A 卡死;write-blocked 时重试不再消耗 latch;排队 prompt 编辑在 owner 变化后如实返回删除结果且载荷恰好恢复一次,被中断的 prompt 在 owner 重置清空队列前先恢复到编辑器;过期的 branchSession 结果只 detach 不交接,requireStableSession() 同时拦截 source-bound 操作进行中的情形。每一项都对应 R1/R2 清单中的具名 Critical,且都附带回归测试(测试增量约为生产代码的 4 倍)。
  3. rebase 是忠实的:分支先后 rebase 过 [webshell]retry session switch while closing #8864 和今早的 fix(webui): allow retry after session load timeout #8883/fix(web-shell): improve subagent panel responsiveness #8915。逐文件对比确认:21 个文件中 15 个字节级一致,其余 6 个的差异仅为合入 PR 自身的块——事务化逻辑在冲突解决中未被触碰。值得留意的交汇点:fix(webui): allow retry after session load timeout #8883(加载超时后重试)与本 PR 都在推理加载失败——前者覆盖同会话手动清空重试,本 PR 围栏跨会话切换;二者在 diff 中干净共存,但能同时覆盖两者的集成测试是 merge queue 环节,队列运行时才会首次进入 CI。

本 head 上我没有新的 Critical 发现。延后的 19 条 R1/R2 Suggestions 已按成熟 PR 规则逐线程记录——建议落成 follow-up issue 以免丢失。

测试证据(来自 PR 自身 CI 的 API 数据——此处未执行任何 PR 代码):更正上轮说法——macOS/Windows 单测与集成测试是 merge_group 专属作业,pull_request 事件本来就不运行,其 skipped 属预期而非本 PR 造成的缺口。评审进行中 head 变动过一次(07:08 UTC 最后一次 rebase,内容已如上核实)。rebase 前的 head e3e0825d CI 全绿(web-shell 3103/3103、webui 510/510);当前 rebased head 的 CI 正在运行,finalize 作业会在结束后更新上方表格。

未验证:运行时行为——单测 CI 只能证明测试通过,无法证明事务化路径真正 load-bearing。沙箱验证已在进行中:本次 triage 运行附带的 @qwen-code /verify 作业正在执行,A/B 报告会发布在本线程(/tmux 不可用——作者无写权限;/verify 以受赞助的风险筛查方式执行)。在报告落地前,"延迟/504 restore 下 A 保持连接并原子提交"依据的是 PR 自带的集成测试与作者的本地运行。

Qwen Code · qwen3.8-max

Reviewed at 824dfa5eda8ab9f4cf3e10d645f627cfaa723192 · re-run with @qwen-code /triage

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Confidence: 3/5 — the review itself is clean (both my blockers resolved, every Critical from two review rounds fixed, rebases verified faithful, maintainer already approved), but this PR is capped at defer by policy: it's a cross-package change well over the 1,000-production-line advisory threshold, and the bot does not cast the deciding approval on those — plus the rebased head's CI is still in flight.

Stepping back: the approach still matches what I'd propose independently — keep the source mounted, restore into staging, one synchronous commit, discard on failure — and the machinery added since my first pass is the part the concurrency hazards genuinely demand, not accretion. The two fix commits are a good sign about how this code will age: each Critical from the adversarial rounds got a structural fix (operation tokens, logical-session identity, honest result propagation) with a paired regression test, not a suppression. The deferred Suggestions were deferred by the book — recorded per thread under the mature-PR rule — though they should land as a follow-up issue so nothing quietly evaporates.

What settled this run:

  1. Both original blockers are gone. The web-shell suite is green (the two un-mocked SDK boundaries were fixed minimally), and the branch is MERGEABLE — rebased cleanly over [webshell]retry session switch while closing #8864, then again over fix(webui): allow retry after session load timeout #8883/fix(web-shell): improve subagent panel responsiveness #8915 this morning. I diffed the pre-rebase and post-rebase heads file-by-file: the rebase moved integration hunks only.
  2. The human review bar has been met. @yiliang114 ran an adversarial pass and approved the pre-rebase content (e3e0825d); the rebase since then only absorbs main. Two automated deep-review rounds before that had all Criticals addressed.
  3. One open thread: the sandboxed @qwen-code /verify job attached to this triage run is still executing — its A/B report on whether the transactional path is actually load-bearing will post here. Unit CI can't answer that question; the merge queue's integration leg (which now also covers the fix(webui): allow retry after session load timeout #8883 junction) is the other half of the answer.

Housekeeping: the three stale CHANGES_REQUESTED reviews from this bot (against superseded heads 175640d3, a6cdc44e, 815f838a) are being dismissed — every stated reason in them has been addressed on the current head, and leaving them standing would misrepresent the gate and out-vote the maintainer's approval. Dismissal is not approval: I'm deferring, not approving, per the cross-package size cap. The remaining merge requirements are routine maintainer business — a second approval alongside @yiliang114's and green merge-queue legs.

中文说明

置信度:3/5 —— 评审本身是干净的(我提出的两个阻塞项均已解决,两轮评审的全部 Critical 已修复,rebase 已逐文件核实为忠实集成,维护者也已批准),但本 PR 按政策封顶为 defer:这是远超 1,000 行生产代码建议线的跨包改动,机器人不为其投出决定性的一票——此外 rebased head 的 CI 仍在运行中。

退一步看:方案依然与我独立设想的一致——保持源会话挂载、staging 恢复、一次同步 commit、失败即丢弃——首轮之后新增的机制是并发风险真正需要的部分,而非堆砌。两个修复提交说明了这份代码未来的维护质量:对抗性评审中的每个 Critical 都得到了结构性修复(操作 token、逻辑会话身份、如实的结果传递)并配有回归测试,而不是把问题压下去。延后的 Suggestions 也按规矩延后——按成熟 PR 规则逐线程记录——但应落成 follow-up issue,避免无声丢失。

本轮的结论依据:

  1. 最初的两个阻塞项均已消除:web-shell 套件全绿(两个未补 mock 的边界以最小方式修复),分支 MERGEABLE——先干净地 rebase 了 [webshell]retry session switch while closing #8864,今早又 rebase 了 fix(webui): allow retry after session load timeout #8883/fix(web-shell): improve subagent panel responsiveness #8915。逐文件对比了 rebase 前后的 head:仅移动了集成块。
  2. 人工评审门槛已达到@yiliang114 已完成对抗性审查并批准了 rebase 前的内容(e3e0825d),此后的 rebase 仅吸收 main。此前两轮自动深度评审的全部 Critical 也已处理。
  3. 一个未落地的线索:本次 triage 运行附带的沙箱 @qwen-code /verify 作业仍在执行——其 A/B 报告(事务化路径是否真正 load-bearing)将发布在本线程。单测 CI 回答不了这个问题;merge queue 的集成环节(现在同时覆盖 fix(webui): allow retry after session load timeout #8883 交汇点)是另一半答案。

事务性说明:本机器人名下三个过期的 CHANGES_REQUESTED 评审(分别针对已被取代的 head 175640d3a6cdc44e815f838a)正在被 dismiss——其中列出的每一条理由都已在当前 head 上解决,继续保留会错误表达门禁状态并压过维护者的批准。dismiss 不等于批准:按跨包规模封顶,我**推迟(defer)**而非批准。剩余的合入条件是维护者的常规流程——在 @yiliang114 之外补齐第二个批准,以及 merge queue 全绿。

Qwen Code · qwen3.8-max

Reviewed at 824dfa5eda8ab9f4cf3e10d645f627cfaa723192 · re-run with @qwen-code /triage

@qwen-code-ci-bot qwen-code-ci-bot 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.

Requesting changes on the execution, not the design — see the Stage 2 notes above. Two blockers: the web-shell unit suite is red on this head (89 failures — client/index.test.tsx and client/components/ChatPane.test.tsx mock the webui SDK module without the new useConnection / useDaemonSessionOwnerGuard exports this PR now uses), and the branch conflicts with main after #8864. The transactional design itself is sound; once the mocks are extended and the rebase is green, re-run /triage.

执行层面需要修改,设计本身没有问题——详见上方 Stage 2 评论。两个阻塞项:该 head 上 web-shell 单测是红的(89 个失败——client/index.test.tsxclient/components/ChatPane.test.tsx 对 webui SDK 模块的 mock 缺少本 PR 新使用的 useConnection / useDaemonSessionOwnerGuard 导出),且分支在 #8864 合入后与 main 冲突。事务化设计本身是健全的;补齐 mock、rebase 变绿后重新运行 /triage 即可。

Qwen Code · qwen3.8-max

@doudouOUC
doudouOUC force-pushed the fix/transactional-cross-session-switching branch from 175640d to a6cdc44 Compare August 10, 2026 15:33
@github-actions

Copy link
Copy Markdown
Contributor

Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration.

中文

请勿对活跃的 PR 执行 rebase 或 force-push,因为这会使已有的评审评论失效。另外,供日后参考:作为集成流程的一部分,机器人始终会自动将所有改动压缩(squash)为单个提交。

@qwen-code-ci-bot qwen-code-ci-bot 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.

Not explored to full depth (tool budget reached): You are review agent reverse-audit — Reverse audit agen...: none — all checks above completed within budget.; You are review agent reverse-audit — Reverse audit agen...: none — all checks above completed within budget.; You are review agent reverse-audit — Reverse audit agen...: none — all checks above were completed within budget (~19 tool calls).; This PR makes modern WebUI/WebShell cross-session switchi...: daemon transcript-page record ordering ( page.events newest→oldest vs oldest→newest) not verified — affects only the severity estimate of the third finding.; You are review agent reverse-audit — Reverse audit agen...: none — I finished within budget., and 5 more.

中文说明

未探索到全部深度(达到工具调用预算):You are review agent reverse-audit — Reverse audit agen...:none — all checks above completed within budget.;You are review agent reverse-audit — Reverse audit agen...:none — all checks above completed within budget.;You are review agent reverse-audit — Reverse audit agen...:none — all checks above were completed within budget (~19 tool calls).;This PR makes modern WebUI/WebShell cross-session switchi...:daemon transcript-page record ordering ( page.events newest→oldest vs oldest→newest) not verified — affects only the severity estimate of the third finding.;You are review agent reverse-audit — Reverse audit agen...:none — I finished within budget.,另有 5 条。

— qwen3.8-max via Qwen Code /review (v0.21.9)

Comment thread packages/webui/src/daemon/session/DaemonSessionProvider.tsx
Comment thread packages/web-shell/client/App.tsx Outdated
Comment thread packages/web-shell/client/App.tsx
Comment thread packages/webui/src/daemon/session/actions.ts
Comment thread packages/web-shell/client/hooks/useQueuedPrompts.ts
Comment thread packages/webui/src/daemon/session/DaemonSessionProvider.test.tsx
Comment thread packages/webui/src/daemon/session/DaemonSessionProvider.test.tsx
Comment thread packages/web-shell/client/components/WorkspaceSessionProvider.tsx
Comment thread packages/webui/src/daemon/session/DaemonSessionProvider.test.tsx
Comment thread packages/webui/src/daemon/session/actions.ts
doudouOUC added a commit to doudouOUC/qwen-code that referenced this pull request Aug 11, 2026
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Review follow-up

Review item Outcome
R1-3 passive assistant timer Fixed in 815f838a7c; commit clears the source timer before target prompt state is published.
R1-16 retry settlement across reattach Fixed in 815f838a7c; logical session/workspace ownership now settles retry state.
R1-17 recap/BTW placeholder Fixed in 815f838a7c; settlement survives same-session reattachment without crossing workspace boundaries.
R1-22 prompt/cancel/shell completion Fixed in 815f838a7c; logical-owner completion is preserved and an active replacement prompt is not finalized by an old abort.
R1-28 queued edit data loss Fixed in 815f838a7c; confirmed removal restores payload exactly once, including same-id and cross-session owner changes.
R1-30 concurrent branch Fixed in 815f838a7c; concurrent source-bound branch admission is rejected and stale candidates are detached without handoff.
R1-39 deferred mid-turn input Fixed in 815f838a7c; unaccepted input is recovered before owner reset and confirmed edit removal avoids loss or duplication.
R1-9 real-daemon integration Verified locally against the built CLI: 2/2 focused tests pass.
R1-40 branch commit assertion Addressed with the Critical branch regression coverage; the surviving handoff must reach the connected target.
Remaining Suggestions R1-7, R1-8, R1-10, R1-11, R1-12, R1-23, R1-24, R1-25, R1-27, R1-31, R1-32, R1-37, R1-45 Deferred to follow-up under the repository rule for mature PRs after roughly five review rounds; this round is limited to Critical correctness, data-loss, and regression fixes. Each inline thread records the deferral.

Verification on 815f838a7c:

  • WebUI session actions/provider: 290/290 passed.
  • WebShell App/queued prompts: 407/407 passed.
  • WebUI and WebShell package typechecks passed.
  • WebUI production build passed.
  • Focused real-daemon transactional switching E2E: 2/2 passed.
  • Affected ESLint checks and git diff --check passed.
  • Two consecutive open-ended diff/test audits found no remaining actionable Critical correctness issue in the updated scope.

@qwen-code-ci-bot qwen-code-ci-bot 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.

Not explored to full depth (tool budget reached): This PR makes modern WebUI/WebShell cross-session load/re...: did not run build/unit tests — findings rest on static tracing of the code paths (every link in the two Critical chains was verified in source, including all re…; This PR makes modern WebUI/WebShell cross-session load/re...: did not enumerate every consumer of connection.commands / connection.skills beyond App's slash-completion usage when assessing the fourth finding.; chunk 22: could not verify from this chunk whether the provider's staged-transition lifecycle arbitration aborts a commit when the staged target is closed/released mid-st…; chunk 2: none (I did not execute the test file — it's a 15.6k-line suite in a review worktree without installed deps, and static verification covered the failure modes a…; chunk 19: none — all checks I intended completed within budget., and 2 more.

中文说明

未探索到全部深度(达到工具调用预算):This PR makes modern WebUI/WebShell cross-session load/re...:did not run build/unit tests — findings rest on static tracing of the code paths (every link in the two Critical chains was verified in source, including all re…;This PR makes modern WebUI/WebShell cross-session load/re...:did not enumerate every consumer of connection.commands / connection.skills beyond App's slash-completion usage when assessing the fourth finding.;chunk 22:could not verify from this chunk whether the provider's staged-transition lifecycle arbitration aborts a commit when the staged target is closed/released mid-st…;chunk 2:none (I did not execute the test file — it's a 15.6k-line suite in a review worktree without installed deps, and static verification covered the failure modes a…;chunk 19:none — all checks I intended completed within budget.,另有 2 条。

— qwen3.8-max via Qwen Code /review (v0.21.9)

Comment thread packages/web-shell/client/App.tsx
Comment thread packages/web-shell/client/App.tsx
Comment thread packages/web-shell/client/App.tsx
Comment thread packages/web-shell/client/components/WorkspaceSessionProvider.tsx
Comment thread packages/web-shell/client/App.tsx
Comment thread integration-tests/cli/qwen-serve-webui-session-switching.test.ts
Comment thread packages/web-shell/client/App.tsx
Comment thread packages/webui/src/daemon/session/actions.ts
Comment thread packages/webui/src/daemon/session/DaemonSessionProvider.tsx
Comment thread packages/webui/src/daemon/session/actions.ts
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Handled the second review round on head e3e0825.\n\n| Item | Disposition |\n| --- | --- |\n| R2-1 | Fixed: plan preparation uses an operation token; same-ID and A→B→A regressions covered. |\n| R2-2 | Fixed: model select/delete share an operation token; same-ID and ABA regressions covered. |\n| R2-3 | Fixed: blocked turn-error retry no longer consumes its latch and remains usable after unblock. |\n| R2-4 | Fixed: same-logical legacy loads cannot restart the runner while a transactional target is pending. |\n| R2-7, R2-8, R2-10, R2-11, R2-12, R2-13 | Deferred as Suggestions under the repository policy for mature PRs after roughly five review rounds; each thread records the focused follow-up scope. |\n\nVerification:\n- WebUI actions + Provider: 291 tests passed.\n- WebShell App + WorkspaceSessionProvider: 380 tests passed.\n- Six focused same-ID/ABA/write-block regressions passed.\n- Independent Provider probe confirmed A stays connected, B stays preparing, and only B restore runs.\n- WebUI and WebShell typecheck passed.\n- WebUI build, affected ESLint, formatting, and diff checks passed.\n- Two consecutive clean audits found no remaining actionable correctness issue.

qwen-code-ci-bot pushed a commit that referenced this pull request Aug 11, 2026
yiliang114
yiliang114 previously approved these changes Aug 11, 2026

@yiliang114 yiliang114 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.

LGTM. The transactional core holds up under an adversarial pass: commitCrossSession is a fully synchronous ownership swap (microtask-batched store notification, one React batch — no observer-visible intermediate state), the arbitration (intent identity, lifecycle, env generation, deadline, source logical identity) re-runs inside the commit with no await between staging and commit, discard paths only retire the candidate without touching the current session's store/refs/stream, and the coordinator serializes with latest-queued-only and identical-target coalescing. No sessionId-only ownership is reintroduced, double-commit and commit-after-discard are structurally impossible, and all prior rounds' Criticals (round-2's seven, round-3's four, plus round-1's 89 broken unit tests) are verifiably fixed at head with 96 new cases and a real-daemon E2E. CI green on head.

Two P2 hardening items for fast-follow, not blockers: (1) the pump accepts a candidate attachment whose clientId differs from the requested id (DaemonSessionProvider.tsx:3440-3448 never compares candidate.clientId to requestClientId, and persistStableClientId persists the echoed one) — that weakens the #8833 exact-attachment fencing to 'some attachment identity' if a daemon ever echoes a different id; reject or persist the requested id and pin with a test. (2) 'bounded staging' only bounds side queues: the staging store is created with maxBlocks MAX_SAFE_INTEGER and the replay is synchronous, so an incident-class 76 MiB target transiently holds ~3x block arrays and blocks the main thread; deliberate and pinned by tests, not a regression vs legacy, but cap staging at maxBlocks or chunk across macrotasks and document the peak cost. Plus the known-deferred P3s (silent pump stall when client_identity capability is missing at pump time until the watchdog fires; releaseSession only cancels a pending transition when the current session matches). Ship it.

ytahdn
ytahdn previously approved these changes Aug 11, 2026

@ytahdn ytahdn 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.

✅ Approved

Approved after the review discussion resolved on the four inline threads: three suggestions were withdrawn (the branch in-flight interlock, the mid-turn admission retention, and the commit-observer boundary are all intentional and correctly reasoned), and the remaining ChatPane writeBlocked follow-up is accepted as a tracked deferral per the review-round policy. No blockers remain.

Note: Test (macos/windows) and Integration Tests (CLI, No Sandbox) are skipped on this head (the existing repo-wide pattern); the jobs that ran — Test (ubuntu), Desktop Shell (ubuntu/windows), web-shell E2E Smoke, visuals — are green.

中文说明

审查通过。4 条行内评论线程已闭环:3 条撤回(branch in-flight 互锁、mid-turn admission 保留、commit observer 边界均为有意设计且论证成立),剩余 ChatPane writeBlocked 一条作为延后项记录(符合审查轮次策略)。无遗留 blocker。说明:head 上 macos/windows 测试与 Integration Tests 被跳过(仓库既有模式),实际运行的 ubuntu Test、Desktop Shell、web-shell E2E 与 visuals 均绿。

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@doudouOUC
doudouOUC dismissed stale reviews from ytahdn and yiliang114 via b700a4c August 11, 2026 09:32
@doudouOUC
doudouOUC force-pushed the fix/transactional-cross-session-switching branch from 5651663 to b700a4c Compare August 11, 2026 09:32
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Conflict resolution update:

  • Rebasing onto origin/main@096bb0e3b9 is complete and the branch was force-pushed at b700a4cef2.
  • The merge combines the new workspace-scoped session catalog with PR fix(webui): Make cross-session switching transactional #8882's attachment-owner fences. Worktree metadata, queued shell invalidation, turn completion, and rename reconciliation remain scoped to the captured source session/workspace.
  • Added a regression test proving a deferred rename still updates the source workspace catalog after navigation without writing stale UI state into the new session.
  • Verified focused WebShell/WebUI suites, package and repository typechecks, repository build, affected-file ESLint, diff checks, and the real-daemon session-switching E2E (2/2). Two open-ended post-resolution audits and an independent test-engineer audit found no remaining actionable correctness issue.

The PR is mergeable with no unresolved current review threads. Checks for the rebased SHA are still finishing; the zero-duration red entries belong to a superseded workflow run that GitHub marked cancelled, so they were not retried.

@ytahdn ytahdn 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.

✅ Approved (re-approved after rebase)

Re-reviewed the updated head b700a4cef (rebase onto the newer main + one new commit):

  • The rebase is content-clean — every PR-specific file (DaemonSessionProvider, actions, types, useQueuedPrompts, WorkspaceSessionProvider, useBackgroundTasks, useSessionArtifacts, midTurnDedup, the daemon side channels, integration test, design doc) is byte-identical to the previously approved head; the diff on the shared App.tsx/ChatPane files is entirely the newer base's own progress (#8891/#8914), not conflict-resolution churn.
  • The new commit b700a4cef is sound — it moves the owner.isCurrent() gate in the rename flow to run after the catalog reconciliation and before the local status notice / error report, so a confirmed server-side rename still reconciles into the catalog after its source attachment was replaced, with a dedicated regression test (reconciles a confirmed rename after its source attachment is replaced). Matches its stated purpose.
  • Prior discussion conclusions are unchanged: three suggestions withdrawn (branch in-flight interlock, mid-turn admission retention, commit-observer boundary), one accepted as a tracked deferral (ChatPane writeBlocked).

CI on the new head: no failures (checks re-running after the rebase). The Test (macos/windows) / Integration Tests (CLI, No Sandbox) skip pattern remains the pre-existing repo-wide one; Test (ubuntu), Desktop Shell, web-shell E2E Smoke, and visuals were green.

中文说明

已针对更新后的 head b700a4cef(rebase 到新 main + 一个新提交)重新审查后再次通过:

  • rebase 内容干净——本 PR 专属文件(DaemonSessionProvider、actions、types、useQueuedPrompts、WorkspaceSessionProvider、useBackgroundTasks、useSessionArtifacts、midTurnDedup、daemon 侧通道、集成测试、设计文档)与此前 approved 的 head 逐字节一致;共享文件(App.tsx/ChatPane)的差异全部来自新 base 自身的进度(#8891/#8914),不是 rebase 冲突改动。
  • 新提交 b700a4c 合理——把 rename 流程中的 owner.isCurrent() 门控移到 catalog reconcile 之后、本地状态通知/错误上报之前:确认过的服务端 rename 在 source attachment 被替换后仍会 reconcile 进 catalog,并有专属回归测试。与提交目的一致。
  • 此前的讨论结论不变:3 条撤回(branch in-flight 互锁、mid-turn admission 保留、commit observer 边界),1 条接受为延后项(ChatPane writeBlocked)。

新 head 的 CI 无失败(rebase 后检查正在重跑);macos/windows 与 Integration Tests 的跳过仍是仓库既有模式,实际运行的 ubuntu Test、Desktop Shell、web-shell E2E 与 visuals 此前均绿。

@doudouOUC
doudouOUC enabled auto-merge August 11, 2026 09:37
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

@qwen-code /triage

@doudouOUC
doudouOUC added this pull request to the merge queue Aug 11, 2026
Merged via the queue into QwenLM:main with commit 00248b1 Aug 11, 2026
58 of 70 checks passed
@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Sandboxed verification: ⚠️ not run — skipped - workflow run

Skipped because the PR is not open for verification (state=MERGED, draft=false).

中文 — 判定:⚠️ 未运行 · 已跳过

跳过原因:the PR is not open for verification (state=MERGED, draft=false)。

Qwen Code · sandboxed verification

@doudouOUC
doudouOUC deleted the fix/transactional-cross-session-switching branch August 11, 2026 09:46
@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Triage re-run completed without a new review.

⚠️ The bot has neither a verdict nor a deferral on b700a4cef2ef5955d3583d04fe30a73fd671248e — no APPROVED, CHANGES_REQUESTED, or COMMENTED review of its own. A DISMISSED one does not count: dismiss_stale_reviews voids the bot's approval on every push, which is exactly when a fresh one is needed. If this re-run was meant to review or approve, it did not, and an approval left by another account is a separate vote that does not count as the bot's own.

⚠️ 机器人在 b700a4cef2ef5955d3583d04fe30a73fd671248e既没有裁决也没有 defer —— 没有属于它自己的 APPROVEDCHANGES_REQUESTEDCOMMENTED 评审。DISMISSED 不算:dismiss_stale_reviews 会在每次推送时作废机器人的批准,而那恰恰是需要一次新批准的时刻。如果这次重跑本应评审或批准,那么它没有做到;而其他账号留下的批准是另一张票,不能算作机器人自己的。

The stage comments above were updated with the latest result. View workflow run.

上方各阶段评论已更新为最新结果。查看工作流运行

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Released in v0.21.10.

cursor Bot pushed a commit to samuelhsin/qwen-code that referenced this pull request Aug 14, 2026
…he loading-skeleton model (QwenLM#9129)

The transactional cross-session switching from QwenLM#8882 staged a handoff and
kept the old attachment live until the target load committed. It added a
large transition state machine (intent staging, same-session capture,
watchdog deadlines, controlled rebind) across the daemon session layer
and the web-shell provider, and left the UI pinned to the previous
session while a switch prepared.

Restore the loading-skeleton model: switching a session clears the
transcript, shows the loading skeleton, and waits for the load result.

- Remove sessionTransition state, onSessionTransitionCommit and the
  transactional target logic from WorkspaceSessionProvider.
- Strip the transition state machine from DaemonSessionProvider and
  restore single-session restores: restore_in_progress retries stay
  bounded by the existing watchdog, and the skeleton UI keys on
  loadingTranscript.
- Move useDaemonSessionOwnerGuard back under the daemon index export.
- Delete the transactional design docs and both daemon integration
  tests; the restored behavior is covered by unit tests.
- Drop the dead desiredSessionTargetPending prop (write gating now keys
  on loadingTranscript alone) and stop a failed switch's target
  workspace from leaking into the next workspace-less load.

Co-authored-by: 钉萁 <dingqi.jww@alibaba-inc.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
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.

4 participants