Revert floating badge, remove debug logs
The floating version badge scrolled awkwardly and wasn't necessary now that the bind-mount/deploy issue is fixed. The existing ml-version inside the Sidebar is sufficient. Also removed the temporary [INV_DEBUG] console logs from useLiveData and InventoryWindow — the inventory live-update bug is confirmed fixed. Kept the per-character inventoryVersions fix and the cache-buster on the refetch URL. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
73e204c82b
commit
f7f04d6a84
18 changed files with 26 additions and 49 deletions
|
|
@ -75,14 +75,15 @@ export function useLiveData(): DashboardState {
|
|||
const r = msg as RareMessage;
|
||||
setRecentRares(prev => [r, ...prev].slice(0, 50));
|
||||
} else if (msg.type === 'inventory_delta') {
|
||||
const d = msg as unknown as { character_name: string; action?: string };
|
||||
console.log('[INV_DEBUG] inventory_delta received', { char: d.character_name, action: d.action });
|
||||
const d = msg as unknown as { character_name: string };
|
||||
// Bump ONLY this character's inventory version so an open window for
|
||||
// that character re-fetches. Deltas for other characters don't touch
|
||||
// it, which keeps the 2s debounce in InventoryWindow from being reset
|
||||
// forever by unrelated chatter.
|
||||
if (d.character_name) {
|
||||
setInventoryVersions(prev => {
|
||||
const next = new Map(prev);
|
||||
const newVer = (next.get(d.character_name) ?? 0) + 1;
|
||||
next.set(d.character_name, newVer);
|
||||
console.log('[INV_DEBUG] bumped version', { char: d.character_name, newVer });
|
||||
next.set(d.character_name, (next.get(d.character_name) ?? 0) + 1);
|
||||
return next;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue