Repository navigation
feat(web-shell): show workspace overview and a workspace menu in the sidebar #10407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
3870fa3
feat(web-shell): show workspace overview and a workspace menu in the …
wenshao 7af1806
fix(web-shell): address review of the workspace overview sidebar
wenshao fd3939b
fix(web-shell): second review round for the workspace overview sidebar
wenshao dfece46
fix(web-shell): third review round for the workspace overview sidebar
wenshao 05b8389
fix(web-shell): fourth review round for the workspace overview sidebar
wenshao 76f1208
Merge remote-tracking branch 'origin/main' into feat/webshell-workspa…
wenshao 518f92c
chore: restore teamHelpers.test.ts to main's formatting after merge
wenshao a910a03
fix(web-shell): fifth review round for the workspace overview sidebar
wenshao 3a5a8cb
Merge branch 'main' into feat/webshell-workspace-overview
wenshao acef9f3
fix(web-shell): sixth review round for the workspace overview sidebar
wenshao a4aaed4
fix(web-shell): count unanswered overview rounds even when superseded
wenshao 8e4ebb2
fix(web-shell): set the worktree intent with the draft it belongs to
wenshao 254fdc0
fix(web-shell): keep an armed git intent across no-op and cross-works…
wenshao 2a83a40
Merge remote-tracking branch 'origin/main' into feat/webshell-workspa…
wenshao 1717b76
fix(web-shell): scope overview miss budgets to one bookkeeping session
wenshao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
83 changes: 83 additions & 0 deletions
83
.qwen/e2e-tests/2026-08-28-web-shell-workspace-overview.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| # Web Shell workspace overview (sidebar) | ||
|
|
||
| Issue: https://github.com/QwenLM/qwen-code/issues/10399 | ||
| Design: `docs/design/web-shell/web-shell-workspace-overview.md` | ||
|
|
||
| ## Baseline | ||
|
|
||
| - `main` @ d853f09f: a workspace row shows the folder name, untrusted / | ||
| read-only badges and a git chip. The `⋮` menu has one entry, Remove | ||
| workspace, and only on removable secondary workspaces. | ||
| - The daemon already answers `GET /workspaces/:w/{mcp,skills,extensions,channels,memory,hooks}` | ||
| and `PATCH /workspaces/:w` (rename) and `POST /workspaces/:w/reload`. | ||
|
|
||
| ## Local setup | ||
|
|
||
| 1. `npm run build` from the repository root so `dist/cli.js` bundles the | ||
| Web Shell from this branch. | ||
| 2. Isolated `QWEN_HOME` with a settings.json that registers one stdio MCP | ||
| server that cannot start (for example `command: /nonexistent`) plus one | ||
| that can, and at least one project skill under `.qwen/skills`. | ||
| 3. `node dist/cli.js serve --workspace <primary> --workspace <secondary>` | ||
| on loopback; open the served Web Shell. | ||
|
|
||
| ## Scenarios | ||
|
|
||
| ### Header counts and chips | ||
|
|
||
| Expand the primary workspace with one session running a prompt. | ||
|
|
||
| Expected: | ||
|
|
||
| - The folder header shows `●1` (success tone) and the total session count; a | ||
| session waiting for permission adds a warning-tone count. | ||
| - Under the header: the full path, then chips `MCP a/b · Skills n · | ||
| Extensions n · Channels n · Context n`. The MCP chip is warning-toned and | ||
| its tooltip names the failed server count. | ||
| - Before the ACP child has initialized (fresh daemon, no session yet) the | ||
| MCP / Skills / Context chips show `—` with tooltip "not initialized yet", | ||
| never `0`. | ||
|
wenshao marked this conversation as resolved.
Resolved
|
||
|
|
||
| ### Request gating | ||
|
|
||
| With the Network panel filtered to `/workspaces/`: | ||
|
|
||
| - A collapsed workspace issues no facet requests. | ||
| - An expanded one issues one request per facet on expand, on window focus and | ||
| every 30 s while the tab is visible; nothing while the tab is hidden. | ||
|
|
||
| ### Workspace menu | ||
|
|
||
| Hover a trusted secondary workspace and open `⋮`. | ||
|
|
||
| Expected: | ||
|
|
||
| - Rename… (only when the daemon advertises `dynamic_workspace_registration`), | ||
| Copy path, New task, New worktree task, Reload runtime, Remove workspace. | ||
| - Rename opens a dialog prefilled with the current display name; saving | ||
| updates the row label without a reload; clearing the name restores the | ||
| folder name. | ||
| - Copy path puts the absolute path on the clipboard. | ||
| - Reload runtime issues `POST /workspaces/<cwd>/reload` and refreshes the | ||
| chips. | ||
| - New worktree task opens a new draft with the composer's git mode set to | ||
| worktree. | ||
|
|
||
| On the primary workspace the menu additionally shows a Manage group (MCP | ||
| servers, Skills, Extensions, Channels, Settings) with the chip counts; each | ||
| opens the corresponding page. Secondary workspaces do not get the group. | ||
|
|
||
| ### Embedding switch | ||
|
|
||
| Mount `<WebShell sidebar={{ workspaceOverview: false }} />`. | ||
|
|
||
| Expected: folder headers, path line, chips and Projects count are gone; the | ||
| `⋮` menu still offers the non-overview actions. | ||
|
|
||
| ## Automated coverage | ||
|
|
||
| - `packages/web-shell/client/components/sidebar/{workspaceOverviewModel,useWorkspaceOverview,WorkspaceOverview,WorkspaceMenu,WorkspaceRenameDialog}.test.*` | ||
| - `packages/web-shell/client/components/sidebar/WebShellSidebar.workspace-removal.test.tsx` | ||
| (menu gating, rename, reload, management targets) | ||
| - `packages/web-shell/client/e2e/web-shell.workspace-overview.spec.ts` | ||
| (chips, counts, request gating, menu contents against the mock daemon) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| # Web Shell workspace overview | ||
|
|
||
| Issue: https://github.com/QwenLM/qwen-code/issues/10399 | ||
|
|
||
| ## Goal | ||
|
|
||
| Make a workspace a first-class object in the Web Shell sidebar: show what it | ||
| contains and whether it is healthy without opening a session, and put every | ||
| workspace-level action behind its own menu. This is layer A of the plan in the | ||
| issue — a frontend-only change on top of daemon routes that already exist. | ||
|
|
||
| ## Behavior | ||
|
|
||
| ### Folder header | ||
|
|
||
| - The header keeps its name, badges and git chip. It gains session counts at | ||
| its right edge: sessions waiting on the user (warning tone), sessions with a | ||
| prompt in flight (success tone), and the total. A total from a truncated | ||
| catalog page shows as `N+`. Collapsing a row disables its catalog query, so | ||
| the row keeps the last counts it computed: they stay visible while collapsed | ||
| and refresh on the next expand. | ||
| - The name carries the full path as a tooltip. While the section is expanded | ||
| the path is printed under the header. | ||
| - The Projects label shows the number of registered workspaces once there is | ||
| more than one. | ||
|
|
||
| ### Facet chips | ||
|
|
||
| While a trusted workspace is expanded, a chip row summarizes MCP servers | ||
| (`connected/enabled`), skills (enabled), extensions (active, or | ||
| `active/total` when they differ), channels (`connected/configured`) and | ||
| context files (count). Hooks are available but off by default. | ||
|
|
||
| - MCP, skills, context and hooks are discovered by the workspace's ACP child. | ||
| Until it reports `initialized`, the chip shows `—` and the tooltip says the | ||
| runtime is not initialized yet. A placeholder is never rendered as `0`. | ||
| - The MCP chip takes the warning tone when a server errored or discovery | ||
| finished with an enabled server still not connected; the channels chip when | ||
| an instance is in the error state. | ||
| - Below the sidebar's tight width the chips drop their text labels. | ||
| - Extensions and channels are daemon-side facets. When they are unknown the | ||
| daemon lacks the route or the fetch failed, so their tooltip says | ||
| "unavailable on this daemon" rather than "not initialized yet". | ||
| - Chips are read-only. Opening a management page is a menu action, so the | ||
| chips never take the button role and their accessible names cannot collide | ||
| with the navigation buttons that share the same words. | ||
|
|
||
| ### Workspace menu | ||
|
|
||
| The hover `⋮` on a workspace row replaces the single-item removal menu: | ||
|
|
||
| - Rename… (dynamic registration daemons; opens a dialog; an empty name falls | ||
| back to the folder name), Copy path, New task, New worktree task. | ||
| - Manage: MCP servers, Skills, Extensions, Channels, Settings, with the chip | ||
| counts next to the first four. | ||
| - Reload runtime (`POST /workspaces/:w/reload`), then Remove workspace. | ||
|
|
||
| Each entry appears only when the workspace's state allows it: untrusted rows | ||
| that cannot be removed still show nothing, locked-workspace renderers still | ||
| suppress the whole action area. | ||
|
|
||
| The Manage group is offered on the daemon's primary workspace only. The | ||
| management pages read the connection's bound workspace, so a secondary row | ||
| cannot open its own view yet; that is layer B1 of the issue. | ||
|
|
||
| ## Data flow | ||
|
|
||
| `useWorkspaceOverview(client, cwd, { enabled, items })` fans out over | ||
| `client.workspaceByCwd(cwd)` to `/mcp`, `/skills`, `/extensions`, | ||
| `/channels`, `/memory` and `/hooks`, one request per requested facet. Each | ||
| call fails independently — an older daemon without a route, or a transient | ||
| error, leaves that facet `undefined` and keeps the others. A facet keeps its | ||
| last known value across a failed round. | ||
|
|
||
| Fetching is gated on the section being expanded, the workspace trusted and the | ||
| default header rendered (a locked sidebar's custom header has no chip or menu | ||
| to feed), and polls every 30 s only while the document is visible, plus a | ||
| refetch on window focus and on the sidebar's reload token. Collapsed rows cost | ||
| nothing, and a synthetic fallback workspace without a real cwd is never asked. | ||
|
|
||
| Measured against the mock daemon (`npm run dev`, React StrictMode, 5 trusted | ||
| workspaces all expanded, tab visible): after the initial round the sidebar | ||
| issued 25 facet requests per 30 s tick — 50 over 60 s — next to the 33 | ||
| session-catalog and git-status requests the same rows already made in that | ||
| window. Without StrictMode the initial round is 25 requests, not 50. That is | ||
| the cost the layer-C overview endpoint collapses to 5 per tick. | ||
|
|
||
| Session counts come from the catalog page the row already lists; the primary | ||
| workspace, whose sessions the sidebar lists itself, gets its counts passed in. | ||
|
|
||
| ## Embedding | ||
|
|
||
| - `sidebar.workspaceOverview: false` keeps the plain folder headers; | ||
| `{ items: [...] }` selects the chips. | ||
| - `onOpenWorkspaceManagement(target, workspaceCwd)` and | ||
| `onNewWorktreeSession(workspaceCwd)` are new sidebar callbacks; the app | ||
| wires them to `openPanel` and to a new session armed with worktree intent. | ||
|
|
||
| ## Follow-ups (layers B and C in the issue) | ||
|
|
||
| - A Trust… menu entry. `POST /workspaces/:w/trust/request` only records a | ||
| request that needs operator action and a daemon restart | ||
| (`accepted: false, requiresOperatorAction: true`), so an entry today would | ||
| promise a change it cannot make; it needs an "operator action required" | ||
| feedback surface first. | ||
| - Bind the management pages to a chosen workspace so every row can open its | ||
| own MCP / Skills / Extensions view. | ||
| - A Workspaces overview page with a table across workspaces. | ||
| - `GET /workspaces/:w/overview` on the daemon to collapse the fan-out into one | ||
| request, advertised as `workspace_overview`, once the workspace-runtime | ||
| stack has landed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.