Repository navigation
[NoQA] Prevent report details crash when route parameters are missing - #106910
Conversation
Co-authored-by: Vit Horacek <mountiny@users.noreply.github.com>
|
🤖 Android test steps verification results: Standalone Android NewDot was accessible, but neither details route was reached; all requested checks remain blocked. Screenshots document the blocker, not successful test cases.
|
|
🤖 Web test steps verification results: All four checks were blocked on dev NewDot web; no functional pass is claimed. Source was unchanged.
view run · no recording available |
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ 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". |
|
@MelvinBot review |
|
🤖 Web test steps verification results: Verification on dev NewDot web was blocked by tooling and fixture limitations. No UI pass/fail conclusion is established.
Code review: No actionable findings. The defensive parameter access prevents the reported crash while preserving the existing guard behavior. Automated verification: Both focused Jest suites passed—49 tests total. The production navigation trigger remains unconfirmed. |
|
(Vit's agent) @MelvinBot please extend this fix to withReportOrNotFound.tsx#L79-L83 runs Please:
|
Co-authored-by: Vit Horacek <mountiny@users.noreply.github.com>
|
🤖 Web test steps verification results: Verification was blocked on dev NewDot web: the existing browser session rendered a blank page, and no app-tool session was available. No reload or restart was attempted.
Implemented and pushed in d66e50f8:
Passed: 38 focused tests, full Jest suite (39,687 tests), typecheck, changed-file lint, formatting, Storybook smoke test, and code review. Limitations: repository-wide lint/compiler checks timed out; changed-file wrappers hit shallow-history errors. Explicit compiler checking reproduced identical pre-existing ref errors. Details are recorded in the PR. view run · no recording available |
|
|
|
@nyomanjyotisa 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 madmax330 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/madmax330 in version: 9.5.41-0 🚀
|
|
No help site update needed — this PR prevents crashes when route parameters are missing without adding a feature, changing a workflow, or making existing article instructions incorrect. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.41-2 🚀
Bundle Size Analysis (Sentry): |






Explanation of Change
Safely read optional route parameters before rendering report details so malformed routes cannot throw before the existing loading/not-found guard runs. Only create details content when a report ID exists; allow a null guard child instead of defaulting an absent ID to an empty string. The guard's runtime decision logic is unchanged.
Regression tests mount the actual page with omitted and empty parameters across unset, active, and finished global loading states, and cover valid report loading, fetching, content, and deletion transitions. Restoring the unsafe parameter access makes all three omitted-parameter cases fail with the reported TypeError.
The same defensive handling now covers
withReportOrNotFound: absent route parameters fall back to an empty object before checkingnotificationReportID. Shared regression cases mount both the details page and an HOC-wrapped page with omitted/empty parameters across all three global loading states. Notification-report ID precedence and the existing loading/not-found decisions are unchanged.AI Tests
Cannot use 'in' operator to search for 'notificationReportID' in undefined.Fixed Issues
$ #106883
PROPOSAL: #106883 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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
Not yet tested — needs manual QA.
Android: mWeb Chrome
Not yet tested — needs manual QA.
iOS: Native
Not yet tested — needs manual QA.
iOS: mWeb Safari
Not yet tested — needs manual QA.
MacOS: Chrome / Safari
Not yet tested — needs manual QA.