fix(wasm): re-land eeschema-switch nav from 3dcfea5e45 + de-flake sim run-tool poll

kicad bump: re-apply only the nav hunk of 3dcfea5e45 (the 7/20 backout
92f18ef4ed was aimed at the WebGL GAL recovery/flush but took the nav
with it, breaking web/tool-switch.spec.ts on both engines since).

eeschema-sim spec: the Run tool's ENABLE(!simRunning) is a wxUpdateUIEvent
condition the WASM port only re-evaluates on input events — after a run
finishes the toolbar can hold its stale "running" state past the 60s
poll (CI 29846684031: run finished, Run still disabled). Nudge the mouse
inside the poll so the condition re-evaluates.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01APzCH3oxjLrZk6Nxepvczz
This commit is contained in:
Gergő Törcsvári 2026-07-22 10:40:55 +02:00
commit d3200e464c
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
2 changed files with 9 additions and 2 deletions

2
kicad

@ -1 +1 @@
Subproject commit 91c9732e64a165c5d24aefc443b93af198b26774
Subproject commit d06f653f0edc18b1f7cc6e52d0bb3be426a5cefa

View file

@ -75,9 +75,16 @@ async function runSimulation(page: import('@playwright/test').Page): Promise<voi
// The simulator window div appears while the frame ctor is still
// suspended in the init RPC; the toolbar registers its tools only after
// init completes and the frame first paints.
// init completes and the frame first paints. The Run tool's
// ENABLE(!simRunning) condition is a wxUpdateUIEvent check, and the WASM
// port only reliably re-evaluates those when input events pump the loop —
// after a run finishes, the last input was the click that started it, so
// nudge the mouse each poll or the toolbar can hold its stale
// "running" state forever.
await expect
.poll(async () => {
await page.mouse.move(4, 4);
await page.mouse.move(8, 8);
const el = await findByTooltip(page, 'Run Simulation', { elementType: 'tool' });
return !!el && el.enabled;
}, { timeout: 60000 })