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

[HOLD for payment 2024-06-20] [$250] LHN - Most recent priority mode displayed as #focus and the other way around on secondary device #43315

Closed
3 of 6 tasks
lanitochka17 opened this issue Jun 7, 2024 · 16 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 Jun 7, 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: 1.4.80-11
Reproducible in staging?: Y
Reproducible in production?: 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/4605078
Issue reported by: Applause - Internal Team

Action Performed:

  1. Log in to New Expensify with the same account on two devices/two separate browsers
  2. [Device 1] Navigate to Account Settings > Preferences
  3. [Device 1] Change Priority mode to "#focus"
  4. Verify the change on [Device 2]
  5. [Device 1] Change Priority mode to "Most recent"
  6. Verify the change on [Device 2]

Expected Result:

Priority mode should change on secondary device and the LHN should be displayed in the same style on both devices

Actual Result:

Priority mode changes on the secondary device accordingly to the changes made on the [Device 1] but it is displayed in the style of the other priority mode in LHN

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6505198_1717774687450.2024-06-07_17-15-30.mp4
Bug6505198_1717774687450.2024-06-06_20-50-49.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01761ff40a6e4283bd
  • Upwork Job ID: 1799172422521172555
  • Last Price Increase: 2024-06-07
  • Automatic offers:
    • c3024 | Reviewer | 102666669
    • bernhardoj | Contributor | 102666670
Issue OwnerCurrent Issue Owner: @slafortune
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 7, 2024
Copy link

melvin-bot bot commented Jun 7, 2024

Triggered auto assignment to @slafortune (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
Copy link
Author

@slafortune 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

@slafortune slafortune added the External Added to denote the issue can be worked on by a contributor label Jun 7, 2024
Copy link

melvin-bot bot commented Jun 7, 2024

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

@melvin-bot melvin-bot bot changed the title LHN - Most recent priority mode displayed as #focus and the other way around on secondary device [$250] LHN - Most recent priority mode displayed as #focus and the other way around on secondary device Jun 7, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 7, 2024
Copy link

melvin-bot bot commented Jun 7, 2024

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

@bernhardoj
Copy link
Contributor

Proposal

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

The most recent/focus mode view doesn't update correctly when it's updated from secondary device.

What is the root cause of that problem?

The most recent/focus mode view depends on optionMode.

However, the list doesn't re-render correctly when optionMode is updated because it's missing from the extraData.

const extraData = useMemo(
() => [reportActions, reports, policy, personalDetails, data.length, draftComments],
[reportActions, reports, policy, personalDetails, data.length, draftComments],
);

Any external dependency should be included on the extraData.

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

Add optionMode to the extraData.

and any other data if needed

@c3024

This comment was marked as outdated.

@c3024
Copy link
Contributor

c3024 commented Jun 8, 2024

I assumed FlashList rerenders when renderItem changes. Apparently, anything that renderItem depends on that is not in data needs to be passed in extraData.

So, adding viewMode to extraData makes sense.

@bernhardoj 's proposal here looks good to me.

🎀 👀 🎀 C+ Reviewed

Copy link

melvin-bot bot commented Jun 8, 2024

Triggered auto assignment to @mountiny, 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 Jun 10, 2024
Copy link

melvin-bot bot commented Jun 10, 2024

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

Offer link
Upwork job

Copy link

melvin-bot bot commented Jun 10, 2024

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

@bernhardoj
Copy link
Contributor

PR is ready

cc: @c3024

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 13, 2024
@melvin-bot melvin-bot bot changed the title [$250] LHN - Most recent priority mode displayed as #focus and the other way around on secondary device [HOLD for payment 2024-06-20] [$250] LHN - Most recent priority mode displayed as #focus and the other way around on secondary device Jun 13, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

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

Copy link

melvin-bot bot commented Jun 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.82-4 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-06-20. 🎊

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

Copy link

melvin-bot bot commented Jun 13, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@c3024] The PR that introduced the bug has been identified. Link to the PR:
  • [@c3024] 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:
  • [@c3024] A discussion in #expensify-bugs 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:
  • [@c3024] Determine if we should create a regression test for this bug.
  • [@c3024] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@slafortune] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 19, 2024
@c3024
Copy link
Contributor

c3024 commented Jun 20, 2024

The PR that introduced the bug has been identified. Link to the PR:

#33108

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:

e205c9d#r143337922

A discussion in #expensify-bugs 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:

https://expensify.slack.com/archives/C049HHMV9SM/p1718879530091549

Determine if we should create a regression test for this bug.

Yes

If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Proposal

  1. Login with a same account from two devices/browsers
  2. On Device 1, go to Settings > Preferences > Priority Mode
  3. Change the mode from Most Recent to focus or vice versa
  4. On Device 2, verify that LHN shows the correct view for the mode changed in step 3

👍 or 👎

@slafortune
Copy link
Contributor

@bernhardoj Paid via Upworks ✅
@c3024 Paid via Upworks ✅

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
Archived in project
Development

No branches or pull requests

5 participants