qwen-code/packages/web-shell/client/components
Shaojin Wen 55652d4912
fix(web-shell): keep split-view session list fresh and preserve panes across view switches (#6418)
* fix(web-shell): keep split-view session list fresh and preserve panes across view switches

The in-window split view's "add pane" picker read a stale session snapshot —
`useSessions` only fetches on mount — so sessions created after entering the
split never appeared. And switching away from the split and back cleared the
panes, because the live pane set lived in local state that died on unmount while
the seed it re-mounted from was never updated (and the no-arg "Open Split View"
button reset it to empty).

- Reload the picker list when it opens and when the parent's session-list reload
  token changes, so it never offers a removed session or misses a new one.
- Mirror the live pane set up to the app via onPanesChange so it survives
  SplitView unmounting; restore it (instead of reseeding empty) when the split is
  reopened without an explicit selection.

* test(web-shell): cover split-view refresh/restore per review; coalesce token reloads

Addresses review feedback on #6418:
- SplitView: skip a token-driven reload while one is already in flight, so a
  burst of session-list changes (bulk create/delete) doesn't fire a redundant
  concurrent round-trip per bump (matches the sidebar's poll guard).
- SplitView test: the freshness test now proves the picker re-renders with the
  refreshed list — a session appearing only after reload shows up — not just
  that reload() was called.
- App test: cover the openSplitView preserve/restore path end-to-end — a reported
  pane set survives leaving the split and is restored on reopen.

* fix(web-shell): reload split picker on every token bump (drop in-flight guard)

The in-flight guard added in the previous commit could drop a session-list
reload token that arrives while a reload is still running: the effect has
already run for that token value, and clearing the in-flight flag in `finally`
doesn't re-run it, so the picker could stay stale after burst create/delete/
rename activity — and the split has no polling fallback to recover.

Reload on every distinct token bump instead. `useDaemonResource` serializes
responses via its sequence counter (last write wins), so overlapping reloads are
correct, and the token is bumped only on discrete session-change events — an
occasional redundant fetch is far cheaper than a lost refresh.

* test(web-shell): cover openSplitView explicit-selection branch (dedupe + cap)

Per review: the restore branch of openSplitView was covered but the
explicit-selection branch (dedupe + MAX_SPLIT_PANES cap, replacing any prior
set) was only exercised, not asserted. Add a `?split=` URL test with duplicate
and over-cap ids that asserts the split seeds exactly the deduped, capped
selection.
2026-07-07 08:25:51 +00:00
..
dialogs feat(scheduled-tasks): run each task in its own dedicated, named session (#6389) 2026-07-07 06:22:36 +00:00
messages fix(web-shell): polish scheduled task timeline UI (#6386) 2026-07-07 04:04:28 +00:00
panels feat(web-shell): add mobile responsive view for TodoPanel (#5948) 2026-06-28 02:56:31 +00:00
sidebar feat(web-shell): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
AtMentionPanel.test.tsx feat(web-shell): add custom at mention panel (#6242) 2026-07-05 01:17:35 +00:00
AtMentionPanel.tsx feat(web-shell): add custom at mention panel (#6242) 2026-07-05 01:17:35 +00:00
ChatEditor.module.css feat(web-shell): add custom at mention panel (#6242) 2026-07-05 01:17:35 +00:00
ChatEditor.tsx fix(web-shell): finalize deferred gated submissions (#6342) 2026-07-05 14:21:27 +00:00
ChatPane.module.css feat(web-shell): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
ChatPane.test.tsx feat(web-shell): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
ChatPane.tsx feat(web-shell): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
composerTagIcons.test.ts feat(web-shell): support icon chips for mention tags (#6337) 2026-07-05 13:25:32 +00:00
composerTagIcons.ts feat(web-shell): support icon chips for mention tags (#6337) 2026-07-05 13:25:32 +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
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 fix(web-shell): refine tool detail cards (#6399) 2026-07-06 14:58:22 +00:00
MessageItem.tsx fix(web-shell): polish scheduled task timeline UI (#6386) 2026-07-07 04:04:28 +00:00
MessageList.dom.test.tsx fix(web-shell): polish scheduled task timeline UI (#6386) 2026-07-07 04:04:28 +00:00
MessageList.module.css fix(web-shell): polish scheduled task timeline UI (#6386) 2026-07-07 04:04:28 +00:00
MessageList.test.ts fix(web-shell): polish session timeline rail (#6171) 2026-07-02 12:04:24 +00:00
MessageList.tsx fix(web-shell): polish scheduled task timeline UI (#6386) 2026-07-07 04:04:28 +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): queue prompts while turns are running (#6005) 2026-06-30 14:51:28 +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): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
SessionOverviewPanel.test.tsx feat(web-shell): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
SessionOverviewPanel.tsx feat(web-shell): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
SplitView.module.css feat(web-shell): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
SplitView.test.tsx fix(web-shell): keep split-view session list fresh and preserve panes across view switches (#6418) 2026-07-07 08:25:51 +00:00
SplitView.tsx fix(web-shell): keep split-view session list fresh and preserve panes across view switches (#6418) 2026-07-07 08:25:51 +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 feat(web-shell): allow host to override streaming loading phrases (#5900) 2026-06-26 17:36:26 +00:00
StreamingStatus.tsx feat(web-shell): allow host to override streaming loading phrases (#5900) 2026-06-26 17:36:26 +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 fix(web-shell): localize remaining hardcoded UI strings (#5189) 2026-06-17 03:56:13 +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