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.49k stars 2.85k forks source link

Status- Date "Clear After" of Status is Unstable #50170

Closed lanitochka17 closed 2 weeks ago

lanitochka17 commented 2 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.44-1 Reproducible in staging?: Y Reproducible in production?: N 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+tw4355353122@applause.expensifail.com Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to Account Settings > Profile
  2. Add a status and click Save

Expected Result:

The Status "Clear After" date should remain stable

Actual Result:

The Status "Clear After" date is unstable

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/82c9b42d-1ee5-4870-9909-6aa198a400e5

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021841884588235486621
  • Upwork Job ID: 1841884588235486621
  • Last Price Increase: 2024-10-03
  • Automatic offers:
    • ahmedGaber93 | Contributor | 104251800
    • Krishna2323 | Contributor | 104251856
Issue OwnerCurrent Issue Owner: @jayeshmangwani
melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @jasperhuangg (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

github-actions[bot] commented 2 weeks ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

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

jasperhuangg commented 2 weeks ago

Super minor display bug that doesn't need to block deploy. Actually don't really think this needs fixing at all, going to close it out. Took me a few tries to even notice what the OP was describing.

Nodebrute commented 2 weeks ago

@jasperhuangg regression from https://github.com/Expensify/App/pull/49914

jasperhuangg commented 2 weeks ago

@Krishna2323 if you could look into this regression that would be great.

Going to assign the original C+ from that issue since we're handling this as a regression. No need for payment here.

melvin-bot[bot] commented 2 weeks ago

📣 @ahmedGaber93 🎉 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 📖

Krishna2323 commented 2 weeks ago

@jasperhuangg, I need 30 mins to start working on this. You can assign me if that's okay.

melvin-bot[bot] commented 2 weeks ago

📣 @Krishna2323 🎉 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 📖

Krishna2323 commented 2 weeks ago

@jasperhuangg, after many tries, I believe I’ve understood the bug. I think it's not worth fixing since it’s a very minor visual issue, and I believe it’s happening due to the migration to useOnyx. The PR changes are very straightforward—we just prevented multiple navigation. Please check it out and let me know your thoughts. Thanks!

mkzie2 commented 2 weeks ago

Proposal

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

What is the root cause of that problem?

https://github.com/Expensify/App/blob/821edc51788b616e323cae0dc00f4b0aa7246766/src/pages/settings/Profile/CustomStatus/StatusPage.tsx#L108

it makes the dataToShow: https://github.com/Expensify/App/blob/821edc51788b616e323cae0dc00f4b0aa7246766/src/pages/settings/Profile/CustomStatus/StatusPage.tsx#L56 is "", and because the modal is not closed immediately:

https://github.com/Expensify/App/blob/821edc51788b616e323cae0dc00f4b0aa7246766/src/pages/settings/Profile/CustomStatus/StatusPage.tsx#L128

so the "Never" is the fallback value.

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

Remove:

https://github.com/Expensify/App/blob/821edc51788b616e323cae0dc00f4b0aa7246766/src/pages/settings/Profile/CustomStatus/StatusPage.tsx#L108 will fix the issue since we already have the cleanup function:

https://github.com/Expensify/App/blob/821edc51788b616e323cae0dc00f4b0aa7246766/src/pages/settings/Profile/CustomStatus/StatusPage.tsx#L142

What alternative solutions did you explore? (Optional)

Remove the InteractionManager.runAfterInteractions in:

https://github.com/Expensify/App/blob/821edc51788b616e323cae0dc00f4b0aa7246766/src/pages/settings/Profile/CustomStatus/StatusPage.tsx#L128-L130

and just need navigateBackToPreviousScreen();

mkzie2 commented 2 weeks ago

@jasperhuangg It is easy to reproduce the bug ("Never" is displayed for a while) in IOS/Android native and based on RCA, I think it is not related to @Krishna2323 's PR:

https://github.com/user-attachments/assets/8cb4f936-30a5-44d0-9943-01f966872890

ahmedGaber93 commented 2 weeks ago

@jasperhuangg, ..., and I believe it’s happening due to the migration to useOnyx. The PR changes are very straightforward—we just prevented multiple navigation.

@jasperhuangg I agree with that, this issue not a regression from our fix, it seems it is appeared after migration to useOnyx. I think we should fix it here as a new issue.

jasperhuangg commented 2 weeks ago

Yeah agree that we don't really need to fix this. Also agree that it isn't a regression from the PR, and that it was caused separately by the useOnyx migrations.