Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.32k stars 2.75k forks source link

[$250] Categorize - Email address can be selected which leads to infinite loading in Category page #47583

Open lanitochka17 opened 3 weeks ago

lanitochka17 commented 3 weeks ago

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.21-1 Reproducible in staging?: Y Reproducible in production?: Y 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+kh050806@applause.expensifail.com Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to self DM
  3. Click + > Track expense > Manual
  4. Submit a track manual expense
  5. Click Categorize it
  6. Enter any email and select the user from the result

Expected Result:

App should not show result for email address because categorizing is only for workspaces

Actual Result:

App shows result for email address and Category page loads infinitely after selecting the user

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/a024c2ee-7d7e-4348-8af6-876ebdadde05

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fdcfeaf864ee2ecb
  • Upwork Job ID: 1824591298084501941
  • Last Price Increase: 2024-08-16
Issue OwnerCurrent Issue Owner: @eVoloshchak
melvin-bot[bot] commented 3 weeks ago

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.

lanitochka17 commented 3 weeks ago

@twisterdotcom FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

lanitochka17 commented 3 weeks ago

We think that this bug might be related to #vip-vsp

FitseTLT commented 3 weeks ago

Proposal

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

Email address can be selected which leads to infinite loading in Category page

What is the root cause of that problem?

We are not passing canInviteUser as false for action === CONST.IOU.ACTION.CATEGORIZE https://github.com/Expensify/App/blob/d4d5a2586910ff46147219ee3e98bb3e936f8037/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx#L162-L163

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

            canInviteUser: action !== CONST.IOU.ACTION.CATEGORIZE,

I also recommend changing text label when action is categorize as we can't search for email and phone

https://github.com/Expensify/App/blob/d4d5a2586910ff46147219ee3e98bb3e936f8037/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx#L437 Additionally we need to avoid invalid email or invalid phone header message for categorize by updating getHeaderMessage to have a new param shouldAvoidContactMessage (we will pass as true for action type categorize) and avoid invalid phone/email message inside getHeaderMessage https://github.com/Expensify/App/blob/d4d5a2586910ff46147219ee3e98bb3e936f8037/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx#L212-L217

What alternative solutions did you explore? (Optional)

twisterdotcom commented 3 weeks ago

Yeah weird bug.

melvin-bot[bot] commented 3 weeks ago

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

melvin-bot[bot] commented 3 weeks ago

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

daledah commented 3 weeks ago

Proposal

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

Categorize - Email address can be selected which leads to infinite loading in Category page

What is the root cause of that problem?

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

visotecq commented 3 weeks ago

Contributor details Your Expensify account email: visotecq@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~01936ce33c6cefefe9?mp_source=share

Proposal

As described issue, we landed to the root cause of the infinite loading on Category due to following -

1) Entering E-mail without assigned to any Workspace , makes infinite Loading on the Category Page.

Solution -

1) On Entering E-mail if no Workspace pops up in List then on Clicking E-mail , create a New Workspace with that E-mail then Navigate to Category .

melvin-bot[bot] commented 3 weeks ago

๐Ÿ“ฃ @visotecq! ๐Ÿ“ฃ 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>
Amoralchik commented 3 weeks ago

@visotecq Please make sure you've read Contributing to Expensify and once you've understood everything, please format your comment according to the proposal template if you're interested in fixing this issue; otherwise, it won't be considered for review.

Additionally, to pass the bot verification, you need to submit a separate message rather than editing an existing one.

melvin-bot[bot] commented 3 weeks ago

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

twisterdotcom commented 3 weeks ago

@eVoloshchak we still waiting on a good proposal here?

eVoloshchak commented 3 weeks ago

@FitseTLT's proposal looks good to me!

Additionally we need to avoid invalid email or invalid phone header message for categorize by updating getHeaderMessage to have a new param shouldAvoidContactMessage (we will pass as true for action type categorize) and avoid invalid phone/email message inside getHeaderMessage

We can work out the specifics of this on the PR stage, but I think we could use getHeaderMessageForNonUserList for this

๐ŸŽ€๐Ÿ‘€๐ŸŽ€ C+ reviewed!

melvin-bot[bot] commented 3 weeks ago

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

daledah commented 3 weeks ago

@eVoloshchak What is the feedback about my proposal above? Thanks

daledah commented 3 weeks ago

The selected solution does not fix the case distance request, categorize or share action and it is inconsistent with what we already had here: https://github.com/Expensify/App/blob/d4d5a2586910ff46147219ee3e98bb3e936f8037/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx#L108 cc @thienlnam

thienlnam commented 2 weeks ago

Yeah, I agree with that update

melvin-bot[bot] commented 2 weeks ago

๐Ÿ“ฃ @daledah You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review ๐Ÿง‘โ€๐Ÿ’ป Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing ๐Ÿ“–

daledah commented 2 weeks ago

@eVoloshchak PR is ready.