qwen-code/packages/web-shell/client/utils
Shaojin Wen 6b4a6295a2
Some checks failed
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 1/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 2/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 3/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 1/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 2/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 3/3 (push) Waiting to run
E2E Tests / E2E Test - macOS - shard 1/2 (push) Waiting to run
E2E Tests / E2E Test - macOS - shard 2/2 (push) Waiting to run
E2E Tests / channel-plugin E2E (nightly) (push) Waiting to run
E2E Tests / cron-interactive E2E (nightly) (push) Waiting to run
E2E Tests / web-shell Browser Regression (push) Waiting to run
SDK Java / ubuntu-latest / Java 11 (push) Waiting to run
SDK Java / ubuntu-latest / Java 17 (push) Waiting to run
SDK Java / macos-latest / Java 21 (push) Waiting to run
SDK Java / ubuntu-latest / Java 21 (push) Waiting to run
SDK Java / windows-latest / Java 21 (push) Waiting to run
SDK Java / Real daemon E2E / Java 11 (push) Waiting to run
Sync cua-driver to Aliyun OSS / Mirror cua-driver binaries to Aliyun OSS (push) Has been cancelled
feat(web-shell): run read-only info commands immediately mid-turn (#8496)
* feat(web-shell): run read-only info commands immediately mid-turn

/stats, /about (/status) and /context were silently swallowed while a
turn was streaming, because their local user echo would act as a turn
boundary in applyTurnCollapse and split the active turn. Their output
is a status block, which is not a turn boundary and is not counted in
turn metrics, so only the echo needs to be skipped mid-turn.

Add appendLocalUserEchoIfIdle, which echoes when idle and skips the
echo while streaming without blocking the command, and switch these
three commands to it so their results render inline immediately even
during an active turn.

* fix(web-shell): keep streaming assistant block intact for mid-turn info commands

Address PR review. A status dispatch finalizes the active assistant
block by default, so running /stats, /about or /context mid-turn would
fragment the streaming answer around the status card and drop later
usage frames. Add an optional clearActiveText flag to the status event
and pass false from these three command dispatches, covered by
reducer-level tests.

Also collapse the echo gate into a single body (the new helper now
delegates to appendOrDeferLocalUserMessage), add App-level wiring tests
for the responding/idle behavior of /stats and /about, and surface
failed getStats via reportError instead of swallowing them.

* fix(web-shell): reset the echo user block when info output keeps streaming (#8496)

The clearActiveText: false opt-out skipped the whole clearActiveText call,
leaving the local command echo as the active user block indefinitely. A
peer client's prompt echo then merged into it, corrupting turn boundaries.
Keep the streaming assistant/thought block open on the opt-out path but
still drop the user pointer.

Also report /about load failures like /stats and /context already do, and
pin the new /context wiring plus the /stats failure path with tests.

* refactor(web-shell): centralize the mid-turn read-only status dispatch (#8496)

Address the round-3 review feedback on the mid-turn read-only commands:

- The read-only result dispatch (status block with clearActiveText:
  false plus the follow-resume) was copied verbatim at the /context,
  /stats, and /about sites, leaving the load-bearing flag enforced by
  convention at three places. Centralize it in one
  dispatchReadOnlyStatus callback next to echoLocalCommandIfIdle; the
  three .then bodies now call it with their serialized text.
- Pin the /about catch the way the sibling /stats catch is pinned:
  make collectSystemInfo throw once and assert the failure surfaces
  through console.error instead of becoming an unhandled rejection
  with zero user feedback.

* test: pin thought opt-out and serialized mid-turn status payloads (#8496)

* refactor(web-shell): consolidate read-only command echo into echoOrDeferLocalCommand (#8496)

* test(web-shell): cover /status routing and document the echo-suppression exception (#8496)

---------

Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
2026-08-05 14:05:08 +00:00
..
ansi.test.ts fix(web-shell): parse 256-color and truecolor SGR sequences in parseAnsi (#7620) 2026-07-26 02:25:20 +00:00
ansi.ts fix(web-shell): parse 256-color and truecolor SGR sequences in parseAnsi (#7620) 2026-07-26 02:25:20 +00:00
askUserPermission.test.ts feat(tui): Ctrl+O frozen transcript view and unified tool output rendering (#5666) 2026-07-09 23:40:29 +00:00
askUserPermission.ts feat(web-shell): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
commandDisplay.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
composerInputState.test.ts fix(web-shell): optionally restart SSE after prompt admission (#7080) 2026-07-17 16:13:39 +00:00
composerInputState.ts fix(web-shell): optionally restart SSE after prompt admission (#7080) 2026-07-17 16:13:39 +00:00
composerModels.ts feat(web-shell): restore the full composer in split-view panes (#6510) 2026-07-08 07:01:36 +00:00
composerTag.test.ts fix(web-shell): restore context tags in queued and recalled prompts (#7312) 2026-07-21 12:59:29 +00:00
composerTag.ts fix(web-shell): restore context tags in queued and recalled prompts (#7312) 2026-07-21 12:59:29 +00:00
composerTasks.test.ts fix(web-shell): sync background agent status (#7561) 2026-07-23 06:35:04 +00:00
composerTasks.ts fix(web-shell): sync background agent status (#7561) 2026-07-23 06:35:04 +00:00
copyCommand.test.ts fix(web-shell): make /copy with a bare index work (#7789) 2026-07-28 05:35:58 +00:00
copyCommand.ts fix(web-shell): make /copy with a bare index work (#7789) 2026-07-28 05:35:58 +00:00
cssUrlVar.test.ts feat(web-shell): support icon chips for mention tags (#6337) 2026-07-05 13:25:32 +00:00
cssUrlVar.ts feat(web-shell): support icon chips for mention tags (#6337) 2026-07-05 13:25:32 +00:00
dialogLabels.ts refactor(web-shell): restructure chat UI (#5775) 2026-06-23 22:43:19 +08:00
dom.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
errorDetail.ts feat(serve): add workspace MCP management (#6954) 2026-07-16 02:24:07 +00:00
escapeIntent.test.ts feat(web-shell): friendlier Esc interruption + queued-prompt UX (#6025) 2026-06-30 01:27:16 +00:00
escapeIntent.ts feat(web-shell): friendlier Esc interruption + queued-prompt UX (#6025) 2026-06-30 01:27:16 +00:00
formatRelativeTime.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
formatRuntime.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
formatTokenCount.ts feat(web-shell): add token-usage analytics dashboard to Daemon Status (#6388) 2026-07-06 13:43:41 +00:00
goalCondition.test.ts feat(web-shell): add a workspace Goals page, and stop losing /goal on daemon resume (#6561) 2026-07-18 08:52:07 +00:00
goalCondition.ts feat(web-shell): add a workspace Goals page, and stop losing /goal on daemon resume (#6561) 2026-07-18 08:52:07 +00:00
localCommandQueue.test.ts feat(web-shell): queue prompts while turns are running (#6005) 2026-06-30 14:51:28 +00:00
localCommandQueue.ts feat(web-shell): run read-only info commands immediately mid-turn (#8496) 2026-08-05 14:05:08 +00:00
modelDisplay.ts feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
modelEncoding.test.ts fix(web-shell): encode vision model picker selection & polish dispatch (#6236) 2026-07-03 13:51:47 +00:00
modelEncoding.ts fix(web-shell): encode vision model picker selection & polish dispatch (#6236) 2026-07-03 13:51:47 +00:00
modelSwitchMessages.test.ts feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
modelSwitchMessages.ts feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
monitorTasks.test.ts feat(web-shell): add monitor task details (#7817) 2026-07-27 12:30:17 +00:00
monitorTasks.ts feat(web-shell): add monitor task details (#7817) 2026-07-27 12:30:17 +00:00
queueDrain.test.ts feat(web-shell): friendlier Esc interruption + queued-prompt UX (#6025) 2026-06-30 01:27:16 +00:00
queueDrain.ts feat(web-shell): friendlier Esc interruption + queued-prompt UX (#6025) 2026-06-30 01:27:16 +00:00
sentinelMessage.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
sessionErrors.test.ts feat(web-shell): add contextual task panels (#7929) 2026-07-30 13:45:30 +00:00
sessionErrors.ts feat(web-shell): add contextual task panels (#7929) 2026-07-30 13:45:30 +00:00
sessionPath.test.ts fix(web-shell): preserve token and base path in session URLs (#7926) 2026-07-29 06:12:37 +00:00
sessionPath.ts fix(web-shell): preserve token and base path in session URLs (#7926) 2026-07-29 06:12:37 +00:00
sessionPreparation.test.ts feat(web-shell): add git mode selector for new session creation (#7471) 2026-07-24 03:48:43 +00:00
sessionPreparation.ts feat(web-shell): add git mode selector for new session creation (#7471) 2026-07-24 03:48:43 +00:00
slash-command-action.ts feat(web-shell): support custom slash command actions (#7267) 2026-07-20 11:23:55 +00:00
slashSectionPlan.test.ts feat(web-shell): improve slash command discovery (taller menu, group counts, fuzzy search) (#6267) 2026-07-03 14:56:06 +00:00
slashSectionPlan.ts feat(web-shell): improve slash command discovery (taller menu, group counts, fuzzy search) (#6267) 2026-07-03 14:56:06 +00:00
splitUrl.test.ts fix(web-shell): preserve token and base path in session URLs (#7926) 2026-07-29 06:12:37 +00:00
splitUrl.ts fix(web-shell): preserve token and base path in session URLs (#7926) 2026-07-29 06:12:37 +00:00
systemInfo.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
timeAgo.test.ts feat(web-shell): add read-only GitHub pull requests panel (#7683) 2026-07-25 02:44:50 +00:00
timeAgo.ts feat(web-shell): add read-only GitHub pull requests panel (#7683) 2026-07-25 02:44:50 +00:00
todos.test.ts feat(web-shell): bind plan approval to its Todo revision (#8393) 2026-08-04 14:25:50 +00:00
todos.ts feat(web-shell): bind plan approval to its Todo revision (#8393) 2026-08-04 14:25:50 +00:00
workspace.test.ts feat: support workspace display names (#7179) 2026-07-20 15:16:44 +00:00
workspace.ts feat: support workspace display names (#7179) 2026-07-20 15:16:44 +00:00
workspaceColor.test.ts feat(web-shell): color-code each split pane by workspace (#6971) 2026-07-16 02:38:58 +00:00
workspaceColor.ts feat(web-shell): color-code each split pane by workspace (#6971) 2026-07-16 02:38:58 +00:00