[Odometer] App stuck on E screen after refresh on confirm odometer page#88702
Conversation
|
@codex review |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 872259d9df
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@DylanDylann Fight with codex was won, so it's all yours now |
|
This message is a result of my discussion on Slack with @DylanDylann. Writing it up here so anyone picking this up later has the full arc - a lot of work went into analyzing the situation here as it was pretty confusing. Every time I thought I had figured out the possible root cause, new possible culprits seemed to jump out at me from every corner. I tried ti explain everything as clearly as possible below. Note TLDR. Three causes had to align for the freeze to happen:
The Part 1 - Initial thought process, and the recommended fix for this deploy blockerWhat I initially thoughtTwo pieces of code on the confirmation screen detect expired The two detection paths (pre-fix)
My initial theory was simple: two detectors racing each other on mount, both writing the same cleanup, leaves the confirmation screen stuck re-rendering on an inconsistent Onyx state. Made sense to me initially + the fix worked. But when I sat down to write the detailed explanation, I realized that something "seems off". What broke the theoryI added a direct The two alternating snapshotsState B seems off - That observation alone ruled out the race story - the bug is observable below those layers. But it didn't yet explain why Onyx ended up in that state. What's actually happening - three things stackingThree causes had to align. Removing any one of them prevents the freeze. Cause 1 - The race I introduced (duplicate detection paths)Two unsynchronized async detectors firing on mount and writing the same cleanup with no coordination. Why this qualifies as a textbook raceThe two detectors above ( Cause 2 - Timing change from PR #86958PR #86958 extracted side-effect components ( How the decomposition changed the batchingThe In the inlined version, all those effects ran inside a single component's effect phase, in the same microtask, so the setter writes batched into one Onyx emission cycle and the parent re-rendered once with all updates applied. After the refactor, the effects run in a child component ( Important I empirically confirmed this by reverting PR #86958 locally on top of current Cause 3 - A latent weakness in
|
|
🚧 @Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
There was a problem hiding this comment.
Testing well for me, I'm going to get this merged to unblock deploy. Would appreciate a better review from @DylanDylann later on though, we can follow up with changes if necessary
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
…pp_stuck_on_E_screen_after_refresh_on_confirm_odometer_page [Odometer] App stuck on E screen after refresh on confirm odometer page (cherry picked from commit a29af33) (cherry-picked to staging by Julesssss)
|
Deploy Blocker #89008 was identified to be related to this PR. |
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.3.62-13 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is an internal bug fix (race condition between blob URL verification and odometer image stitching) — no user-facing features, workflows, UI labels, or settings were added or changed. The existing Distance Expenses article already accurately describes the odometer flow. |
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.3.63-1 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.3.64-0 🚀
Bundle Size Analysis (Sentry): |
|
LGTM 💯 |
Explanation of Change
This PR fixes a freeze on the odometer confirmation screen after a browser refresh. Two mechanisms were racing to detect expired
blob URLs-useRestartOnOdometerImagesFailureand a pre-flight check insideOdometerReceiptStitcher- producing doubleclearOdometerDraftTransactionState+ navigation. The hook now owns recovery and exposeshasVerifiedBlobsand the stitcher waits on that flag. Duplicate pre-flight/redirect was removed.Fixed Issues
$ #88678
PROPOSAL: N/A
Tests
Regression check - happy path:
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
MacOS: Chrome / Safari
Screen.Recording.2026-04-24.at.13.13.01.mov