fix(scans): ignore stale polling responses#416
Conversation
utksh1
left a comment
There was a problem hiding this comment.
Good direction, but this cannot merge while frontend-checks are failing. Please fix the Scans polling test/typecheck failures after the latest main changes, keep the abort/sequence guard behavior, and rerun the full frontend check job before re-review.
|
Thanks for the review. I fixed the frontend-checks failure by updating the Scans phase test fetch fixtures to reflect successful responses after the new non-OK response handling. I also updated the branch with latest main and reran the full PR checks; artifact-check, formatting-hygiene, backend-lint, backend-tests, benchmark, and frontend-checks are all passing now. Could you please re-review when you get a chance? |
|
Current re-review note: frontend-checks are failing on the latest branch. Please fix the Scans polling test/typecheck failures after current main, keep the abort/sequence guard behavior, and rerun the full frontend check job before re-review. |
|
Thanks for checking again. I re-verified the latest branch state after syncing with current main, and GitHub currently shows all checks passing on this PR: artifact-check, backend-lint, backend-tests, benchmark, formatting-hygiene, and frontend-checks. I also reproduced the frontend-checks steps locally on the current branch:
I do not see a current failing frontend-checks run attached to this PR now. If you are seeing a different failing run, please point me to that job URL and I will inspect that exact log. |
Description
Prevents stale Scans page polling responses from overwriting the current task list after a newer request has already completed.
The Scans page now aborts superseded
/tasksrequests and uses a latest-request sequence guard before updating tasks, pagination, or loading state. This keeps polling, filter changes, page changes, and visibility refreshes from racing each other. I am contributing this under GSSoC.Related Issues
Closes #415
Type of Change
How Has This Been Tested?
npm test -- --run testing/unit/pages/Scans.polling.test.tsxnpm run typechecknpm run buildgit diff --checkNote: the existing Scans polling test suite emits React
act(...)warnings that were present during the targeted run, but all assertions pass.Checklist