qwen-code/packages/web-shell/client
Shaojin Wen 2deefbf9c7
test(web-shell): add mermaid, split-view + sidebar visual scenarios (#6964)
* test(web-shell): add a mermaid diagram visual scenario

Add a `mermaid diagram` scenario to the visuals suite so the preview
covers the Mermaid rendering surface — an assistant message with a
mermaid fenced flowchart. It renders the real MermaidBlock (async
mermaid import, injected <svg>) in light and dark, waiting on the
rendered SVG so the capture is never the "rendering…" placeholder.

This is the surface the diagram zoom/pan work (#6881) enriches, so once
the before/after preview lands it gives that PR a real before/after
target instead of an unrelated canned screenshot.

* test(web-shell): add a split-view (+ maximize) visual scenario

Add a `split view` scenario: enter the two-pane split via the `?split=a,b`
deep link, then maximize one pane (#6951). Captures the tiled state (both
panes, with the maximize controls) and the maximized state (one pane
filling, restore control) in light and dark, driving the real SplitView
against the mock daemon serving two sessions.

* test(web-shell): add a sidebar attention-badge visual scenario

Add a `sidebar attention` scenario: four sessions in distinct states —
waiting-on-permission, waiting-on-user-question, running, idle — so the
sidebar renders #6956's "Waiting for approval" / "User input needed"
attention pills. Renders in light and dark; asserts on session names
(present with or without the pills) so the frame is the same shape on
main and the PR, letting the before/after preview surface the pills.

* test(web-shell): derive the split view's second session from the scenario list

Addresses a review suggestion: the split view test hardcoded the
'previous-session' id, which only worked because it is in
createWebShellDaemonScenario's default sessions list. Derive the second
pane's session from the scenario's own list instead (and throw a clear
error if absent), so a future rename/removal of that default surfaces as
a self-explaining failure rather than a confusing SSE connection timeout.

* test(web-shell): tidy split copy and mermaid width in visual scenarios

Address review nits on the visual scenarios:
- Split scenario: the mock replays the same events into both panes, so
  "Here is the first pane of the split." read wrong in the second pane.
  Use pane-neutral copy ("Here are the two sessions, side by side.").
- Mermaid scenario: the flowchart's rightmost node clipped at the code-block
  edge at the 1280px capture viewport. Shorten the node labels (same nodes and
  flow) so the whole diagram fits with margin.

Re-ran both scenarios (light + dark) locally: 4/4 pass, and confirmed in the
captures that the diagram no longer clips and the neutral copy reads correctly
in both panes.

* test(web-shell): capture split-view restore and assert all sidebar sessions

Address review nits on the visual scenarios:
- Split view: after maximize, click "Restore pane" and capture the restored
  tiled layout, asserting the maximize control returns on both panes — so a
  regression in the restore path is caught, not just the tiled and maximized
  states.
- Sidebar attention: assert all four session names render (not just the two
  waiting ones). The running session is also the loaded one, so its name also
  shows in the main view — scope the running/idle checks to the sidebar
  landmark so the match stays unambiguous.

---------

Co-authored-by: wenshao <wenshao@example.com>
2026-07-16 00:58:28 +00:00
..
adapters feat(web-shell): render composer references in user messages (#6537) 2026-07-11 17:44:47 +00:00
assets/icons feat(web-shell): add MCP mentions and iconized @ references (#6279) 2026-07-04 02:13:42 +00:00
completions feat(web-shell): add custom at mention panel (#6242) 2026-07-05 01:17:35 +00:00
components feat(daemon): add stateless generation SSE (#6947) 2026-07-16 00:00:08 +00:00
config feat(browser-ext): revive Chrome extension via daemon-direct architecture (#5777) 2026-06-28 15:57:31 +00:00
constants fix(web-shell): stabilize slash command i18n in split-view panes (#6546) 2026-07-08 14:57:12 +00:00
e2e test(web-shell): add mermaid, split-view + sidebar visual scenarios (#6964) 2026-07-16 00:58:28 +00:00
extensions Add harness infrastructure for web-shell package (#6517) 2026-07-09 08:11:58 +00:00
hooks fix(web-shell): prevent composer tag update loop (#6859) 2026-07-14 07:59:41 +00:00
lib feat(web-shell): add shadcn UI foundation (#6760) 2026-07-12 13:51:52 +00:00
styles feat(web-shell): refresh settings page with shadcn (#6817) 2026-07-13 11:50:46 +00:00
test feat(cli): improve subagent observability — untruncated live commands, transcript path, approval context (#6580) 2026-07-11 11:21:23 +00:00
utils feat(web-shell): add session created callback (#6703) 2026-07-13 07:04:42 +00:00
voice Add harness infrastructure for web-shell package (#6517) 2026-07-09 08:11:58 +00:00
App.module.css feat(web-shell): expose session controls to hosts (#6906) 2026-07-15 02:31:59 +00:00
App.test.tsx feat(web-shell): expose session controls to hosts (#6906) 2026-07-15 02:31:59 +00:00
App.tsx feat(daemon): add stateless generation SSE (#6947) 2026-07-16 00:00:08 +00:00
build-artifact.test.ts fix(web-shell): restore packaged dialog styles on React 18 (#6827) 2026-07-13 15:57:23 +00:00
customization.tsx feat(web-shell): render composer references in user messages (#6537) 2026-07-11 17:44:47 +00:00
i18n.tsx feat(daemon): add stateless generation SSE (#6947) 2026-07-16 00:00:08 +00:00
index.html Add harness infrastructure for web-shell package (#6517) 2026-07-09 08:11:58 +00:00
index.test.tsx feat(web-shell): add workspace path lock (#6853) 2026-07-14 06:24:52 +00:00
index.tsx feat(web-shell): add workspace path lock (#6853) 2026-07-14 06:24:52 +00:00
interactionBlockContext.ts feat(web-shell): add cell value dialog on double-click in markdown tables (#6530) 2026-07-11 15:21:34 +00:00
main.tsx feat(web-shell): add selection statistics to markdown tables (#6838) 2026-07-14 03:54:33 +00:00
midTurnDedup.test.ts feat(daemon): deliver web-shell mid-turn messages into the running turn (#5175) 2026-06-16 16:16:47 +08:00
midTurnDedup.ts feat(daemon): deliver web-shell mid-turn messages into the running turn (#5175) 2026-06-16 16:16:47 +08:00
portalRoot.ts feat(web-shell): add shadcn UI foundation (#6760) 2026-07-12 13:51:52 +00:00
themeContext.ts feat(web-shell): daemon web-shell improvements — token usage, settings, retry, streaming metrics, hidden commands (#5066) 2026-06-13 02:58:08 +00:00
vite-env.d.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00