fix: Register report pagination after app reload - #98876
Draft
chrispader wants to merge 1 commit into
Draft
Conversation
Contributor
Author
|
@MelvinBot create an issue in the format of a problem/solution for this PR, assign me to it and link it in this PR. |
Contributor
|
🤖 Created a problem/solution issue for this PR and linked it here. Issue: Report actions fail to paginate after clearing Onyx cache and reloading — assigned to
I also filled in the |
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
Report-action pagination registration was tied to the splash screen becoming hidden. Hybrid app reloads do not always replay that splash-state transition, so after clearing Onyx and reloading, the pagination middleware could start with no report-action configuration.
OpenReportresponses would then skip creating the report-action page metadata, preventingGetOlderActionsfrom being requested at the top of a report.This moves the existing lazy pagination-registration import into universal app setup, immediately after
Onyx.init(). App setup runs for every JavaScript runtime on native and web, while retaining the existing lazy chunk and avoiding extra startup-bundle work.Fixed Issues
$ #98902
Tests
GetOlderActionsis requested and older actions load.Automated validation completed:
tests/unit/AppSetupTest.tsandtests/ui/PaginationTest.tsxNative manual validation remains pending. The cached Hybrid iOS build stayed on its native splash, and the cached Hybrid Android build attempted to load an asset bundle instead of the isolated Metro bundle even with the reverse mapping configured. The registration call was temporarily removed during diagnosis and did not change the iOS startup hang, so this appears unrelated to the patch.
Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Before fix:
After fix:
iOS: Native
Before fix:
PaginationReloadBugRepro.mov
After fix: