qwen-code/packages
易良 8a34d3eee1
test(web-shell): pin silent failure of background artifact refreshes (#7427) (#9227)
* 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>
2026-08-16 15:29:58 +00:00
..
acp-bridge fix(serve): Bound ACP HTTP pre-attach buffers by bytes (#9007) 2026-08-16 11:59:23 +00:00
audio-capture chore(release): v0.21.11 (#9054) 2026-08-13 05:41:43 +00:00
channels feat(web-shell): redesign Channel policy and workspace management (#8848) 2026-08-14 07:41:44 +00:00
chrome-extension chore(release): v0.21.11 (#9054) 2026-08-13 05:41:43 +00:00
cli test(review): close confirmed pin gaps from #9194 (batch 1) (#9225) 2026-08-16 15:29:44 +00:00
core fix(review): keep the presubmit overlap list out of the canonical findings artifact (#9268) 2026-08-16 15:09:22 +00:00
cua-driver chore(cua-driver): sync upstream v0.17.0 (#8564) 2026-08-05 07:00:36 +00:00
desktop fix(desktop): reserve scrollbar gutter so sidebar rows don't jitter (#9073) 2026-08-13 10:00:25 +00:00
desktop-shell fix(desktop): bridge Electron users on Windows and Linux (#9079) 2026-08-13 15:42:31 +00:00
mobile-mcp
sdk-java fix: add structured error code to SessionNotFoundError for session-closing retry (#8884) 2026-08-11 13:01:25 +00:00
sdk-python fix(core): resolve Qwen 3.8 reasoning budget conflicts (#8525) 2026-08-12 01:49:01 +00:00
sdk-typescript fix(serve): Bound ACP HTTP pre-attach buffers by bytes (#9007) 2026-08-16 11:59:23 +00:00
vscode-ide-companion feat(review): apply the huge round reduction only when the run has a clock (#9203) 2026-08-16 03:26:59 +00:00
web-shell test(web-shell): pin silent failure of background artifact refreshes (#7427) (#9227) 2026-08-16 15:29:58 +00:00
web-templates chore(release): v0.21.11 (#9054) 2026-08-13 05:41:43 +00:00
webui feat(web-shell): support text file attachments in the composer (#9180) 2026-08-15 16:34:20 +00:00
zed-extension