mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-25 16:44:36 +00:00
* test(web-shell): pin silent failure of background artifact refreshes (#7427) The toast-spam behavior reported in #7427 no longer exists on main — loadArtifacts carries no notice dispatch and the hook swallows background-refresh failures, keeping the last-good artifacts. What was missing is a regression pin: add one that fails a background refresh and asserts last-good artifacts survive, loading clears, no error surfaces, and the next refresh recovers. Mutation-verified: clearing artifacts in the catch turns it red. * test(web-shell): cover artifact refresh triggers * test(web-shell): tighten artifact refresh assertions * test(web-shell): settle artifact-refresh mocks via deferred awaits (#7427) The two regression tests added here flushed their mocked refreshes with a single microtask, so under full-suite parallel load the hook's refresh continuation intermittently missed the React commit and the last-good assertions saw artifacts === [] — a signature indistinguishable from a real #7427 regression. Model every mocked load as a deferred and resolve/reject + await it inside act, the shape the file's pre-existing tests already use (review round, 7 fragile flush sites). Also fold in two review pins while the tests are being rewritten: - R2-2: the superseded-failure test now rejects the stale load while the superseding load is still in flight and asserts loading stays true — the requestId guard in the finally cleanup becomes load-bearing (mutation-verified: dropping the guard fails the test). - add a waiting -> idle settling-trigger test so the prompt guard cannot be specialized to 'streaming' ('waiting' is a real prompt status). * test(web-shell): pin the version bookkeeping and owner-guard halves (#7427) - Non-monotonic artifactsVersion sequence (1->2->1 from a non-zero start) with exact loadArtifacts call counts: killing the previous-value bookkeeping silently skips the refresh that returns to a previously-seen version (stale artifacts panel, suite green) — measured mutant. - Owner-flip supersede variant: the provider flips isCurrent() the instant the session switches, before a re-render; an in-flight load resolving in that window passes the requestId half and only the !owner.isCurrent() half of the guard stops it from painting the previous session's artifacts — deleting that half left all prior tests green (measured). * test(web-shell): pin superseded artifact successes --------- Co-authored-by: yiliang114 <yiliang114@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| adapters | ||
| assets/icons | ||
| completions | ||
| components | ||
| config | ||
| constants | ||
| e2e | ||
| extensions | ||
| hooks | ||
| lib | ||
| live | ||
| session-catalog | ||
| styles | ||
| test | ||
| utils | ||
| voice | ||
| App.module.css | ||
| App.test.tsx | ||
| App.tsx | ||
| build-artifact.test.ts | ||
| customization.tsx | ||
| i18n.tsx | ||
| index-html.test.ts | ||
| index.html | ||
| index.test.tsx | ||
| index.tsx | ||
| interactionBlockContext.ts | ||
| main.test.tsx | ||
| main.tsx | ||
| midTurnDedup.test.ts | ||
| midTurnDedup.ts | ||
| monitorDetailsContext.tsx | ||
| portalRoot.ts | ||
| shadowDom.test.ts | ||
| shadowDom.ts | ||
| subagentDetailsContext.tsx | ||
| themeContext.ts | ||
| transcriptRenderMode.ts | ||
| vite-config.test.ts | ||
| vite-env.d.ts | ||