Repository navigation
Refactor updateMoneyRequestDistance to remove ONYXKEYS.COLLECTION.TRANSACTION usages - #81736
Conversation
|
@ikevin127 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] |
|
@danieldoglas 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: d3720710c3
ℹ️ 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".
| } else { | ||
| data = getUpdateMoneyRequestParams({ | ||
| transactionID, | ||
| transactionID: transaction?.transactionID, |
There was a problem hiding this comment.
Keep using the route transaction ID for distance edits
updateMoneyRequestDistance() now builds the request from transaction?.transactionID, but the manual and odometer edit screens pass transaction from withFullTransactionOrNotFound before that hook necessarily has a loaded Onyx value. Those screens do not block on isLoadingTransaction and explicitly render with shouldShowNotFoundPage={false}, so on a cold start or deep link into an edit flow the user can press Save while transaction is still undefined. Before this refactor the route param still produced a valid update; now both getUpdateMoneyRequestParams() and getUpdateTrackExpenseParams() receive an undefined transactionID, so the server edit is dropped until hydration finishes.
Useful? React with 👍 / 👎.
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.
|
|
No product review needed |
|
Bump @ikevin127 |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-03-24.at.16.57.50.mov |
ikevin127
left a comment
There was a problem hiding this comment.
🟢 LGTM
The PR successfully achieves its goal of removing ONYXKEYS.COLLECTION.TRANSACTION direct access. The refactoring is clean and follows project patterns.
Strong Points:
- ✅ Correctly follows the anti-pattern removal goal
- ✅ All callers properly updated
- ✅ Tests updated and passing
- ✅ Type-safe implementation
|
cc: @tgolen |
|
🚧 @tgolen 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/tgolen in version: 9.3.51-0 🚀
Bundle Size Analysis (Sentry): |
|
👋 I reviewed the changes in this PR against the help site files under No help site changes are required. This PR is a purely internal code refactoring — it changes the
The existing help site articles that cover distance expenses (e.g., |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.3.51-10 🚀
|
Explanation of Change
Fixed Issues
$ #66510
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
22.03.2026_11.15.37_REC.mp4