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

[$250] Expense - Combined report in LHN is always bolded after modifying transaction #41088

Closed
6 tasks done
kbecciv opened this issue Apr 26, 2024 · 32 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@kbecciv
Copy link

kbecciv commented Apr 26, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.66-2
Reproducible in staging?: y
Reproducible in production?: n
Issue reported by:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat with no unsettled expense.
  3. Create an expense.
  4. Go to combined report.
  5. Pin the report to LHN.
  6. Note that the report in LHN is not bolded.
  7. Go to combined report and modifying any field.
  8. Note that LHN is bolded.
  9. Go back and forth between other chat and the combined report.
  10. Note that the combined report in LHN is still bolded.

Expected Result:

In Step 8, since there is no unread messages in the combined report, the combined report in LHN will not be bolded.

Actual Result:

After modifying transaction details, the combined report in LHN is always bolded.

Workaround:

n/a

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

Bug6462672_1714125466840.RPReplay_Final1714125219.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01471012e33a8b1fcb
  • Upwork Job ID: 1783842500724846592
  • Last Price Increase: 2024-04-26
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Apr 26, 2024
Copy link

melvin-bot bot commented Apr 26, 2024

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

Copy link
Contributor

👋 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.

@kbecciv
Copy link
Author

kbecciv commented Apr 26, 2024

We think that this bug might be related to #wave-collect - Release 1

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Apr 26, 2024
@melvin-bot melvin-bot bot changed the title Expense - Combined report in LHN is always bolded after modifying transaction [$250] Expense - Combined report in LHN is always bolded after modifying transaction Apr 26, 2024
Copy link

melvin-bot bot commented Apr 26, 2024

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

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

melvin-bot bot commented Apr 26, 2024

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

@mountiny
Copy link
Contributor

This seems like the culprit #40676

@mountiny
Copy link
Contributor

testing a revert

@paultsimura

This comment was marked as off-topic.

@tienifr
Copy link
Contributor

tienifr commented Apr 26, 2024

Proposal

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

After modifying transaction details, the combined report in LHN is always bolded.

What is the root cause of that problem?

This is noticeable after #40676, but the root cause is in the back-end, when we OpenReport in the one-transaction-view, it will not update the lastReadTime of the transactionThreadReport.

This also happens for other commands like UpdateMoneyRequestDescription

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

Fix the back-end so that when we OpenReport in the one-transaction-view, it will not update the lastReadTime of the transactionThreadReport.

We also need to polish the offline case by calling readNewestAction for transactionThreadReport?.reportID in various places in ReportActionsList and also check isUnread for transactionThreadReport here. Otherwise if the one-transaction-report as unread messages and we go to it in offline mode, the LHN will still be bold.

What alternative solutions did you explore? (Optional)

NA

@mountiny
Copy link
Contributor

@tienifr could we instead in the frontend consider only the report actions for the expense report when comparing the timestamps?

So when we compare the lastReadTime to know if we should show the report as bold/ unread, we will only consider the expense report actions?

@tienifr
Copy link
Contributor

tienifr commented Apr 26, 2024

@mountiny Then it will reintroduce this issue #39407.

The reportID is of the expense report, but the content shown is of the transaction thread. So I think it's correct that the "read" status of the one-transaction-view will depend on the transaction thread report and not the expense report.

@mountiny
Copy link
Contributor

Alright, I am going to revert that PR as I have confirmed it fixes this issue and then @nkdengineer please consider this regression in your follow up issue
image

@mountiny mountiny removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 26, 2024
@tienifr
Copy link
Contributor

tienifr commented Apr 26, 2024

So when we compare the lastReadTime to know if we should show the report as bold/ unread, we will only consider the expense report actions?

@mountiny We can do this as a temporary fix if this issue is serious, but IMO we still need to fix the back-end and reintroduce that logic to use the transaction thread.

@mountiny
Copy link
Contributor

Yeah, I assume we need to look into this from the backend perspective too cc @NikkiWines for visibility

Here is a straight revert #41099

@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label Apr 26, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Apr 29, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-05-03] [$250] Expense - Combined report in LHN is always bolded after modifying transaction [HOLD for payment 2024-05-06] [HOLD for payment 2024-05-03] [$250] Expense - Combined report in LHN is always bolded after modifying transaction Apr 29, 2024
Copy link

melvin-bot bot commented Apr 29, 2024

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

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

  • @akinwale requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented May 10, 2024

@iwiznia, @akinwale Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented May 14, 2024

@iwiznia, @akinwale 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@iwiznia iwiznia added Bug Something is broken. Auto assigns a BugZero manager. and removed Awaiting Payment Auto-added when associated PR is deployed to production labels May 14, 2024
Copy link

melvin-bot bot commented May 14, 2024

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

@iwiznia iwiznia changed the title [HOLD for payment 2024-05-06] [HOLD for payment 2024-05-03] [$250] Expense - Combined report in LHN is always bolded after modifying transaction [$250] Expense - Combined report in LHN is always bolded after modifying transaction May 14, 2024
@iwiznia
Copy link
Contributor

iwiznia commented May 14, 2024

This is not fixed yet, seems the PR is being worked on still

@paultsimura
Copy link
Contributor

@NikkiWines could you please verify the possibility of a BE fix?

Ref: #39407 (comment)

@NikkiWines
Copy link
Contributor

Sorry for the delay - I'll look into implementing a fix for updating the lastReadTime for the transactionThreadReport when we open a one-expense report. Shouldn't be too tricky 🍀

@CortneyOfstad
Copy link
Contributor

Thanks @NikkiWines!

@NikkiWines
Copy link
Contributor

NikkiWines commented May 20, 2024

Took a look at this with #42005 checked out as well (with no backend changes), since that modifies the LHN view for one-transaction reports and I'm not able to reproduce the bug.

Screen.Recording.2024-05-20.at.14.46.48.mov

However, I did experience a separate bug involving the unread indicator not consistently working for the one-transaction view (particularly for system messages). I'll see if there's a separate bug report for that.

I guess let's wait for #42005 to be deployed and confirm if the bug still exists on staging / prod and we can go from there

@CortneyOfstad
Copy link
Contributor

Sounds good — thanks @NikkiWines!

Copy link

melvin-bot bot commented May 29, 2024

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

@iwiznia
Copy link
Contributor

iwiznia commented May 30, 2024

@kbecciv can you check if this bug is still present please?

@CortneyOfstad
Copy link
Contributor

Bump @kbecciv ^^^ thanks!

@kbecciv
Copy link
Author

kbecciv commented Jun 3, 2024

@iwiznia @CortneyOfstad Checking

@kbecciv
Copy link
Author

kbecciv commented Jun 4, 2024

Not reproducible

Recording.165.mp4

@CortneyOfstad
Copy link
Contributor

Thanks @kbecciv! Going to close!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

8 participants