velxio/frontend/src
davidmonterocrespo24 7f0f72862c fix: regenerate components-metadata + plug vitest worker leak
Two CI failures landed together on master after PR #194 merged:

1. **components-metadata.json stale.** The `power-supply` thumbnail
   in scripts/component-overrides.json was updated (grey placeholder
   → branded PSU SVG with voltage/current labels) but the generated
   JSON wasn't regenerated. The pre-merge check
   `git diff --quiet frontend/public/components-metadata.json` now
   fails on master. Fix: `cd frontend && npm run generate:metadata`,
   commit the result.

2. **Frontend Tests > test (20/22): vitest worker hang.**
   `circuit-simulation-service.test.ts` had been calling
   `service.start()` in ~10 tests without storing the returned
   unsubscribe handle. Each call subscribes the service to the
   simStore; the listener captures the service + scheduler in
   its closure. After all tests complete, vitest's forks pool
   tries to terminate the worker but the still-active listeners
   keep the event loop pinned, producing:
       "Worker exited unexpectedly / Timeout terminating forks worker"
   All assertions actually pass — only the worker shutdown hangs.

   Fix: introduce a `startTracked(service)` helper that records
   the unsubscribe in a module-level array, plus an `afterEach`
   that drains the array. `__resetMixedModeScheduler()` still runs
   after to dispose the scheduler singleton. Replaced all 9 raw
   `service.start()` callsites.

Both are independent of any production code change. The fix is
test/scaffolding only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 15:38:22 +02:00
..
__pro_stub__
…
__tests__ fix: regenerate components-metadata + plug vitest worker leak 2026-05-19 15:38:22 +02:00
assets
…
components feat(editor): Monaco syntax highlight for 8080/Z80 assembly 2026-05-19 00:49:51 -03:00
data feat(chips): C-to-Z80 compile via SDCC + LED chaser example 2026-05-19 00:31:10 -03:00
hooks
…
i18n
…
lib
…
pages feat(board-options): per-board options modal + persistence 2026-05-18 21:50:45 -03:00
services feat(chips): C-to-Z80 compile via SDCC + LED chaser example 2026-05-19 00:31:10 -03:00
simulation feat(chips): programmable retro CPU chips with external ROM 2026-05-18 23:38:18 -03:00
store Merge pull request #193 from davidmonterocrespo24/esp32-cleanup-broadcast-pwm 2026-05-18 23:23:05 -03:00
tokens
…
types fix(spice+pipeline): LED visualization, INPUT_PULLUP, ESP32-C3, PWM fade, examples 2026-05-18 21:52:07 -03:00
utils feat(board-options): per-board options modal + persistence 2026-05-18 21:50:45 -03:00
velxio-elements
…
App.css
…
App.tsx
…
entry-server.tsx
…
index.css
…
main.tsx
…
seoRoutes.ts
…
vite-env.d.ts
…