Fix real data loss: two catalog queries were silently truncating at 300 #2
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/catalog-data-loss"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Regression from the previous PR (#1), reported immediately after it merged: "les catalogues sont cassés, toutes les données sont pas la".
Confirmed directly against the real Emby server (read-only requests, no data changed) rather than guessed:
getArtistsgained a defensiveLimit: 300in #1, silently dropping 929 of them (75%).getLibraryItemsalready had aLimit: 300from before #1, silently dropping 121.Both limits removed. Confirmed empirically that Emby returns everything when
Limitis omitted (TotalRecordCountmatchedItems.lengthexactly for both cases) - the render-side concern that motivated capping in the first place is already handled by #1'srenderTilesInChunks, regardless of list size.While in there:
renderTilesInChunkswas scheduling its next chunk viarequestAnimationFrame, which browsers pause for a backgrounded/hidden tab - a real risk now that a list can run past a thousand items and take meaningfully longer to finish rendering. Switched tosetTimeout(fn, 0), which keeps running (throttled, never paused) in the background.Test plan
npm run typecheck/npm test/npm run buildon bothserver/andclient/(122/122 server tests)Limit→ Emby returns everything" behavior confirmed live against the real server🤖 Generated with Claude Code