Open m-natarajan opened 2 weeks ago
Triggered auto assignment to @MitchExpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
User lands on concierge instead of the LHN
from here we get lastAccessedReport
https://github.com/Expensify/App/blob/dc1e79ddca73eed372f52b346a9ff4802d47ec4f/src/libs/navigateAfterOnboarding.ts#L24
and then in here, we navigate to it
https://github.com/Expensify/App/blob/dc1e79ddca73eed372f52b346a9ff4802d47ec4f/src/libs/navigateAfterOnboarding.ts#L37
The problem is the findLastAccessedReport
function will return the concierge report as the last accessed report.
To exclude it, we can pass conciergeChatReportID
as the fourth parameter here, ensuring we always navigate to the LHN, except in cases where the public room was opened first.
https://github.com/Expensify/App/blob/dc1e79ddca73eed372f52b346a9ff4802d47ec4f/src/libs/navigateAfterOnboarding.ts#L24
We can retrieve the concierge ID either by passing it as a prop or by implementing something like this
let conciergeChatReportID: string | undefined;
Onyx.connect({
key: ONYXKEYS.CONCIERGE_REPORT_ID,
callback: (value) => (conciergeChatReportID = value),
});
Based on this issue, https://github.com/Expensify/App/issues/52018 there seems to be an inconsistency regarding the expected behavior of where a user should land after completing onboarding
Job added to Upwork: https://www.upwork.com/jobs/~021857485391551648841
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External
)
The expected bahevior is to land in LHN
Edited by proposal-police: This proposal was edited at 2024-11-26 09:13:08 UTC.
In Step 5, user is redirected to LHN after completing onboarding when "Manage my team's expenses" is selected.
If we select Manage team's expenses
, a WS and a WS chat are created
Then lastAccessedReport
is the WS chat of the onboarding policy. In the small screen, shouldUseNarrowLayout
is true
so the user lands on LHN
If we select another purpose, the lastAccessedReport
is the concierge chat so the user lands in the concierge chat
We should return early here if the lastAccessedReport
is the concierge. So this will only move to the lastAccessedReport
in case we sign in with a public room.
if (ReportUtils.isConciergeChatReport(lastAccessedReport)) {
return;
}
Optional: Another thing, we already return early if isSmallScreenWidth
is false
here
And if isSmallScreenWidth
is true
, shouldUseNarrowLayout
is always true
and this condition is always false
so we can remove this block.
https://github.com/Expensify/App/blob/664f8261b585b89b7b2b5d677b5bcdd4293e4444/src/libs/navigateAfterOnboarding.ts#L30-L32
If we want to do that we can merge ReportUtils.isConciergeChatReport(lastAccessedReport)
to this line. After all, we can have a cleaner function like this
Navigation.dismissModal();
// When hasCompletedGuidedSetupFlow is true, OnboardingModalNavigator in AuthScreen is removed from the navigation stack.
// On small screens, this removal redirects navigation to HOME. Dismissing the modal doesn't work properly,
// so we need to specifically navigate to the last accessed report.
if (!isSmallScreenWidth) {
return;
}
const lastAccessedReport = ReportUtils.findLastAccessedReport(!canUseDefaultRooms, shouldOpenOnAdminRoom(), activeWorkspaceID);
const lastAccessedReportID = lastAccessedReport?.reportID;
// we don't want to navigate to newly creaded workspace after onboarding completed.
if (!lastAccessedReportID || lastAccessedReport.policyID === onboardingPolicyID || ReportUtils.isConciergeChatReport(lastAccessedReport)) {
return;
}
const lastAccessedReportRoute = ROUTES.REPORT_WITH_ID.getRoute(lastAccessedReportID ?? '-1');
Navigation.navigate(lastAccessedReportRoute);
I created a proposal in this issue https://github.com/Expensify/App/issues/52018 and bring it here since it's the same issue.
@mollfpr any thoughts on which proposal to go with?
The expected bahevior is to land in LHN
@MitchExpensify @danielrvidal For clarification could you list the expected in the below purposes whether LHN or Concierge?
Its the same (LHN) for all, right @danielrvidal ?
I think we should navigate to the concierge chat for all cases because we can have some tasks created in the concierge chat from the onboarding flow. Then the user can see the task after the onboarding flow if we navigate to the concierge chat.
cc @danielrvidal
I think we should navigate to the concierge chat for all cases because we can have some tasks created in the concierge chat from the onboarding flow.
@mkzie2 Interesting, but the flow for "Something else" doesn't create tasks in the concierge, why do we need to navigate to the concierge in that case?
@mollfpr We want to be consistent for all onboarding flow so I suggest navigating to the concierge chat with the reason above.
The expected bahevior is to land in LHN
@mollfpr The expected result is that the user should land on the LHN. The previous issue (https://github.com/Expensify/App/issues/52018) was closed because the expected result provided at the time was incorrect.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Yea, we want them to land on the inbox in the LHN rather than in the concierge DM because it's the home screen. We have a tooltip and GBR that direct them to go to the Concierge chat next.
Edited by proposal-police: This proposal was edited at 2024-11-24 18:13:44 UTC.
After the onboarding flow , user lands on the Concierge chat, instead of inbox or home page.
we are navigating to the last accessed report.
based on: https://github.com/Expensify/App/issues/52420#issuecomment-2489751301 and https://github.com/Expensify/App/issues/52420#issuecomment-2496132484
it seems, here: https://github.com/Expensify/App/blob/67784196d8b2ec3621aff6b5fe4007f6be7c07e8/src/libs/navigateAfterOnboarding.ts#L37
we can simply write:
Navigation.navigate(ROUTES.HOME);
I think we can totally replace these two lines: https://github.com/Expensify/App/blob/f4f8da74c100f2c5ddb666ff4314038010104cbf/src/pages/OnboardingAccounting/BaseOnboardingAccounting.tsx#L172 and https://github.com/Expensify/App/blob/f4f8da74c100f2c5ddb666ff4314038010104cbf/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx#L75
with
Navigation.dismissModal();
Navigation.navigate(ROUTES.HOME);
What do you think about the latest proposal @mollfpr ?
@mollfpr @MitchExpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@mollfpr, @MitchExpensify Huh... This is 4 days overdue. Who can take care of this?
Thank you guys for the proposals!
we are navigating to the last accessed report.
@Shahidullah-Muffakir Your RCA doesn't have much explanation, and your solution will not work with sign in from deeplink.
So to conclude, the solution from @Nodebrute and @mkzie2 has the same which to avoid navigating to the concierge chat report. The solution from @Nodebrute needs access to Onyx to get the concierge reportID so it needs more lines of code to define the Onyx value and add more parameters to the function, but the @mkzie2 solution only needs to check whether the lastAccessedReport is concierge chat and return early. So I suggest we go with @mkzie2 solution because the changes is straight forward.
🎀 👀 🎀 C+ reviewed!
Triggered auto assignment to @MariaHCD, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
❌ There was an error making the offer to @mkzie2 for the Contributor role. The BZ member will need to manually hire the contributor.
@mkzie2 what is your Upwork profile?
@MitchExpensify It's https://www.upwork.com/freelancers/~019f73367b03c6d784
Thanks, offer sent @mkzie2 !
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.60-1 Reproducible in staging?: y Reproducible in production?: y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @shawnborton Slack conversation (hyperlinked to channel name): [expensify_convert] (https://expensify-ts.slack.com/archives/C07HPDRELLD/p1731430243357459)
Action Performed:
Expected Result:
User lands in LHN
Actual Result:
User lands in Concierge
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mollfpr