Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$500] Android - User land to LHN instead of last chat conversation after close the app #28844

Closed
1 of 6 tasks
kbecciv opened this issue Oct 4, 2023 · 69 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Oct 4, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Login in NewDot
  2. Receive the notification
  3. Tap on notification 9you will land to DM)
  4. Close the app by swiping it up on Android to kill the process
  5. Open the app again

Expected Result:

User should land to the last open chat conversation instead of LHN

Actual Result:

User land to LHN instead of last chat conversation after close the app

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.77.5
Reproducible in staging?: y
Reproducible in production?: y
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
Notes/Photos/Videos: Any additional supporting documentation

Screen_Recording_20231004_130731_New.Expensify.mp4

Expensify/Expensify Issue URL:
Issue reported by: @quinthar
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696266288909289

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e651f821abc26b7e
  • Upwork Job ID: 1709617776124280832
  • Last Price Increase: 2023-10-11
  • Automatic offers:
    • dukenv0307 | Contributor | 27258740
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 4, 2023
@melvin-bot melvin-bot bot changed the title Android - User land to LHN instead of last chat conversation after close the app [$500] Android - User land to LHN instead of last chat conversation after close the app Oct 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01e651f821abc26b7e

@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

Triggered auto assignment to @flaviadefaria (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External)

@LovelyXinf
Copy link

Dear Expensify Team,

I am thrilled to have the opportunity to submit a proposal for the migration-related issue outlined in GitHub issue #28844. As an experienced React Native developer, I am confident that I can contribute to the unification of your front-end across platforms and solve the problems you are facing.

Proposal:
In my proposal, I will provide a technical explanation of the changes required to fix the issue mentioned in GitHub issue #28844. I understand the importance of delivering a reliable and secure system for processing financial transactions, which aligns with Expensify's goal of maintaining its reputation as an innovative leader in the finance industry. While I won't be able to submit the final code along with the proposal, I will outline the steps and approach I would take to address the problem effectively.

Review and Acceptance:
Once my proposal is reviewed and accepted by your team, I will post the proposal on Upwork as per your instructions. Upon acceptance on Upwork and my agreement to take on the job, I will then proceed with implementing the solution.

Code Submission:
After accepting the offer on Upwork, I will create a fork of your codebase from the Expensify/App GitHub repository. From there, I will create a branch to develop and test the necessary changes for the migration issue. Once the code is ready for review, I will submit a pull request to merge the changes into your codebase. I will ensure to include detailed documentation, screenshots, and confirmation that I have thoroughly tested the pull request on all supported platforms.

Contributor Guidelines:
Before submitting my proposal, I will carefully review your Contributor Guidelines located in CONTRIBUTING.md. It is important to me to adhere to your guidelines and expectations while working on this project.

Payment Timelines:
I acknowledge the payment amounts and timelines outlined in your CONTRIBUTING.md file. I understand that the amount of payment is variable and depends on when the pull request is merged and any potential regressions caused by my work. I commit to delivering high-quality code within the specified timelines to avoid penalties or contract termination.

Thank you for considering my proposal. I am excited about the opportunity to contribute to Expensify's success and help in unifying your front-end across platforms. Should you have any questions or require further clarification, please do not hesitate to reach out.

Best regards,
[Your Name]

@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

📣 @LovelyXinf! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@LovelyXinf
Copy link

Dear Expensify Team,

I am thrilled to have the opportunity to submit a proposal for the migration-related issue outlined in GitHub issue #28844. As an experienced React Native developer, I am confident that I can contribute to the unification of your front-end across platforms and solve the problems you are facing.

Proposal:
In my proposal, I will provide a technical explanation of the changes required to fix the issue mentioned in GitHub issue #28844. I understand the importance of delivering a reliable and secure system for processing financial transactions, which aligns with Expensify's goal of maintaining its reputation as an innovative leader in the finance industry. While I won't be able to submit the final code along with the proposal, I will outline the steps and approach I would take to address the problem effectively.

Review and Acceptance:
Once my proposal is reviewed and accepted by your team, I will post the proposal on Upwork as per your instructions. Upon acceptance on Upwork and my agreement to take on the job, I will then proceed with implementing the solution.

Code Submission:
After accepting the offer on Upwork, I will create a fork of your codebase from the Expensify/App GitHub repository. From there, I will create a branch to develop and test the necessary changes for the migration issue. Once the code is ready for review, I will submit a pull request to merge the changes into your codebase. I will ensure to include detailed documentation, screenshots, and confirmation that I have thoroughly tested the pull request on all supported platforms.

Contributor Guidelines:
Before submitting my proposal, I will carefully review your Contributor Guidelines located in CONTRIBUTING.md. It is important to me to adhere to your guidelines and expectations while working on this project.

Payment Timelines:
I acknowledge the payment amounts and timelines outlined in your CONTRIBUTING.md file. I understand that the amount of payment is variable and depends on when the pull request is merged and any potential regressions caused by my work. I commit to delivering high-quality code within the specified timelines to avoid penalties or contract termination.

Thank you for considering my proposal. I am excited about the opportunity to contribute to Expensify's success and help in unifying your front-end across platforms. Should you have any questions or require further clarification, please do not hesitate to reach out.

Best regards,
Lucas

@zahid0162
Copy link

zahid0162 commented Oct 4, 2023

Hi, I have a suggestion to fix this issue, we can save the last state of the app in the Shared Preferences e.g the last screen open when user click on the notification. After user kill the app and reopen it, we will get the saved state of app and then we will add check on it at the splash screen and will jump on the specific screen accordingly. This is the suggested solution that you have posted on upwork in Android Application

@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

📣 @zahid0162! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@zahid0162
Copy link

Contributor details
Your Expensify account email: zaidmuneer25@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~011067442982de300d

@melvin-bot
Copy link

melvin-bot bot commented Oct 4, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@dukenv0307
Copy link
Contributor

dukenv0307 commented Oct 5, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

User land to LHN instead of last chat conversation after close the app

What is the root cause of that problem?

We're not navigating to report screen (if report screen was the last screen opened) in small screen devices. In large screen device, the CentralPaneNavigator always shows so we always have the report screen open when opening the app.

There's also an issue where sometimes when opening the app again in wide screen, we're not going back to the last viewed report, which is being addressed separately in this issue.

What changes do you think we should make in order to solve the problem?

We should store a new local Onyx key like lastOnReportScreen to store whether the user's last page opened in the app is the report screen (before they close the app).

We'll set it to true when the ReportScreen gains focus (using useIsFocused), and to false when it loses focus.

In here, we should check lastOnReportScreen flag, if it's true, we navigate to the ROUTES.REPORT and early return

if (lastOnReportScreen) {
    Navigation.navigate(ROUTES.REPORT);
    return;
}

We should also check that the user is on the home route before this navigation, to avoid navigating user when they intend to deep link to another route.

Once we navigate to ReportScreen (without reportID param), the logic to find the last accessed report and open it is already handled here, so we're good.

What alternative solutions did you explore? (Optional)

NA

@maxconnectAbhi
Copy link

Proposal

Please re-state the problem that we are trying to solve in this issue

User land to LHN instead of last chat conversation after close the app

What is the root cause of that problem?

navigation to last opened report screen feature is missing

What changes do you think we should make in order to solve the problem?

  1. Make a function on conversation screen that can set the new local Onyx key like lastOnReportScreen:true when app is in background.
  2. Set the key lastOnReportScreen:false when user left the conversation screen by pressing back button / header back arrow icon.
  3. Check lastOnReportScreen flag, if it's true, we navigate to the ROUTES.REPORT and early return.
if (lastOnReportScreen) {
    Navigation.navigate(ROUTES.REPORT);
    return;
}

like above proposal

What alternative solutions did you explore? (Optional)

NA

@KarthickCk
Copy link

### Proposal

Data to store:

  • Chat id

###Storage:

  • we can use shared preference or encrypted shared preference to encrypt the chat id

Place to store:

  • Store the chat id in the chat screen
  • clear the chat id in the onDestroy of the chat screen, because onDestroy wont gets triggered when your clean the app from recent apps

Place to check:

  • On chat list screen check for the previous opened chat id from the shared preference, if its present then open the chat screen with the corresponding chat id

Contributor details
Upwork profile - https://www.upwork.com/freelancers/~01c7da601155f08c6b
Expensify id - karthickck0@gmail.com

@melvin-bot
Copy link

melvin-bot bot commented Oct 6, 2023

📣 @KarthickCk! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@KarthickCk
Copy link

Contributor details
Your Expensify account email: karthickck0@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01c7da601155f08c6b

@melvin-bot
Copy link

melvin-bot bot commented Oct 6, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@mollfpr
Copy link
Contributor

mollfpr commented Oct 9, 2023

@LovelyXinf @zahid0162 @KarthickCk Thank you for your interest in solving this issue. Please review our CONTRIBUTING.md to understand the process better here. Keep in mind that you ALWAYS post a proposal with the PROPOSAL_TEMPLATE.md to get your proposal reviewed.

@LovelyXinf

This comment was marked as off-topic.

@KarthickCk
Copy link

Proposal

Please re-state the problem that we are trying to solve in this issue

User land to LHN instead of last chat conversation after close the app

What is the root cause of that problem?

We are missing the state of the chat screen, as android kills the process and opens with the launcher activity again.

What changes do you think we should make in order to solve the problem?

Data to store - Chat id

Storage - we can use shared preference or encrypted shared preference to encrypt the chat id

  • Store the chat id in the chat screen and clear the chat id in the onDestroy of the chat screen, because onDestroy wont gets triggered when your clean the app from recent apps
  • On chat list screen check for the previous opened chat id from the shared preference, if its present then open the chat screen with the corresponding chat id

What alternative solutions did you explore? (Optional)

NA

@KarthickCk
Copy link

Contributor details
Your Expensify account email: karthickck0@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01c7da601155f08c6b

@melvin-bot
Copy link

melvin-bot bot commented Oct 9, 2023

⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

@mollfpr
Copy link
Contributor

mollfpr commented Oct 9, 2023

In here, we should check lastOnReportScreen flag, if it's true, we navigate to the ROUTES.REPORT and early return

@dukenv0307 Why do we need an early return here? And what is the reason we navigate the user on SidebarLinks?


Note: Before submitting a proposal on an issue, be sure to read any other existing proposals. ALL NEW PROPOSALS MUST BE DIFFERENT FROM EXISTING PROPOSALS. The difference should be important, meaningful or considerable.

https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#propose-a-solution-for-the-job

@maxconnectAbhi Please post a different proposal from the others.

@rushatgabhane
Copy link
Member

rushatgabhane commented Oct 20, 2023

@mountiny @mollfpr on native, why should the app open the most recent chat?

This is a feature request. I don't think we should proceed without a problem solution statement.
What do you think?

@dukenv0307
Copy link
Contributor

@mollfpr The issue is resolved by the PR, but it still has a bug that might affect the redirection when the user opens the app(Please note that the bug is not coming from my code changes )

Screen.Recording.2023-10-20.at.18.04.38.mp4

I think we could put it on hold since we also have a pending comment here

@mollfpr
Copy link
Contributor

mollfpr commented Oct 20, 2023

@mountiny @mollfpr on native, why should the app open the most recent chat?

@rushatgabhane You made me compare the behavior with WhatsApp 😄. WhatsApp doesn't show the latest opened chat after you killed the app.

I tried to find the reason but couldn't find the Slack thread for this reported issue.

This is a feature request. I don't think we should proceed without a problem solution statement.
What do you think?

Yes, this is a feature request. Do you mean without a proposal?

cc @mountiny


The issue is resolved by the PR, but it still has a bug that might affect the redirection when the user opens the app(Please note that the bug is not coming from my code changes )

@dukenv0307 Is this affecting the result of the PR?

@LovelyXinf
Copy link

LovelyXinf commented Oct 20, 2023 via email

@mountiny
Copy link
Contributor

I am not an android user myself so yeah I agree on getting agreement on the behaviour. From ios perspective it seems life to me to open LHN after closing the App.

Could you make a post in open source channel please to discuss

@LovelyXinf
Copy link

LovelyXinf commented Oct 20, 2023 via email

@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2023
@mountiny
Copy link
Contributor

cc @Julesssss could you please help, I am thinking of closeing this issue as I thin it makes sense the app opens in LHN after closing it

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@Julesssss
Copy link
Contributor

Yeah no worries, I put this at the top of my list to triage tomorrow.

@LovelyXinf
Copy link

LovelyXinf commented Oct 23, 2023 via email

@Julesssss
Copy link
Contributor

User should land to the last open chat conversation instead of LHN

Yeah, this is the same for Android. If the user or OS kills the app we should land on the top level page again (LHN).

@mollfpr
Copy link
Contributor

mollfpr commented Oct 24, 2023

@mountiny @Christinadobrzyn Are this issue will be compensated? Since we already assigned the contributor and @dukenv0307 is ready for the PR.

@mountiny
Copy link
Contributor

Ok this was a mistaek on our behalf and we should have caught it before, lets pay 25% so $125 to @mollfpr and @dukenv0307 for their efforts here but no reporting bonus as its not a valid bug

@mountiny mountiny reopened this Oct 25, 2023
@dukenv0307
Copy link
Contributor

@mountiny I believe this should be similar to previous precedents like this or this where the compensation should be 100%. Everything is pretty much done from our ends with lots of effort put into this, the PR is up as well.

@mountiny
Copy link
Contributor

Alright @Christinadobrzyn could you process this payment as full payment and no bonus hence $500

@LovelyXinf
Copy link

LovelyXinf commented Oct 28, 2023 via email

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Oct 30, 2023

Okay, can you double-check this payment structure is correct @mountiny @mollfpr

Payouts due:

Issue Reporter: NA
Contributor: $500 @dukenv0307 (Paid in Upwork)
Contributor+: $500 @mollfpr (manual request in NewExpensify)

Eligible for 50% #urgency bonus? N - based on #28844 (comment)

Upwork job is here.

@mollfpr
Copy link
Contributor

mollfpr commented Oct 30, 2023

@Christinadobrzyn I'll do manual request in NewDot, thank you!

@mountiny
Copy link
Contributor

sounds good to me

@Christinadobrzyn
Copy link
Contributor

Thanks, paid this out based on this payment structure - #28844 (comment)

Closing this as complete, please feel free to reach out with any questions

@JmillsExpensify
Copy link

$500 payment approved for @mollfpr based on this summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests