perf(frontend): make transfer search and filtering deterministic at scale - #298
Open
woahwhattheheck wants to merge 2 commits into
Open
woahwhattheheck wants to merge 2 commits into
woahwhattheheck wants to merge 2 commits into
Conversation
Make transfer search and filtering deterministic at scale: every list request carries actor scope, obsolete in-flight queries are aborted, stable sort + result caps bound work, and stale responses cannot overwrite the active filter set.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #281
Summary
Transfer search and filtering now use actor-scoped, debounced, cancellable queries with stable sort semantics and a hard result cap so large histories stay correct and responsive.
What changed
transferSearchhelpers define canonical filter matching, newest-first sort withidtie-breaker, actor visibility (including legacy unscoped rows), query scope keys, and result capping (DEFAULT_RESULT_CAP/MAX_RESULT_CAP).listTransfersrequires actor scope on every request, accepts search/status/range/limit, honoursAbortSignal, and returns a stably sorted capped page.useTransfersaborts the previous in-flight list call when filters change and drops stale replies so a slow response cannot overwrite the active filter set.Transfersdebounces free-text search before updating the URL and driving the query; status/range still apply immediately. OptionalactorIdon the Transfer contract is stamped on create and seeds.Tradeoffs
MAX_RESULT_CAP.actorIdremain readable only under the demo actor during migration.Compatibility
actorIdon Transfer; existing fixtures without it still load for the demo actor.search,status,range) and pagination UI are unchanged.Test evidence
Coverage includes stale-response races, AbortSignal cancellation, actor scope isolation, result capping, pagination on a large fixture, and a 5k-row performance budget.
Out of scope
Ready for review