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
|
|
@ -71,7 +71,6 @@ export const MapLayout: React.FC<Props> = ({ data }) => {
|
|||
socket={data.socketRef.current} />
|
||||
<RareNotification recentRares={data.recentRares} />
|
||||
<DeathNotification deathAlerts={data.deathAlerts} />
|
||||
{version && <div className="ml-version-badge">v{version}</div>}
|
||||
</div>
|
||||
</WindowManagerProvider>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -181,17 +181,12 @@ export const InventoryWindow: React.FC<Props> = ({ id, charName, zIndex, invento
|
|||
|
||||
// Debounced re-fetch on inventory_delta (no loading flash)
|
||||
useEffect(() => {
|
||||
console.log('[INV_DEBUG] InventoryWindow effect', { charName, inventoryVersion, initialDone: initialLoadDone.current });
|
||||
if (!initialLoadDone.current || !inventoryVersion) return;
|
||||
clearTimeout(debounceRef.current);
|
||||
debounceRef.current = window.setTimeout(() => {
|
||||
console.log('[INV_DEBUG] debounce fired, fetching', charName);
|
||||
apiFetch<any>(`/inventory/${encodeURIComponent(charName)}?limit=1000&_t=${Date.now()}`)
|
||||
.then(inv => {
|
||||
console.log('[INV_DEBUG] fetch result', { char: charName, count: (inv.items ?? []).length });
|
||||
setItems((inv.items ?? []).map(normalizeItem));
|
||||
})
|
||||
.catch(err => console.log('[INV_DEBUG] fetch failed', err));
|
||||
.then(inv => setItems((inv.items ?? []).map(normalizeItem)))
|
||||
.catch(() => {});
|
||||
}, 2000); // 2s debounce — batch rapid deltas
|
||||
return () => clearTimeout(debounceRef.current);
|
||||
}, [charName, inventoryVersion]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue