Repository navigation
[Part 3.2] Remove Onyx.connect(ONYXKEYS.SESSION) in ReportActionsUtils: thread currentUserAccountID through wasActionTakenByCurrentUser - #96702
Conversation
|
@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] |
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! 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". |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required
|
@DylanDylann Could you review it? |
|
@codex review |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-07-29.at.17.14.05.mov |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3193c152d8
ℹ️ 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".
| reportErrors, | ||
| transactions, | ||
| isOffline, | ||
| session?.accountID ?? CONST.DEFAULT_NUMBER_ID, |
There was a problem hiding this comment.
Recompute report attributes when session changes
When REPORT_ATTRIBUTES has already been computed and ONYXKEYS.SESSION later arrives or changes (for example during startup or after switching users), the incremental path above does not include session in needsFullRecompute or the updates list and returns the existing value when there are no report/transaction deltas. Since this new argument makes smartscan RBR attribution depend on session?.accountID, a first pass that used CONST.DEFAULT_NUMBER_ID or a previous account can leave the LHN Fix/RBR action stale until some unrelated report data changes; please force a full recompute on session-triggered computes or otherwise refresh the affected reports.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I don't think it's a problem
|
🚧 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.46-0 🚀
|
|
🤖 No help site changes required. This PR is a pure internal code refactor — it removes Why no docs update is needed
Since there are no user-facing changes, no draft help site PR was created. Let me know if you'd like me to reconsider any specific behavior. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.4.46-10 🚀
Bundle Size Analysis (Sentry): |
[Part 3.4] Remove Onyx.connect(ONYXKEYS.SESSION) in ReportActionsUtils: thread currentUserAccountID through wasActionTakenByCurrentUser- #96702
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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-07-13.at.16.54.29.mov