mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-07-22 23:44:11 +00:00
* 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. |
||
|---|---|---|
| .. | ||
| adapters | ||
| assets/icons | ||
| completions | ||
| components | ||
| config | ||
| constants | ||
| extensions | ||
| hooks | ||
| styles | ||
| utils | ||
| voice | ||
| App.module.css | ||
| App.test.tsx | ||
| App.tsx | ||
| build-artifact.test.ts | ||
| customization.tsx | ||
| i18n.tsx | ||
| index.html | ||
| index.test.tsx | ||
| index.ts | ||
| index.tsx | ||
| main.tsx | ||
| midTurnDedup.test.ts | ||
| midTurnDedup.ts | ||
| themeContext.ts | ||
| vite-env.d.ts | ||