Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
11664df
feat(vscode-ide-companion): reuse WebShell transcript UI behind exper…
yiliang114 Aug 22, 2026
b843439
fix(vscode-ide-companion): grant wasm-unsafe-eval for shiki WASM when…
yiliang114 Aug 22, 2026
ade51c2
feat(vscode-ide-companion): adopt WebShell transcript as default time…
yiliang114 Aug 22, 2026
778fee0
fix(vscode-ide-companion): reset WebShell transcript state on session…
yiliang114 Aug 22, 2026
2bad894
fix(vscode-ide-companion): harden WebShell transcript session boundaries
yiliang114 Aug 22, 2026
97872e4
fix(vscode-ide-companion): adopt live ACP session id after load-failu…
yiliang114 Aug 23, 2026
fb3ef2e
fix(vscode-ide-companion): echo user prompt into WebShell transcript
yiliang114 Aug 23, 2026
843670d
fix(vscode-ide-companion): keep WebShell transcript expanded and clea…
yiliang114 Aug 23, 2026
a3e12af
fix(vscode-ide-companion): surface local error and interrupt notices …
yiliang114 Aug 23, 2026
019b325
fix(vscode-ide-companion): restore file-link opening from the WebShel…
yiliang114 Aug 23, 2026
62b6560
fix(vscode-ide-companion): restore contributed copy commands for the …
yiliang114 Aug 23, 2026
e68382c
fix(vscode-ide-companion): add localOnly marker to TextMessage state …
yiliang114 Aug 23, 2026
7789664
fix(vscode-ide-companion): restore /insight progress card and report …
yiliang114 Aug 23, 2026
af98d96
fix(vscode-ide-companion): finalize in-flight tools on timeout and pi…
yiliang114 Aug 23, 2026
de3b2d8
fix(vscode-ide-companion): remove unreachable editMessage backend and…
yiliang114 Aug 23, 2026
ebebe45
fix(vscode-ide-companion): drop write-only loadingMessage bookkeeping
yiliang114 Aug 23, 2026
af938d6
fix(vscode-ide-companion): align waiting-flag pin test with the argum…
yiliang114 Aug 23, 2026
4aef24f
fix(vscode-ide-companion): echo attached images into the transcript t…
yiliang114 Aug 23, 2026
fd1a807
fix(vscode-ide-companion): track live VS Code theme for the transcript
yiliang114 Aug 23, 2026
39d6f24
fix(vscode-ide-companion): copy every transcript block kind and map a…
yiliang114 Aug 23, 2026
acc290f
fix(vscode-ide-companion): drop whitespace-only cached transcript rows
yiliang114 Aug 23, 2026
0ed655c
fix(vscode-ide-companion): ship missing third-party notices in NOTICE…
yiliang114 Aug 23, 2026
c7ccb74
fix(vscode-ide-companion): show a recoverable error state when the tr…
yiliang114 Aug 23, 2026
487f2b5
test(vscode-ide-companion): gate the transcript blocks wiring into th…
yiliang114 Aug 23, 2026
d7552f8
test(vscode-ide-companion): gate the transcriptUpdate forwarding from…
yiliang114 Aug 23, 2026
97661a7
docs(vscode): plan complete Web Shell cutover
yiliang114 Aug 23, 2026
4c72d23
Merge remote-tracking branch 'origin/main' into codex/vscode-web-shel…
yiliang114 Aug 24, 2026
47e4487
refactor(web-shell): own daemon React bindings
yiliang114 Aug 24, 2026
483fb5c
fix(webui): preserve package entry filenames
yiliang114 Aug 24, 2026
41236c5
refactor(vscode): complete WebShell UI cutover
yiliang114 Aug 24, 2026
3eff972
chore(vscode): refresh third-party notices
yiliang114 Aug 24, 2026
a80fb6a
fix(vscode): fill embedded chat viewport
yiliang114 Aug 24, 2026
0155011
Merge remote-tracking branch 'origin/main' into codex/vscode-web-shel…
yiliang114 Aug 24, 2026
58bd9a1
test(web-shell): disambiguate workspace visual locator
yiliang114 Aug 24, 2026
79c96b1
fix(vscode): match embedded chat layout to host
yiliang114 Aug 24, 2026
672181b
fix(vscode): compact embedded chat styling
yiliang114 Aug 24, 2026
a34245f
fix(vscode): align embedded chat density with VS Code
yiliang114 Aug 24, 2026
b4a9b9f
Merge remote-tracking branch 'origin/main' into HEAD
yiliang114 Aug 24, 2026
50509c2
fix(vscode): complete embedded composer integration
yiliang114 Aug 24, 2026
38da708
Merge remote-tracking branch 'origin/codex/vscode-web-shell-cutover' …
yiliang114 Aug 24, 2026
f1304a4
fix(vscode): restore user message editing after cutover
yiliang114 Aug 24, 2026
fdb2c9f
fix(vscode): complete WebShell feature parity
yiliang114 Aug 25, 2026
c3622ea
Merge remote-tracking branch 'origin/main' into codex/vscode-web-shel…
yiliang114 Aug 25, 2026
9637acf
Merge remote-tracking branch 'origin/main' into codex/vscode-web-shel…
yiliang114 Aug 25, 2026
4e4d2ac
test(vscode-ide-companion): repair host-wiring tests for the WebShell…
yiliang114 Aug 25, 2026
5f74412
Merge branch 'main' into codex/vscode-web-shell-cutover
wenshao Aug 26, 2026
8571596
refactor(vscode-ide-companion): replace webui build scanner with an E…
qwen-code-dev-bot Aug 26, 2026
72777d0
fix(web-shell): keep ChatEditor commands prop referentially stable (#…
qwen-code-dev-bot Aug 26, 2026
ab7c037
Merge remote-tracking branch 'origin/main' into codex/vscode-web-shel…
qwen-code-dev-bot Aug 26, 2026
814cf9e
Merge branch 'main' into codex/vscode-web-shell-cutover
yiliang114 Aug 27, 2026
d8ea6fc
Merge remote-tracking branch 'origin/main' into codex/vscode-web-shel…
yiliang114 Aug 27, 2026
f1b4b3e
fix(vscode): distinguish the VS Code channel and localize its chrome
Aug 27, 2026
6600145
refactor(vscode): drop code orphaned by the WebShell cutover
Aug 27, 2026
e3e2d4e
docs(vscode): describe the daemon architecture the cutover actually s…
Aug 27, 2026
db024c9
Merge remote-tracking branch 'origin/main' into codex/vscode-web-shel…
Aug 28, 2026
86c1c68
Merge remote-tracking branch 'origin/main' into codex/vscode-web-shel…
qwen-code-dev-bot Aug 28, 2026
b97ca86
fix(vscode): repair round-2 review findings on the web-shell cutover …
qwen-code-dev-bot Aug 28, 2026
4f3737b
fix(vscode): repair round-3 critical findings on the web-shell cutove…
qwen-code-dev-bot Aug 29, 2026
18cfb52
Merge origin/main into codex/vscode-web-shell-cutover
yiliang114 Aug 29, 2026
67862b1
fix(web-shell): import daemon-react-sdk from web-shell instead of webui
yiliang114 Aug 29, 2026
5652529
fix(vscode): close WebShell UI regression gaps
yiliang114 Aug 29, 2026
5fa8d54
fix(vscode): initialize WebShell refs explicitly
yiliang114 Aug 29, 2026
70c5e8f
fix(vscode): narrow queued prompt edits
yiliang114 Aug 29, 2026
db8a081
fix(release): enumerate actual npm workspaces
yiliang114 Aug 29, 2026
422c132
Merge branch 'main' into codex/vscode-web-shell-cutover
yiliang114 Aug 29, 2026
1ac7bd0
fix(web-shell): include hasOlderHistory in the render-item callback deps
yiliang114 Aug 29, 2026
ca67964
fix(web-shell): report each connection error once to stop the inline …
yiliang114 Aug 29, 2026
3cf5e5f
fix(web-shell): remove duplicate history dependency
yiliang114 Aug 29, 2026
8a51002
fix(vscode): close remaining WebShell cutover regressions
yiliang114 Aug 29, 2026
6edee58
merge: sync main into vscode WebShell cutover
yiliang114 Aug 29, 2026
9129bbd
merge: keep legacy VS Code UI removed
yiliang114 Aug 29, 2026
3dfd191
Merge origin/main into codex/vscode-web-shell-cutover
yiliang114 Aug 29, 2026
9b915ef
Merge updated codex/vscode-web-shell-cutover
yiliang114 Aug 29, 2026
ff18048
fix(vscode): keep permission diff handling host-scoped
yiliang114 Aug 29, 2026
5d7fa3d
test(vscode): remove orphaned completion trigger test
yiliang114 Aug 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
214 changes: 214 additions & 0 deletions docs/design/2026-08-23-vscode-web-shell-cutover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
# Complete the VS Code Web Shell cutover

Status: Draft

Depends on [#9719](https://github.com/QwenLM/qwen-code/pull/9719).

## Goal

Make the VS Code companion use Web Shell for the complete chat experience, not
only the transcript. Web Shell owns the visible chat UI and its interaction
state, and the extension host keeps the VS Code integrations: process
lifecycle, authentication, workspace trust, diff editors, and the contributed
commands.

This is the first of two follow-up changes. The second change removes the
remaining repository consumers and deletes `packages/webui`.

## Current state

PR #9719 replaces the legacy VS Code message timeline with
`WebShellTranscript`, but the companion remains a hybrid UI:

- 15 production source files in the VS Code companion still import
`@qwen-code/webui`.
- The composer, completion menu, permission drawer, Ask User Question dialog,
session selector, header, onboarding, image preview, model controls, icons,
shared types, and utility functions still come from `packages/webui`.
- 69 production source files in Web Shell import
`@qwen-code/webui/daemon-react-sdk`.
- `@qwen-code/web-shell` declares `@qwen-code/webui` as both a peer dependency
and a development dependency.

`WebShellWithProviders` expects the daemon HTTP/SSE runtime, while the
extension owned an ACP connection and exchanged messages with the webview
through `postMessage`.

## Decisions

### Run the chat on a workspace-scoped daemon

This work first built a controlled host entry point driven by the ACP bridge
over `postMessage`. That entry point reimplemented, against a second protocol,
state Web Shell already derives from the daemon — transcript, streaming,
permissions, questions, session history — and the reimplementation is what kept
regressing. The chat now runs on `WebShellWithProviders` instead.

The extension spawns `qwen serve` on a loopback port bound to the workspace,
with `--require-auth` and a per-process token passed through the environment,
and hands the webview its base URL. The webview talks to that daemon directly;
Web Shell's own session, transcript, and permission machinery is the single
implementation.

The ACP connection remains, but its role narrows to authentication state and
the `/auth` flow. It no longer carries prompts.

Consequences worth stating plainly:

- The extension runs two Qwen processes per workspace: the ACP agent for auth
and the daemon for the conversation.
- The daemon is shared with the CLI and the browser Web Shell for that
workspace, so sessions the companion creates carry the `vscode` source type
and its history is scoped to that source. Without it the panel would list
conversations the user started in a terminal.
- A daemon is bound to one workspace at spawn, so a multi-root window respawns
it when the active root changes.
- Turn-lifecycle features that were driven by ACP agent events — the editor tab
status dot and the long-task/attention notifications — no longer fire, and
`/insight` progress no longer reaches the host. Web Shell renders its own
insight cards. Restoring the tab dot and notifications needs the webview to
report turn and permission transitions to the host; that is not in this
change.

### Use Web Shell's standard entry point

The companion mounts `WebShellWithProviders` and customizes it through props
rather than through a bespoke embedded component: composer toolbar actions,
host-only slash entries, active-editor context injection, review-diff and
insight-report open handlers, and the session source type. The VS Code chrome
the daemon cannot supply — the view header, session history dropdown,
onboarding, and account dialog — stays in the extension and is themed from VS
Code tokens and localized from the same language signal Web Shell uses.

The host contract covers these existing capabilities:

| State supplied by the host | Actions sent to the host |
| ------------------------------------------------ | ------------------------------------------- |
| Active session and session summaries | Submit and cancel a prompt |
| Transcript blocks and streaming state | Create or switch session |
| Pending permission and question requests | Respond to permission or question |
| Models, approval mode, commands, and skills | Change model or approval mode |
| Context usage, authentication, and account state | Request completion and authentication |
| Workspace files and pasted images | Open a file, diff, report, or external link |

The contract is owned by `@qwen-code/web-shell`; it is not a new workspace
package and it does not introduce another shared `Message[]` model. Transcript
data continues to use the canonical SDK `DaemonTranscriptBlock[]` contract.

### Make Web Shell self-contained

The daemon React providers and hooks currently stored under
`packages/webui/src/daemon` belong to the Web Shell runtime integration. They
move under `packages/web-shell` and Web Shell stops importing or declaring
`@qwen-code/webui`.

If the low-level provider API must remain available to external Web Shell
embedders, it will be exported from a Web Shell subpath. It will not be moved
to a new package. The batteries-included `WebShellWithProviders` entry remains
the preferred daemon integration.

### Delete replaced VS Code code in the same change

The cutover is not complete while two implementations remain. When the
controlled Web Shell surface owns a capability, the corresponding companion
component, hook, state branch, compatibility re-export, style import, and test
is removed in the same PR.

The extension may keep code only when it is a real VS Code host capability,
such as opening files, showing native diffs, reading the active editor,
workspace file search, clipboard integration, or extension lifecycle.

## Scope

The PR completes and verifies these user flows:

- onboarding and authenticated empty states;
- start, cancel, and resume a conversation;
- streaming assistant text and expandable thought;
- all tool-call states and plan rendering;
- Bash/Edit permissions, including every response option;
- Ask User Question, including multi-question answers;
- history opening, session selection, new session, and late-frame isolation;
- composer input, slash commands, file completion, skills, images, and active
editor context;
- approval mode, model selection, thinking mode, context usage, and account
access;
- copy actions, file links, report links, and VS Code diff actions;
- error, cancellation, authentication, and reconnect states.

The latest user message remains editable. The host maps the selected transcript
turn to a daemon rewind snapshot and rewinds the session before resubmitting.

## Out of scope

- Removing the ACP connection entirely; it still owns authentication.
- Restoring the tab status dot, completion notifications, and host-side
`/insight` progress on daemon turn events.
- Migrating desktop-specific navigation or native window chrome.
- Creating `@qwen-code/chat-panel`, another UI package, or a parallel message
model.
- Deleting `packages/webui`; that is the dependent cleanup PR.
- Deleting `packages/desktop/apps/webui`, which is a separately named desktop
application and is not the legacy shared package targeted here.

## Implementation sequence inside this PR

1. Relocate the daemon React layer into Web Shell and update its internal
imports, build aliases, public entry points, tests, and README.
2. Spawn a workspace-scoped daemon from the extension host and bootstrap the
webview with its base URL, token, and client id.
3. Mount `WebShellWithProviders` against that daemon and add the props the
companion needs, including its session source type.
4. Remove replaced companion components, hooks, compatibility utilities,
WebUI styles, Tailwind preset usage, package dependency, and bundler
exceptions.
5. Add an import gate proving neither `packages/web-shell` nor
`packages/vscode-ide-companion` depends on `@qwen-code/webui`.

These are implementation steps within one review unit, not separate PRs.

## Verification gate

### Automated

- Web Shell unit, DOM, typecheck, lint, and library build checks.
- VS Code companion unit, typecheck, lint, and production bundle checks.
- Contract tests for every host state/action mapping.
- Session-switch tests that reject updates belonging to the previous session.
- A repository check that rejects new WebUI imports in Web Shell and VS Code.

### Real VS Code UI E2E

Run the built extension in one real VS Code Extension Development Host using a
stable test profile. Launch that host once and reuse it for the full matrix
instead of restarting VS Code per case. The dedicated profile avoids modifying
the user's normal editor process, must dismiss onboarding without requiring
GitHub or Copilot sign-in, and must preserve its extension state between cases.

Capture screenshots for:

1. dark and light transcript parity;
2. composer with file, slash-command, skill, and image attachments;
3. permission request before and after a response;
4. Ask User Question before and after submission;
5. history selector and session switch;
6. pending, running, completed, failed, and cancelled tool calls;
7. streaming thought/text and cancellation;
8. model and approval-mode controls;
9. authentication, empty, error, and reconnect states.

The PR test report must distinguish WebView-only assertions from actions whose
VS Code host or daemon side effect was observed end to end.

## Completion criteria

- VS Code mounts Web Shell for the entire chat flow.
- Companion-created sessions are attributable to the `vscode` source and the
panel's history lists only them.
- Web Shell and VS Code contain no production import of `@qwen-code/webui`.
- The Web Shell package has no peer, development, build, or Vite dependency on
`@qwen-code/webui`.
- Replaced companion UI and interaction code is deleted.
- All listed real-host E2E flows have assertions and screenshot evidence.
- Remaining repository references to `packages/webui` are enumerated in the
dependent deletion PR.
Loading
Loading