Repository navigation
refactor filterReportsByPolicyIDAndMemberAccountIDs - #79940
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] |
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 considerations. Removing my review |
| } | ||
|
|
||
| const initialReport = ReportUtils.findLastAccessedReport(!isBetaEnabled(CONST.BETAS.DEFAULT_ROOMS), shouldOpenOnAdminRoom()); | ||
| const initialReport = ReportUtils.findLastAccessedReport(!isBetaEnabled(CONST.BETAS.DEFAULT_ROOMS), conciergeReportID, shouldOpenOnAdminRoom()); |
There was a problem hiding this comment.
@dukenv0307 conciergeReportID may not be loaded yet when this is executed.
There was a problem hiding this comment.
I noticed this issue also occurs on main (with Onyx.connect) in some cases. However, since Onyx.connect can sometimes return values faster than useOnyx, this change could cause a regression.
There was a problem hiding this comment.
@DylanDylann Thanks for your feedback. I think this is a common problem, and I wonder how we've handled it, so I can apply the same approach
There was a problem hiding this comment.
Please raise a discussion on #quality channel to discuss this
There was a problem hiding this comment.
My thought is to retrigger this logic once conciergeReportID is set. Because this value should be fixed for the account.
There was a problem hiding this comment.
After checking again, I realize that we don't pass policyID to findLastAccessedReport anywhere, so it's safe to remove policyID. If there is no policyID, we can also remove conciergeReportID
|
@DylanDylann It's ready for review |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-02-04.at.18.25.56.mov |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #66411 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
@dukenv0307 Could you merge the new main? |
|
cc @tgolen |
| const isSelected = selectedFeatures.includes(item.id); | ||
| return ( | ||
| <PressableWithoutFeedback | ||
| sentryLabel={CONST.SENTRY_LABEL.ONBOARDING.FEATURE_ITEM} |
There was a problem hiding this comment.
Is this change necessary for this PR? It seems unrelated.
There was a problem hiding this comment.
This fixes the ESLint failure. We recently integrated Sentry into the codebase, so the Sentry label is now required for some components.
|
|
||
| const policyMemberAccountIDs = getPolicyEmployeeListByIdWithoutCurrentUser(allPolicies, policyID, currentUserAccountID); | ||
|
|
||
| function findLastAccessedReport(ignoreDomainRooms: boolean, openOnAdminRoom = false, excludeReportID?: string): OnyxEntry<Report> { |
There was a problem hiding this comment.
I just want to make sure that I'm following this change correctly, because, if we aren't careful, this looks like it could cause some regressions.
- The
policyIDparam is optional. - There are no places in the code which pass the
policyID - Therefore, all the logic using
policyIDare safe to remove
Is that right?
There was a problem hiding this comment.
Nice, all right. Sounds like a good change then. Thanks for cleaning it up!
|
@dukenv0307 Conflict ^^^ |
|
@DylanDylann Done |
|
@tgolen Is this ready to merge? |
|
It was! Then it picked up another conflict @dukenv0307 |
|
@dukenv0307 Can you please fix the conflicts? |
|
@tgolen I merged main |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/tgolen in version: 9.3.18-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.18-8 🚀
|
Explanation of Change
Fixed Issues
$ #66411
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
Screen.Recording.2026-01-20.at.09.36.16.mov