qwen-code/packages/web-shell/client
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
..
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 fix(web-shell): persist collapsed session group sections across reload (#6878) 2026-07-15 00:25:54 +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 fix(web-shell): persist collapsed session group sections across reload (#6878) 2026-07-15 00:25:54 +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): add extension management page (#6815) 2026-07-14 08:31:13 +00:00
App.test.tsx feat(web-shell): add extension management page (#6815) 2026-07-14 08:31:13 +00:00
App.tsx feat(web-shell): add extension management page (#6815) 2026-07-14 08:31:13 +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(web-shell): add extension management page (#6815) 2026-07-14 08:31:13 +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