MosswartOverlord/frontend
Erik d26f1f725c Fix inventory window never refreshing live (per-character version)
The inventoryVersion counter in useLiveData was a single global value that
bumped on every inventory_delta for any character. With 60+ active chars
all generating deltas, the global counter advanced multiple times per
second.

InventoryWindow's debounce effect watched this global counter, so every
bump reset its 2-second fetch timer. Since bumps arrived faster than 2s,
the fetch never fired — the window appeared frozen until the user closed
and reopened it (which triggered the initial-fetch effect).

Fix: make inventoryVersions a Map<string, number> keyed by character name.
Each inventory_delta now only bumps its own character's counter, so an
open window's debounce correctly fires 2s after its character's last
delta, ignoring unrelated traffic.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:57:55 +02:00
..
public perf(v2): 8 optimizations — 24% smaller bundle, fewer re-renders 2026-04-14 12:11:08 +02:00
src Fix inventory window never refreshing live (per-character version) 2026-04-15 18:57:55 +02:00
.gitignore feat: v2 dashboard — React + Vite parallel implementation 2026-04-12 15:07:11 +02:00
index.html perf(v2): 8 optimizations — 24% smaller bundle, fewer re-renders 2026-04-14 12:11:08 +02:00
package-lock.json feat: major cleanup + death alerts + idle detection + Discord webhooks 2026-04-14 16:32:14 +02:00
package.json feat: major cleanup + death alerts + idle detection + Discord webhooks 2026-04-14 16:32:14 +02:00
tsconfig.json feat: v2 dashboard — React + Vite parallel implementation 2026-04-12 15:07:11 +02:00
tsconfig.tsbuildinfo feat: major cleanup + death alerts + idle detection + Discord webhooks 2026-04-14 16:32:14 +02:00
vite.config.ts feat: major cleanup + death alerts + idle detection + Discord webhooks 2026-04-14 16:32:14 +02:00