[Odometer] Blob URL loss detection#86023
Draft
jakubkalinski0 wants to merge 30 commits intoExpensify:mainfrom
Draft
[Odometer] Blob URL loss detection#86023jakubkalinski0 wants to merge 30 commits intoExpensify:mainfrom
jakubkalinski0 wants to merge 30 commits intoExpensify:mainfrom
Conversation
…stitching_to_confirmation_page
…stitching_to_confirmation_page
…stitching_to_confirmation_page
…stitching_to_confirmation_page
…RequestConfirmationListFooter
…stitching_to_confirmation_page
…o_confirmation_page' into jakubkalinski0/Odometer_add_backup_transaction_for_editing_from_confirmation
…ing_from_confirmation' into jakubkalinski0/Odometer_blob_url_loss_detection
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.
Explanation of Change
PR #86022 has to be merged before we can go ahead with this one
Blob URLs (
blob://...) live only in browser memory. A page refresh destroys them. Attempting to stitch with expired blobs would fail.Two safeguards are in place:
useRestartOnOdometerImagesFailurehook (mounted onIOURequestStepDistanceOdometer): on mount, callscheckIfLocalFileIsAccessiblefor each blob URL stored in the transaction (start image, end image, stitched receipt). If any are unreachable and the request type isDISTANCE_ODOMETER, it clears all odometer data (images, readings, receipt, draft transactions) and navigates back to the start step.IOURequestStepConfirmation: before callingstitchOdometerImages, the stitching effect re-verifies all local blob URLs. If expired, it clears the transaction and navigates to the start step without ever showing a broken image.Fixed Issues
$ #84707
PROPOSAL: N/A
Tests
"Replace""Distance"to land on the odometer screen and refresh the browser page"Distance"to land on the odometer screen and tap one of the odometer images to open the image preview"Distance"to land on the odometer screen and tap one of the odometer images to open the image preview and press"Replace"Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Only web
MacOS: Chrome / Safari