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
4.02k stars 3.01k forks source link

[$62.50] `inbox` tab greendot flickers each time when the task checkboxes are checked #55685

Open m-natarajan opened 2 weeks ago

m-natarajan 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.89-2 Reproducible in staging?: y Reproducible in production?: y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: 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 Expensify/Expensify Issue URL: Issue reported by: @rayane-djouah Slack conversation (hyperlinked to channel name): expensify - bugs

Action Performed:

  1. Create an account
  2. complete onboarding
  3. Click on the each task checkboxes in concierge chat

    Expected Result:

    greendot on the inbox tab shouldn't disappear and reappear

    Actual Result:

    greendot flickers each time when the task checkboxes are checked

    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
    • [x] MacOS: Chrome / Safari
    • [ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence https://github.com/user-attachments/assets/7904d90d-9e3b-4307-a43e-6a8dac86a79f https://github.com/user-attachments/assets/00ecb6be-0fd3-4dee-a9a7-d2225efd080d

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021882881798258809610
  • Upwork Job ID: 1882881798258809610
  • Last Price Increase: 2025-01-24
  • Automatic offers:
    • mkzie2 | Contributor | 105926330
Issue OwnerCurrent Issue Owner: @jasperhuangg
melvin-bot[bot] commented 2 weeks ago

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

mkzie2 commented 2 weeks ago

🚨 Edited by proposal-police: This proposal was edited at 2025-01-24 01:06:37 UTC.

Proposal

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

greendot flickers each time when the task checkboxes are checked

What is the root cause of that problem?

When marking task as completed, we check if the parent report (Concierge chat in this case) has any other uncompleted tasks to mark it as hasOutstandingChildTask optimistically:

https://github.com/Expensify/App/blob/978ab868e5c853b8b9a196f882b1d64acc903fcf/src/libs/actions/Task.ts#L427-L428

But this condition in getOutstandingChildTask is not correct and seems like a bad merge commit:

https://github.com/Expensify/App/blob/978ab868e5c853b8b9a196f882b1d64acc903fcf/src/libs/actions/Task.ts#L351-L356

The parent report action here should not be deleted.

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

The parent report action here should not be deleted. Add negate operator to ReportActionsUtils.getReportActionMessage(reportAction)?.isDeletedParentAction above.

!ReportActionsUtils.getReportActionMessage(reportAction)?.isDeletedParentAction

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

Write a unit test for the case when there are many tasks within a report, if any of them has not been completed yet, the GBR should still show. The expected reason should be debug.reasonGBR.isWaitingForAssigneeToCompleteAction. We can follow the example here.

What alternative solutions did you explore? (Optional)

NA

joekaufmanexpensify commented 2 weeks ago

I can reproduce this. It's a very minor issue though.

melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

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

jayeshmangwani commented 1 week ago

@mkzie2's Proposal looks good. It seems the issue arose due to a bad merge commit, where the condition was the negation of ReportActionsUtils.getReportActionMessage(reportAction)?.isDeletedParentAction.

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed

melvin-bot[bot] commented 1 week ago

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

joekaufmanexpensify commented 1 week ago

@jasperhuangg mind signing off on this proposal when you have a sec?

melvin-bot[bot] commented 1 week ago

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

melvin-bot[bot] commented 1 week ago

πŸ“£ @mkzie2 πŸŽ‰ 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 πŸ“–

jasperhuangg commented 1 week ago

Sorry for the delay! Proposal makes sense to me, let's move forward!

joekaufmanexpensify commented 1 week ago

All good!

jayeshmangwani commented 5 days ago

we’re waiting for @mkzie2 to raise a PR.

melvin-bot[bot] commented 5 days ago

@jasperhuangg, @jayeshmangwani, @joekaufmanexpensify, @mkzie2 Whoops! This issue is 2 days overdue. Let's get this updated quick!

joekaufmanexpensify commented 4 days ago

PR in review