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

[Awaiting checklist] [HOLD for payment 2024-12-25] [$250] Search -"Join" button displayed for some seconds when opening expenses in search after login #52589

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

Comments

@lanitochka17
Copy link

lanitochka17 commented Nov 14, 2024

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.62-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5227066&group_by=cases:section_id&group_order=asc&group_id=296775
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open the Expensify app
  2. Log in with any account that contains several expenses on it
  3. Tap on "Search" on the bottom of the screen
  4. Open any expense on the list
  5. Verify that the report and information load correctly

Expected Result:

When user opens any expense on search section, all the information available on the report, should load automatically

Actual Result:

A "Join" green button, can be seen on top of reports when opening expenses on search after logging in, and the report title only displays "Expense" instead of the expense details for some seconds

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
Bug6665483_1731602331532.Join.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021858438366366454101
  • Upwork Job ID: 1858438366366454101
  • Last Price Increase: 2024-11-18
  • Automatic offers:
    • daledah | Contributor | 105062627
Issue OwnerCurrent Issue Owner: @getusha
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 14, 2024
Copy link

melvin-bot bot commented Nov 14, 2024

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

@daledah
Copy link
Contributor

daledah commented Nov 18, 2024

Proposal

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

A "Join" green button, can be seen on top of reports when opening expenses on search after logging in, and the report title only displays "Expense" instead of the expense details for some seconds

What is the root cause of that problem?

When sign in, or clear cache and restart, the parent report of the expenses are not received:

report data OpenApp data
Screenshot 2024-11-18 at 14 29 08 Screenshot 2024-11-18 at 14 30 03

BE only send parent report data when we call OpenReport:

Screenshot 2024-11-18 at 14 32 30

If parent report is empty, in ReportSreen, isSingleTransactionView here will return false, becase ReportUtils.isMoneyRequest(report) requires parentReport to exist:

return isIOURequest(report) || isExpenseRequest(report);

App/src/libs/ReportUtils.ts

Lines 1637 to 1638 in d5e7a5a

const parentReport = ReportConnection.getAllReports()?.[`${ONYXKEYS.COLLECTION.REPORT}${report?.parentReportID}`];
return isIOUReport(parentReport) && !isEmptyObject(parentReportAction) && ReportActionsUtils.isTransactionThread(parentReportAction);

So the header for the report in this case would be HeaderView, because the logic here is not applied:

if (isSingleTransactionView) {
headerView = (
<MoneyRequestHeader
report={report}
policy={policy}
parentReportAction={parentReportAction}
onBackButtonPress={onBackButtonPress}
/>
);
}

In HeaderView because the report is of type chat, canJoin here would return true, which will show the join button.

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

We should set isLoading status in HeaderView based on parentReport:

const isLoading = !report?.reportID || !title;

const isLoading = !report?.reportID || !title || (!!report?.parentReportID && !parentReport);

What alternative solutions did you explore? (Optional)

Or we can create a separate variable for this condition only:

const isParentReportLoading = !!report?.parentReportID && !parentReport;

And then apply this to the join buttons:

{canJoin && !shouldUseNarrowLayout && joinButton}

{!isParentReportLoading && canJoin && !shouldUseNarrowLayout && joinButton}

{!isLoading && canJoin && shouldUseNarrowLayout && <View style={[styles.ph5, styles.pb2]}>{joinButton}</View>}

{!isParentReportLoading && !isLoading && canJoin && shouldUseNarrowLayout && <View style={[styles.ph5, styles.pb2]}>{joinButton}</View>}

@melvin-bot melvin-bot bot added the Overdue label Nov 18, 2024
@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Nov 18, 2024
@melvin-bot melvin-bot bot changed the title Search -"Join" button displayed for some seconds when opening expenses in search after login [$250] Search -"Join" button displayed for some seconds when opening expenses in search after login Nov 18, 2024
Copy link

melvin-bot bot commented Nov 18, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 18, 2024
Copy link

melvin-bot bot commented Nov 18, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Nov 18, 2024
Copy link

melvin-bot bot commented Nov 18, 2024

@twisterdotcom Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@getusha
Copy link
Contributor

getusha commented Nov 18, 2024

Reviewing, will update!

@getusha
Copy link
Contributor

getusha commented Nov 21, 2024

Seems like this is only reproducible for expenses from archived workspace.
@daledah are you able to consistently reproduce this?

@daledah
Copy link
Contributor

daledah commented Nov 21, 2024

@getusha Yes, pretty easy to reproduce.
Here are my steps:

  1. Create a WS
  2. Submit 2 expenses
  3. Go to settings -> Troubleshoot -> Clear cache and restart (This is the same as sign in, as they both call OpenApp)
  4. Go to search and open one of the expense
Screen.Recording.2024-11-21.at.17.20.48.mp4

@getusha
Copy link
Contributor

getusha commented Nov 21, 2024

@daledah proposal looks good to me we can proceed with the alternative solution
🎀 👀 🎀 C+ Reviewed!

Copy link

melvin-bot bot commented Nov 21, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Nov 25, 2024
Copy link

melvin-bot bot commented Nov 25, 2024

@puneetlath, @twisterdotcom, @getusha Whoops! This issue is 2 days overdue. Let's get this updated quick!

@getusha
Copy link
Contributor

getusha commented Nov 25, 2024

Waiting for assignment

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 25, 2024
Copy link

melvin-bot bot commented Nov 25, 2024

📣 @daledah 🎉 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 Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Dec 18, 2024
@melvin-bot melvin-bot bot changed the title [$250] Search -"Join" button displayed for some seconds when opening expenses in search after login [HOLD for payment 2024-12-25] [$250] Search -"Join" button displayed for some seconds when opening expenses in search after login Dec 18, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 18, 2024
Copy link

melvin-bot bot commented Dec 18, 2024

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

Copy link

melvin-bot bot commented Dec 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.76-12 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 2024-12-25. 🎊

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

Copy link

melvin-bot bot commented Dec 18, 2024

@getusha @twisterdotcom @getusha 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]

@twisterdotcom
Copy link
Contributor

@getusha and @daledah I would love to sign in and pay this on Christmas day, but my family will not. As a heads up, this may be delayed until the new year.

@garrettmknight garrettmknight moved this from Bugs and Follow Up Issues to Hold for Payment in [#whatsnext] #expense Dec 23, 2024
@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Dec 25, 2024
Copy link

melvin-bot bot commented Dec 30, 2024

@puneetlath, @twisterdotcom, @getusha, @daledah Eep! 4 days overdue now. Issues have feelings too...

@puneetlath
Copy link
Contributor

I paid @daledah. @getusha can you complete the checklist?

Copy link

melvin-bot bot commented Jan 1, 2025

@puneetlath, @twisterdotcom, @getusha, @daledah Still overdue 6 days?! Let's take care of this!

@puneetlath
Copy link
Contributor

@getusha friendly bump.

Copy link

melvin-bot bot commented Jan 3, 2025

@puneetlath, @twisterdotcom, @getusha, @daledah 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

Copy link

melvin-bot bot commented Jan 7, 2025

@puneetlath, @twisterdotcom, @getusha, @daledah 12 days overdue. Walking. Toward. The. Light...

@twisterdotcom
Copy link
Contributor

@getusha there can't be a payment for you until the checklist is done please.

@twisterdotcom twisterdotcom changed the title [HOLD for payment 2024-12-25] [$250] Search -"Join" button displayed for some seconds when opening expenses in search after login [Awaiting checklist] [HOLD for payment 2024-12-25] [$250] Search -"Join" button displayed for some seconds when opening expenses in search after login Jan 7, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jan 10, 2025
Copy link

melvin-bot bot commented Jan 10, 2025

This issue has not been updated in over 14 days. @puneetlath, @twisterdotcom, @getusha, @daledah eroding to Weekly issue.

@melvin-bot melvin-bot bot removed the Overdue label Jan 10, 2025
@getusha
Copy link
Contributor

getusha commented Jan 27, 2025

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: N/a

  • [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: N/a

  • [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.

Seems like we already have a testrail for this: https://expensify.testrail.io/index.php?/tests/view/5227066&group_by=cases:section_id&group_order=asc&group_id=296775

@twisterdotcom
Copy link
Contributor

Nice, you did it!

@twisterdotcom
Copy link
Contributor

twisterdotcom commented Jan 28, 2025

Just to reiterate the payment summary now then:

@github-project-automation github-project-automation bot moved this from Hold for Payment to Done in [#whatsnext] #expense Jan 28, 2025
@garrettmknight
Copy link
Contributor

$250 approved for @getusha

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests

7 participants