mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-26 00:53:48 +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> |
||
|---|---|---|
| .. | ||
| acp-bridge | ||
| audio-capture | ||
| channels | ||
| chrome-extension | ||
| cli | ||
| core | ||
| cua-driver | ||
| desktop | ||
| desktop-shell | ||
| mobile-mcp | ||
| sdk-java | ||
| sdk-python | ||
| sdk-typescript | ||
| vscode-ide-companion | ||
| web-shell | ||
| web-templates | ||
| webui | ||
| zed-extension | ||