qwen-code/packages/web-shell/client
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
..
adapters fix(daemon): preserve user message source metadata (#6385) 2026-07-07 07:08:28 +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): keep split-view session list fresh and preserve panes across view switches (#6418) 2026-07-07 08:25:51 +00:00
config feat(browser-ext): revive Chrome extension via daemon-direct architecture (#5777) 2026-06-28 15:57:31 +00:00
constants feat(web-shell): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
extensions feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
hooks feat(web-shell): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
styles feat(web-shell): show Settings and Daemon Status as an in-place panel (#6341) 2026-07-06 05:06:46 +00:00
utils feat(web-shell): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
voice feat(web-shell): polish chat UI (#5893) 2026-06-26 15:38:23 +00:00
App.module.css feat(web-shell): add Session Overview panel and in-window split view (#6400) 2026-07-07 02:44:18 +00:00
App.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
App.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
build-artifact.test.ts refactor(web-shell): restructure chat UI (#5775) 2026-06-23 22:43:19 +08:00
customization.tsx fix(web-shell): refine tool detail cards (#6399) 2026-07-06 14:58:22 +00:00
i18n.tsx feat(scheduled-tasks): run each task in its own dedicated, named session (#6389) 2026-07-07 06:22:36 +00:00
index.html fix(web-shell): mobile UX — safe areas, overscroll, native-app feel (#6142) 2026-07-02 12:12:39 +00:00
index.test.tsx fix(web-shell): defer session creation until first prompt (#6066) 2026-07-01 14:04:37 +00:00
index.ts feat(web-shell): support icon chips for mention tags (#6337) 2026-07-05 13:25:32 +00:00
index.tsx feat(web-shell): support compact echarts full data blocks (#6232) 2026-07-04 15:36:54 +00:00
main.tsx fix(web-shell): mobile UX — safe areas, overscroll, native-app feel (#6142) 2026-07-02 12:12:39 +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
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