v2.1.2 - Debug Dashboard + memory-leak fix
AiDex v2.1.2 — Debug Dashboard + memory-leak fix
Feature + stability release. Adds the live Debug Dashboard and closes the WebSocket memory leak that the v2.1.0/2.1.1 fixes had missed.
✨ Debug Dashboard (Panel API)
A live, fixed-slot dashboard alongside the scrolling log stream. Programs POST /panel with { id, type, value, group? } — sending the same id again overwrites the value in place instead of scrolling away. Built for high-frequency / repeated values (audio levels, buffer fill, FPS, sensors).
- Four widget types:
label,progress(warn/crit colouring),gauge(radial tachometer in the MSI Afterburner / HWiNFO style, or a pulsing status LED),plot(real-time line graph with grid + min/max/avg). - Endpoints:
POST /panel,POST /panels(batch),POST /panel/clear. Last state is kept perid, so a reconnecting Viewer gets the full snapshot immediately; idle cards grey out as "stale". - New Debug tab in the Viewer (Tokyo-Night look), rAF-throttled plots, backpressure-guarded broadcasts.
- Showcase demo:
node scripts/demo-dashboard.mjsanimates every widget type (audio waveform, GPU gauges, a sine→sawtooth→triangle→square signal generator, latency spikes). A ▷ Demo button on the tab copies the run command to your clipboard.
🐛 Fixes
- WebSocket backpressure leak in
broadcastTreeUpdate— the dominant leak the v2.1.0/2.1.1 fixes missed. On actively-changing projects, full tree broadcasts (~0.5 MB/frame) backed up ws's send-queue without bound → 50+ GB committed. Now guarded (drop + counter + rate-limited log), same as the log/task paths. Also guardsbroadcastFocusTab. - Dashboard layout flicker and plot-stats overlap (a
curvalue with its unit ran into the next stat) — both fixed with fixed-height, non-wrapping stat cells and a stable grid baseline.
✅ Tested
Build green; backpressure proofs (test-backpressure.mjs, test-tree-backpressure.mjs); panel layer covered by test-panel-store.mjs (25 checks) and test-panel-http.mjs (8 checks).
📦 Install
npm install -g aidex-mcp@2.1.2
Already-running MCP servers need a reconnect to pick up the fix.