qwen-code/packages/web-shell/client/components
samuelhsin c8290f8e49
fix(web-shell): persist collapsed session group sections across reload (#6878)
* fix(web-shell): persist collapsed session group sections across reload

Store collapsed section ids in localStorage using the existing
qwen-code-web-shell-* key namespace, and skip the first catalog sync
auto-collapse so restored expand/collapse state survives remount.

Fixes QwenLM/qwen-code#6870

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(web-shell): clarify collapsed-groups demo GIF storyboard

Crop to the sidebar, caption the four beats (expand → collapse →
reload → still collapsed), and keep Pinned out of the organized
session list mock so the Backend collapse is obvious.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(web-shell): address collapsed-groups CR feedback

Export the storage key for unit tests, use an explicit first-catalog
latch instead of size===0, and cover corrupt/disabled storage plus
mid-session auto-collapse of newly appeared sections.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(web-shell): harden collapsed-groups persistence for CR feedback

Wait for groups+sessions catalog settlement before the initial latch,
persist secondary-workspace collapse via shared namespaced localStorage,
and keep primary/workspace writers from clobbering each other.

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor(web-shell): drop demo-capture tooling from collapsed-groups test

The committed GIF, capture script, and frame-assembly helper only served
the PR description's embedded image and were referenced by nothing else
in the repo; the CAPTURE_DEMO branches in the e2e spec were pure
screenshot staging with no assertions. The remaining spec still covers
every acceptance criterion of #6870 and keeps its @smoke tag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014KuV2hx2ZqEqdRwsJz4KJH

* fix(web-shell): keep collapse latch armed until catalogs settle successfully

Two paths could consume the first-sync latch against a partial catalog
and then auto-collapse (and persist over) the user's restored expansions:
a failed initial sessions/groups request counted as settled, and a
mid-session organization_enabled flip let the auto-collapse effect run
one commit before the groups gate closed. Errors no longer settle either
readiness gate, and the gate now closes during the flip render itself.

Also drop the WorkspaceSection reload effect and exhaustive-deps
suppression that defended a workspace.id change which cannot happen (the
render site keys the component by workspace id), and import the storage
key in tests from collapsedSessionSections directly instead of
re-exporting it through WebShellSidebar.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014KuV2hx2ZqEqdRwsJz4KJH

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-07-15 00:25:54 +00:00
..
artifacts feat(web-shell): add artifact right panel (#6591) 2026-07-11 00:13:49 +00:00
dialogs feat(web-shell): add extension management page (#6815) 2026-07-14 08:31:13 +00:00
extensions feat(web-shell): add extension management page (#6815) 2026-07-14 08:31:13 +00:00
messages Revert "fix(shell): mark non-zero exits as failed (#6869)" (#6875) 2026-07-14 09:12:52 +00:00
panels feat(web-shell): add bottom status items (#6613) 2026-07-09 14:58:39 +00:00
sidebar fix(web-shell): persist collapsed session group sections across reload (#6878) 2026-07-15 00:25:54 +00:00
ui feat(web-shell): add extension management page (#6815) 2026-07-14 08:31:13 +00:00
AtMentionPanel.test.tsx feat(web-shell): add context mention customization (#6578) 2026-07-10 08:46:43 +00:00
AtMentionPanel.tsx feat(web-shell): add shadcn UI foundation (#6760) 2026-07-12 13:51:52 +00:00
ChatEditor.module.css fix(web-shell): make composer height adaptive (#6872) 2026-07-14 11:38:29 +00:00
ChatEditor.test.tsx fix(web-shell): make composer height adaptive (#6872) 2026-07-14 11:38:29 +00:00
ChatEditor.tsx fix(web-shell): remove duplicate useWebShellPortalRoot import in ChatEditor (#6890) 2026-07-14 13:17:32 +00:00
ChatPane.module.css fix(web-shell): align split view chat interactions (#6633) 2026-07-10 04:19:42 +00:00
ChatPane.test.tsx feat(web-shell): flesh out the multi-workspace split view (cross-workspace sessions, workspace labels, responsive layout) (#6746) 2026-07-12 11:55:21 +00:00
ChatPane.tsx feat(web-shell): flesh out the multi-workspace split view (cross-workspace sessions, workspace labels, responsive layout) (#6746) 2026-07-12 11:55:21 +00:00
Editor.keymap.test.ts feat(web-shell): add Option+Enter and Cmd+Enter newline shortcuts (#5005) 2026-06-12 13:07:56 +08:00
Editor.module.css fix(web-shell): use theme color for @ group titles (#6294) 2026-07-04 03:16:01 +00:00
ErrorBoundary.test.tsx feat(web-shell): add error boundaries so a render crash can't white-screen the embed (#5943) 2026-06-28 01:12:42 +00:00
ErrorBoundary.tsx feat(web-shell): add error boundaries so a render crash can't white-screen the embed (#5943) 2026-06-28 01:12:42 +00:00
GitBranchIndicator.test.tsx feat(web-shell): modernize multi-workspace sidebar (#6804) 2026-07-13 11:45:20 +00:00
GitBranchIndicator.tsx feat(web-shell): modernize multi-workspace sidebar (#6804) 2026-07-13 11:45:20 +00:00
InsightProgress.module.css fix(web-shell): fix InsightProgress layout and clean up UI elements (#6115) 2026-07-01 09:00:57 +00:00
InsightProgress.tsx feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
InsightReady.tsx feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
MessageItem.dom.test.tsx feat(web-shell): add assistant turn footer slot (#6611) 2026-07-10 03:37:05 +00:00
MessageItem.tsx feat(web-shell): render composer references in user messages (#6537) 2026-07-11 17:44:47 +00:00
MessageList.dom.test.tsx feat(web-shell): add assistant turn footer slot (#6611) 2026-07-10 03:37:05 +00:00
MessageList.module.css feat(web-shell): add mobile welcome composer slots (#6584) 2026-07-11 01:33:32 +00:00
MessageList.test.ts feat(web-shell): add artifact right panel (#6591) 2026-07-11 00:13:49 +00:00
MessageList.tsx feat(web-shell): add shadcn UI foundation (#6760) 2026-07-12 13:51:52 +00:00
MessageLocateFlash.module.css fix(web-shell): polish scheduled task timeline UI (#6386) 2026-07-07 04:04:28 +00:00
MessageTimestamp.module.css feat(web-shell): polish chat UI and table rendering (#6099) 2026-07-01 16:20:19 +08:00
MessageTimestamp.test.tsx feat(web-shell): show message time on hover (#5079) 2026-06-13 15:30:44 +08:00
MessageTimestamp.tsx feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
ModeIcon.module.css feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
ModeIcon.tsx feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
PromptChevron.tsx feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
QueuedPromptDisplay.test.tsx feat(web-shell): queue prompts while turns are running (#6005) 2026-06-30 14:51:28 +00:00
QueuedPromptDisplay.tsx feat(web-shell): render composer references in user messages (#6537) 2026-07-11 17:44:47 +00:00
RootErrorFallback.test.tsx feat(web-shell): add error boundaries so a render crash can't white-screen the embed (#5943) 2026-06-28 01:12:42 +00:00
RootErrorFallback.tsx feat(web-shell): add error boundaries so a render crash can't white-screen the embed (#5943) 2026-06-28 01:12:42 +00:00
SessionOverviewPanel.module.css feat(web-shell): flesh out the multi-workspace split view (cross-workspace sessions, workspace labels, responsive layout) (#6746) 2026-07-12 11:55:21 +00:00
SessionOverviewPanel.test.tsx feat(web-shell): modernize multi-workspace sidebar (#6804) 2026-07-13 11:45:20 +00:00
SessionOverviewPanel.tsx feat(web-shell): add workspace path lock (#6853) 2026-07-14 06:24:52 +00:00
SplitView.module.css feat(web-shell): flesh out the multi-workspace split view (cross-workspace sessions, workspace labels, responsive layout) (#6746) 2026-07-12 11:55:21 +00:00
SplitView.test.tsx feat(web-shell): add workspace path lock (#6853) 2026-07-14 06:24:52 +00:00
SplitView.tsx feat(web-shell): add workspace path lock (#6853) 2026-07-14 06:24:52 +00:00
StatusBar.module.css feat(web-shell): friendlier Esc interruption + queued-prompt UX (#6025) 2026-06-30 01:27:16 +00:00
StatusBar.tsx feat(web-shell): friendlier Esc interruption + queued-prompt UX (#6025) 2026-06-30 01:27:16 +00:00
StreamingStatus.module.css feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
StreamingStatus.test.tsx fix(cli): align memory dialog with managed memory (#6434) 2026-07-09 01:04:56 +00:00
StreamingStatus.tsx fix(web-shell): hide rotating loading phrase in split-view pane status (#6447) 2026-07-07 11:32:59 +00:00
Tips.module.css feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
Tips.tsx feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
ToastHost.module.css fix(web-shell): improve disconnected composer handling (#6166) 2026-07-02 07:05:55 +00:00
ToastHost.tsx Add harness infrastructure for web-shell package (#6517) 2026-07-09 08:11:58 +00:00
toolbarDropdown.test.ts feat(web-shell): improve composer model selector (#6758) 2026-07-12 11:28:58 +00:00
toolbarDropdown.ts feat(web-shell): improve composer model selector (#6758) 2026-07-12 11:28:58 +00:00
TurnCollapseRow.module.css feat(web-shell): polish chat UI and table rendering (#6099) 2026-07-01 16:20:19 +08:00
WelcomeHeader.module.css feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
WelcomeHeader.tsx feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
WorkspaceIndicator.tsx feat(web-shell): flesh out the multi-workspace split view (cross-workspace sessions, workspace labels, responsive layout) (#6746) 2026-07-12 11:55:21 +00:00
WorkspaceSessionProvider.tsx feat(web-shell): add workspace path lock (#6853) 2026-07-14 06:24:52 +00:00
WorkspaceUnavailableState.tsx feat(web-shell): modernize multi-workspace sidebar (#6804) 2026-07-13 11:45:20 +00:00