[Part 3.4] Remove Onyx.connect(ONYXKEYS.SESSION) in ReportActionsUtils: thread currentUserAccountID through wasActionTakenByCurrentUser- #96702 - #97659
Conversation
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] |
|
@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: 3265cde457
ℹ️ 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".
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required.
|
lint/checklist failures. |
| /** | ||
| * Check if the current user is the requestor of the action | ||
| */ | ||
| // TODO: Remove optional (?) once all callers pass currentUserAccountID. Refactor issue: https://github.com/Expensify/App/issues/66408 |
There was a problem hiding this comment.
It's fine to remove this comment and just note it ourselves for now, but keep in mind that we haven't done this yet
There was a problem hiding this comment.
@truph01 Can we complete this in this PR? We're only missing one instance, and it looks easy
There was a problem hiding this comment.
@DylanDylann No, we can't do this in this PR. The remaining chain is wasActionTakenByCurrentUser → getLastMessageTextForReport, which involves a large number of changes.
|
@truph01 Please add test steps |
@DylanDylann I added test steps |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-08-12.at.16.40.37.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 danieldoglas 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/danieldoglas in version: 9.4.53-0 🚀
|
|
🤖 I reviewed the changes in this PR against Expensify's help site content under No help site changes are required. This PR is a pure internal refactor — it removes the module-level Since no changes are needed, I did not open a draft docs PR. |
Explanation of Change
This PR is part of removing
Onyx.connect(ONYXKEYS.SESSION)inReportActionsUtils.tsby making utility functions pure — passingcurrentUserAccountIDas a parameter instead of reading the module-level variable.It threads
currentUserAccountIDthrough thewasActionTakenByCurrentUsercall chains:Fixed Issues
$ #66408
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
MacOS: Chrome / Safari
Screen.Recording.2026-08-11.at.15.49.52.mov