Onyx.connect() removal for ONYXKEYS.COLLECTION.REPORT_METADATA in ReportUtils.ts#87719
Onyx.connect() removal for ONYXKEYS.COLLECTION.REPORT_METADATA in ReportUtils.ts#87719ShridharGoel wants to merge 1 commit intoExpensify:mainfrom
Conversation
|
|
372d9a4 to
1999986
Compare
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 199998678e
ℹ️ 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".
b721585 to
53039a0
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53039a0fc0
ℹ️ 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".
53039a0 to
e5cbd78
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5cbd78358
ℹ️ 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".
| } | ||
|
|
||
| const lastAccessedReport = findLastAccessedReport(!canUseDefaultRooms, shouldOpenOnAdminRoom() && !shouldPreventOpenAdminRoom, undefined, archivedReportsIdSet); | ||
| const lastAccessedReport = findLastAccessedReport(!canUseDefaultRooms, shouldOpenOnAdminRoom() && !shouldPreventOpenAdminRoom, undefined, archivedReportsIdSet, allReportMetadata); |
There was a problem hiding this comment.
Pass report metadata in all onboarding completion paths
findLastAccessedReport() now depends on allReportMetadata to honor lastVisitTime, but this function still accepts undefined and silently falls back to lastReadTime/owner ordering. Existing onboarding callers that were not updated (for example, paths that call navigateAfterOnboardingWithMicrotaskQueue(...) without the new argument) will therefore route users to a different report than the true last visited one when no onboarding admins room is available.
Useful? React with 👍 / 👎.
| } | ||
|
|
||
| const reportMetadata = reportMetadataParam ?? getReportMetadata(report?.reportID); | ||
| const reportMetadata = reportMetadataParam; |
There was a problem hiding this comment.
Keep group-chat name filtering when metadata isn't passed
This removes the metadata fallback inside getGroupChatName(), so callers that still pass only report now ignore pendingChatMembers deletions. A concrete case is the group-chat icon name path (getIconsForGroupChat), which still calls getGroupChatName without metadata; during optimistic member removal, the removed participant can remain in the rendered group name until backend sync finishes.
Useful? React with 👍 / 👎.
Explanation of Change
Removed the
Onyx.connect()subscription forONYXKEYS.COLLECTION.REPORT_METADATAfromsrc/libs/ReportUtils.ts.Report metadata is now passed into utility/action helpers from component-level
useOnyx()calls, so the shared helpers do not read that collection directly. This also lowers the lint warning budget by one.Fixed Issues
$ #66421
PROPOSAL:
Tests
Offline tests
QA Steps
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