fix(verify,captures): resolve placeholder boxes and stuck loading whe… - #1227
Open
yasiru98 wants to merge 1 commit into
Open
fix(verify,captures): resolve placeholder boxes and stuck loading whe…#1227yasiru98 wants to merge 1 commit into
yasiru98 wants to merge 1 commit into
Conversation
…n filtering below page size
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.
Description
Verify.jswas concatenating real images with placeholder boxes during loading. When fewer results thanpageSizewere returned, unfilled placeholder slots remained visible after loading completed.api.getCaptureImagesintry/finallyinVerifyContext.jssosetIsLoading(false)always runs, even when a request is aborted. Previously the missing error handling causedisLoadingto staytruepermanently, keeping all 24 placeholder boxes on screen indefinitely.Verify.jsfrom concatenating real images with placeholders to an either/or. Meaning, during loading show placeholders only, after loading show real images only.queryCapturesApiintry/finallyinCapturesContext.jssosetIsLoading(false)always runs, even when the request throws. Previously the missing error handling caused the loading spinner in the Captures table to stay visible permanently.Issue(s) addressed
What kind of change(s) does this PR introduce?
Please check if the PR fulfils these requirements
Issue
What is the current behavior?
Filtering captures to fewer than 24 results causes grey placeholder boxes to appear and stay on screen permanently instead of the actual capture images. This is most commonly triggered by applying a filter while a previous request is still in-flight, which aborts the request and leaves
isLoadingstuck astrue. The same stuck-loading bug affects the Captures module, where the loading spinner persists permanently if the API request throws.What is the new behavior?


Only the actual capture images are shown after loading completes in Verify, with no leftover placeholder boxes. In Captures, the loading spinner correctly clears after the request settles.
Breaking change
Does this PR introduce a breaking change?
No.
Other useful information
Root cause in Verify:
loadCaptureImagesinVerifyContext.jshad notry/finally, so when a fetch was aborted (e.g. rapid filter changes),setIsLoading(false)was never reached andisLoadingremainedtrueindefinitely. Combined withVerify.jsconcatenating real images with placeholder boxes, this resulted in all 24 placeholder boxes staying on screen even after loading completed with fewer results.Root cause in Captures:
getCapturesAsyncinCapturesContext.jshad the same missingtry/finally, so any thrown error during the api request would leaveisLoadingstuck attrueand the spinner visible permanently.