Repository navigation
decompose ReportScreen 6b: extract fetch controller - #86719
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
c2f19a2 to
851d8be
Compare
|
@codex review |
|
@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: 851d8be6ee
ℹ️ 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".
3062eaa to
fa8b14d
Compare
fa8b14d to
7f10d58
Compare
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
| fetchReport(); | ||
| }, [fetchReport]); |
There was a problem hiding this comment.
Hmmmm... Is it safe to remove this call?
There was a problem hiding this comment.
ReportFetchHandler has a useEffect that fires fetchReport() whenever reportActionIDFromRoute changes (below). Clearing the param via setParams triggers that effect, so the explicit fetchReport() call here was redundant.
useEffect(() => {
// This function is triggered when a user clicks on a link to navigate to a report.
// For each link click, we retrieve the report data again, even though it may already be cached.
// There should be only one openReport execution per page start or navigating
fetchReport();
}, [route, isLinkedMessagePageReady, reportActionIDFromRoute]);does it break any test steps for you?
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-04-01.at.00.34.07.movAndroid: mWeb ChromeScreen.Recording.2026-04-01.at.00.30.39.moviOS: HybridAppScreen.Recording.2026-04-01.at.00.31.19.moviOS: mWeb SafariScreen.Recording.2026-04-01.at.00.29.29.movMacOS: Chrome / SafariScreen.Recording.2026-04-01.at.00.27.37.mov |
|
🚧 @rlinoz 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.3.51-0 🚀
Bundle Size Analysis (Sentry): |
|
I have failed to help you. I let you down and for that I am sorry. Please try again later. This may be due to a Claude outage (check here). Failure details: https://github.com/Expensify/Expensify/actions/runs/23817067905 |
|
This PR is failing for iOS due to #86919. |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.3.51-10 🚀
|
Explanation of Change
PR 6b in the ReportScreen decomposition series (6a → 6b → 6c → 6d).
Extracts
ReportFetchControllerfromReportScreen.tsx:useRoute()useEffectEventfor React Compiler compliancePure extraction — no behavior change.
Fixed Issues
$ #84895
Tests
Data fetching (ReportFetchController)
Re-fetch triggers
reportActionID— verify the linked message is scrolled toLeaving events
General regression
Offline 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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari