[HOLD for Part 2.2] [Part 2.3] Remove Onyx.connect(ONYXKEYS.SESSION) in ReportActionsUtils: thread currentUserAccountID through isWhisperActionTargetedToOthers#96615
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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa440c398b
ℹ️ 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".
| return; | ||
| } | ||
| openReport({reportID: route.params.reportID, introSelected, betas}); | ||
| openReport({reportID: route.params.reportID, introSelected, betas, currentUserAccountID}); |
There was a problem hiding this comment.
Avoid sending the default account ID
On cold starts or deep links into this edit flow, useCurrentUserPersonalDetails() can still be its provider default (accountID: CONST.DEFAULT_NUMBER_ID, i.e. 0) while session data is hydrating. Because this effect intentionally runs only once, the newly added argument can pass 0 to openReport and never retry with the real account ID; downstream whisper visibility uses a provided account ID as authoritative, so the deprecated fallback cannot recover and guided-setup/last-visible-action data can be computed for the wrong user. Please wait for a hydrated account ID or pass undefined instead of the default value.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
There is no chance for this one to be appeared
|
This PR adds a new |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d69bd4b04
ℹ️ 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".
| introSelected, | ||
| isSelfTourViewed, | ||
| betas, | ||
| session?.accountID ?? CONST.DEFAULT_NUMBER_ID, |
There was a problem hiding this comment.
Avoid freezing the signed-out account ID for deep links
When a logged-out user opens a report deep link, this captures CONST.DEFAULT_NUMBER_ID before waitForUserSignIn() completes; openReportFromDeepLink() later uses that same value in the Concierge fallback when the linked report is missing or inaccessible. Since this effect only depends on sessionMetadata.status and the Link module's live session subscription was removed, the fallback can open/create Concierge for account 0 instead of the account that just signed in. Pass a live/ref-updated account ID or resolve it after sign-in rather than freezing the signed-out value here.
Useful? React with 👍 / 👎.
| let allReports: OnyxCollection<Report>; | ||
|
|
||
| let sessionAccountID: number | undefined; | ||
| Onyx.connectWithoutView({ |
There was a problem hiding this comment.
Please add a comment explaining why using connectWithoutView is ok in this case
|
No product review needed |
Explanation of Change
This PR threads
currentUserAccountIDthrough the following call chains as part of removingOnyx.connect(ONYXKEYS.SESSION)fromReportActionsUtils.ts: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
Screen.Recording.2026-07-21.at.15.36.43.mov