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

[Due for payment 2025-02-18] [$250] Private notes - User profile details page changes to room details page when it is a 1:1 DM #56189

Closed
4 of 8 tasks
lanitochka17 opened this issue Jan 31, 2025 · 18 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 31, 2025

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.93-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): applausetester+9056910@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Open 1:1 DM
  3. Click on the chat header
  4. Click Private notes
  5. Refresh the page
  6. Enter anything and click save
  7. Click RHP back button

Expected Result:

User profile details page will open

Actual Result:

User profile details page changes to room details page when it is a 1:1 DM

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6729757_1738346617527.20250201_020059.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021886385710041780738
  • Upwork Job ID: 1886385710041780738
  • Last Price Increase: 2025-02-03
  • Automatic offers:
    • FitseTLT | Contributor | 105976705
Issue OwnerCurrent Issue Owner: @laurenreidexpensify
@lanitochka17 lanitochka17 added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Jan 31, 2025
Copy link

melvin-bot bot commented Jan 31, 2025

Triggered auto assignment to @laurenreidexpensify (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.

@FitseTLT
Copy link
Contributor

FitseTLT commented Jan 31, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-01-31 19:08:45 UTC.

Proposal

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

Private notes - User profile details page changes to room details page when it is a 1:1 DM

What is the root cause of that problem?

We are always going back to REPORT_WITH_ID_DETAILS here

onBackButtonPress={() => Navigation.goBack(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(report.reportID, backTo))}

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

We can re-utilize goBackToDetailsPage to properly handle going back to profile page when it is a one-to-one chat after updating its logic to go back to report details page instead of settings page with an additional param

function goBackToDetailsPage(report: OnyxEntry<Report>, backTo?: string, shouldGoBackToDetailsPage = false) {
    const isOneOnOneChatReport = isOneOnOneChat(report);
    const participantAccountID = getParticipantsAccountIDsForDisplay(report);

    if (isOneOnOneChatReport) {
        Navigation.goBack(ROUTES.PROFILE.getRoute(participantAccountID.at(0), backTo));
        return;
    }

    if (report?.reportID) {
        if (shouldGoBackToDetailsPage) {
            Navigation.goBack(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(report?.reportID, backTo));
        } else {
            Navigation.goBack(ROUTES.REPORT_SETTINGS.getRoute(report.reportID, backTo));
        }
    } else {
        Log.warn('Missing reportID during navigation back to the details page');
    }
}
                onBackButtonPress={() => goBackToDetailsPage(report, route.params.backTo, true)}

On a related note: I see a related bug on PrivateNotesEditPage where if there was an existing private note and you open the private note edit page and refresh and remove the note and save it navigates to the profile page but on pressing back it will come back to the edit page which might not be a desired behaviour. This happens because we use navigateToDetailsPage instead of goBackToDetailsPage which will not remove the edit page from stack so we fix this too.

ReportUtils.navigateToDetailsPage(report, backTo);

            ReportUtils.goBackToDetailsPage(report, backTo, true);

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N / A

What alternative solutions did you explore? (Optional)

Currently ReportUtils.goBackFromPrivateNotes handles going back from private note edit page but we can optionally update it to handle navigating back from private note list page and use it instead but the whole idea is the same.

Copy link
Contributor

github-actions bot commented Feb 2, 2025

⚠️ @Kalydosos Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

@Kalydosos
Copy link
Contributor

Proposal

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

the private notes panel returns to room details page instead of the user profile details page when it is a 1:1 DM

What is the root cause of that problem?

There is no explicite backTo route from Profile page to Private notes list page and we always returns the current report details page whether we are coming from the report or the profile page

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

We should set the backTo route from Profile page to Private notes list page here

from

onPress={() => navigateToPrivateNotes(report, session, navigateBackTo)}

to

onPress={() => navigateToPrivateNotes(report, session, navigateBackTo ?? ROUTES.PROFILE.getRoute(accountID))}

Then we can modfy the following line

onBackButtonPress={() => Navigation.goBack(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(report.reportID, backTo))}

as such

onBackButtonPress={() => {
if (backTo && backTo.startsWith('a/')) { // from profile page
Navigation.goBack(backTo);
}
else {
Navigation.goBack(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(report.reportID, backTo));
}
}}

We can also safely remove the backTo param from here

action: () => Navigation.navigate(ROUTES.PRIVATE_NOTES_EDIT.getRoute(report.reportID, accountID, backTo)),

into

action: () => Navigation.navigate(ROUTES.PRIVATE_NOTES_EDIT.getRoute(report.reportID, accountID)),

as this always return to the list screen

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

What alternative solutions did you explore? (Optional)

None

@melvin-bot melvin-bot bot added the Overdue label Feb 3, 2025
@laurenreidexpensify laurenreidexpensify added the External Added to denote the issue can be worked on by a contributor label Feb 3, 2025
@melvin-bot melvin-bot bot changed the title Private notes - User profile details page changes to room details page when it is a 1:1 DM [$250] Private notes - User profile details page changes to room details page when it is a 1:1 DM Feb 3, 2025
Copy link

melvin-bot bot commented Feb 3, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 3, 2025
Copy link

melvin-bot bot commented Feb 3, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label Feb 3, 2025
@akinwale
Copy link
Contributor

akinwale commented Feb 3, 2025

@FitseTLT's proposal works here.

🎀👀🎀 C+ reviewed.

Copy link

melvin-bot bot commented Feb 3, 2025

Triggered auto assignment to @flodnv, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 3, 2025
Copy link

melvin-bot bot commented Feb 3, 2025

📣 @FitseTLT 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 4, 2025
@dylanexpensify dylanexpensify moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Feb 4, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 11, 2025
@melvin-bot melvin-bot bot changed the title [$250] Private notes - User profile details page changes to room details page when it is a 1:1 DM [Due for payment 2025-02-18] [$250] Private notes - User profile details page changes to room details page when it is a 1:1 DM Feb 11, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 11, 2025
Copy link

melvin-bot bot commented Feb 11, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Feb 11, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.95-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2025-02-18. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Feb 11, 2025

@akinwale @laurenreidexpensify @akinwale The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@laurenreidexpensify
Copy link
Contributor

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment:

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion:

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal Template
  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

Test:

Do we agree 👍 or 👎

Copy link

melvin-bot bot commented Feb 14, 2025

@akinwale @flodnv @FitseTLT @laurenreidexpensify 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!

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 17, 2025
@laurenreidexpensify
Copy link
Contributor

@akinwale pls complete checklist ^^ thanks

@akinwale
Copy link
Contributor

BugZero Checklist:

Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment: N/A

  • [@akinwale] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion: N/A

  • [@akinwale] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Test:

  1. Launch Expensify
  2. Open a 1:1 DM which has no associated private notes
  3. Click on the chat header
  4. Select Private notes
  5. Refresh the page (only on web)
  6. Enter some text and click Save

On Native

  • Verify that you are navigated back to the user profile details page.

On Web

  • Click the RHP back button
  • Verify that you are navigated back to the user profile details page

Do we agree 👍 or 👎?

@laurenreidexpensify
Copy link
Contributor

Payment Summary:

  • C+ @akinwale requires $250 payment through NewDot Manual Requests
  • @FitseTLT has been paid $250 in Upwork (Contributor)

@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in [#whatsnext] #expense Feb 18, 2025
@JmillsExpensify
Copy link

$250 approved for @akinwale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Status: Done
Development

No branches or pull requests

7 participants