fix(web-shell): show server queue status for pending messages - #8065
Conversation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
Thanks for the PR! Template looks good ✓ Problem: the Direction: aligned — this is a small, self-contained UI state display for the Web Shell queue, squarely inside qwen-code's own package. CHANGELOG has no direct reference but the area is relevant. Size: not applicable (no core paths touched — Approach: the scope feels right. The diff adds exactly one derived boolean ( Risk: no elevated risk signals (no high-risk paths touched). Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ 问题: 方向:对齐——这是一个小型、独立的 Web Shell 队列 UI 状态展示,完全位于 qwen-code 自己的包内。CHANGELOG 无直接引用,但该领域相关。 规模:不适用(未触及核心路径—— 方案:范围合理。diff 仅新增一个派生布尔值( 风险:无升级风险信号(未触及高风险路径)。 进入代码审查 🔍 — Qwen Code · qwen3.8-max-preview Reviewed at |
Code ReviewIndependent proposal: given a Comparison: the PR does exactly this. The implementation matches the independent proposal — no simpler path was missed. Specific observations:
No critical blockers. No convention violations. TestingFinal CI results for
One row per check name (latest run); skipped checks omitted; failures sort first. / 每个检查名一行(取最新一次运行),省略 skipped,失败项排在最前。 CI is green on the reviewed commit. The Linux unit suite ( 中文说明代码审查独立方案: 鉴于 对比: PR 的实现与独立方案完全一致——没有遗漏更简路径。 具体观察:
无关键阻塞项。无规范违反。 测试被审 commit 上 CI 全绿。Linux 单元测试套件( — Qwen Code · qwen3.8-max-preview Reviewed at |
|
Confidence: 5/5 — clean across every stage; would merge without hesitation. This is exactly the kind of PR the gate should wave through quickly. The CI is green on 中文说明置信度:5/5 —— 每个阶段均无问题,毫不犹豫地合并。 这正是 gate 应该快速放行的 PR。 CI 已在 — Qwen Code · qwen3.8-max-preview Reviewed at |
🖼️ web-shell visual previewRendered against a mock daemon (no real backend): the PR base vs this PR head Screenshots · before / afterℹ️ No screenshot changed against the PR base — but this PR edits 2 render-shaping files:
Either the change has no visual effect (logic, plumbing, a state the scenarios never reach), or no scenario renders this UI — in which case the preview cannot see it, and an empty result is a coverage gap rather than a clean bill of health. To make it visible, add a scenario to Full-resolution recordings (.webm) are attached to the workflow run. — Qwen Code · web-shell visuals |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
中文说明
— qwen3.8-max-preview via Qwen Code /review
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship — CI landed green after the review. ✅
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
中文说明
— qwen3.8-max-preview via Qwen Code /review
|
@qwen-code /triage |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
|
Released in v0.21.2. |
What this PR does
Shows an explicit “Queued on server...” status above the composer after a message has been accepted into the daemon's per-session queue but has not started running yet. The existing “Submitting...” status remains visible while admission is still in progress. Server-queued messages remain editable and removable, while the mid-turn insert action is hidden until its transfer semantics can guarantee that an accepted-but-undrained message stays visible and recoverable.
Why it's needed
A queued message can already be visible in the Web Shell while the daemon is still waiting to dispatch it. Without a visible server-queue state, users can interpret the lack of processing feedback as a lost message and may submit it again.
Reviewer Test Plan
How to verify
Start a turn, submit another message while that turn is still running, and confirm the queued message appears above the composer with “Queued on server...” after admission completes. Confirm that “Submitting...” is shown before admission completes, that the server-queued state does not show an activity spinner, that the insert action is hidden, and that delete and edit remain enabled. Once the daemon starts the queued prompt, confirm it leaves the queue display and proceeds through the normal turn UI.
Automated verification completed locally:
npx vitest run client/components/QueuedPromptDisplay.test.tsx(14 tests), targeted ESLint for the changed files,npm run build, andnpm run typecheck.Evidence (Before & After)
Before: an accepted message waiting in the daemon queue had no state label, which could make it appear lost.
After: the queued message displays “Queued on server...” / “服务器排队中...” above the composer until dispatch begins.
The screenshot below comes from the Chinese UI of a real local daemon and the real Web Shell client, not the mock-daemon visual harness. The first prompt requested a 45-second shell wait and remained active while the second prompt was submitted through the browser. The daemon's
/pending-promptsresponse reported the first prompt asrunningand the second prompt asqueued; the browser visibly rendered “服务器排队中...” with only delete and edit actions.Tested on
Environment (optional)
macOS local workspace. The visual evidence was captured in headless Chromium against the real source daemon and real Vite-served Web Shell client. Component tests used Vitest and jsdom.
Risk & Scope
queuedstate; it intentionally does not infer queueing from network latency or show a spinner while waiting for dispatch.Linked Issues
N/A
中文说明
此 PR 的改动
消息已被 daemon 接收到每会话队列、但尚未开始执行时,在输入框上方明确显示“服务器排队中...”。请求仍在提交阶段时继续显示“提交中...”;服务端排队中的消息仍可编辑、删除,但暂时隐藏插入当前回合的操作,直到该转移过程能够保证尚未被消费的消息仍然可见且可恢复。
为什么需要
排队消息可能已经在 Web Shell 中可见,但 daemon 尚未调度执行。此前这一阶段没有明确反馈,用户容易认为消息丢失,并重复提交相同内容。
Reviewer 测试计划
验证方式
启动一个回合,在当前回合仍运行时再次提交消息,确认请求被接受后,排队消息在输入框上方显示“服务器排队中...”。确认请求被接受前显示“提交中...”,服务器排队状态不显示活动 spinner,插入操作已隐藏,而删除和编辑仍保持可用。当 daemon 开始执行该排队消息后,确认它离开排队区域并进入正常回合 UI。
本地已完成自动验证:
npx vitest run client/components/QueuedPromptDisplay.test.tsx(14 个测试)、针对修改文件的 ESLint、npm run build和npm run typecheck。证据(改动前后)
改动前:已被服务器接受、但仍在 daemon 队列中等待的消息没有状态标签,看起来可能像消息丢失。
改动后:排队消息在开始调度前,会在输入框上方显示“Queued on server...” / “服务器排队中...”。
上方截图来自真实本地 daemon 和真实 Web Shell 中文客户端,不是 mock-daemon visual harness。第一条消息请求执行 45 秒 shell 等待,并在仍处于运行状态时通过浏览器提交第二条消息。daemon 的
/pending-prompts响应显示第一条为running、第二条为queued;截图中可直接看到“服务器排队中...”,右侧仅保留删除和编辑操作。测试平台
环境(可选)
macOS 本地工作区。视觉证据使用 headless Chromium,连接真实源码 daemon 和由 Vite 提供的真实 Web Shell 客户端;组件测试使用 Vitest 和 jsdom。
风险与范围
queued状态;不会根据网络延迟推测排队,也不会在等待调度时显示 spinner。关联 Issue
无