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

[$500] Assign task - the Task shifts position in the LHN if we delete the only message in it #26479

Closed
1 of 6 tasks
izarutskaya opened this issue Sep 1, 2023 · 82 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Hot Pick Ready for an engineer to pick up and run with Internal Requires API changes or must be handled by Expensify staff Weekly KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Sep 1, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open the app
  2. Click on plus and click on assign task
  3. Provide any title, select any user for share somewhere and Confirm task
  4. Observe position in LHN
  5. Send any text message
  6. Delete sent message and observe change of position in LHN to bottom
  7. Visit any other chat and revisit task chat, it will again jump to its original postion

Expected Result:

Task position should not change in LHN on deleting any message

Actual Result:

Task moves to bottom of LHN on deleting the only message in the task / it jumps position

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.61-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:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Task.shift.to.bottom.in.LHN.on.delete.msg.mp4
Bandicam.2023-09-01.16-22-46-967.mp4

Expensify/Expensify Issue URL:

Issue reported by: @dhanashree-sawant

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692033299162729

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fe04ae2863eac337
  • Upwork Job ID: 1698487838846078976
  • Last Price Increase: 2023-09-04
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@StevenKKC
Copy link
Contributor

StevenKKC commented Sep 1, 2023

Proposal

Please state again the problem we are trying to solve in this issue.

Task shifts to bottom in LHN if we delete only present message in it.

What is the cause of this issue?

Reports in LHN are first sorted by lastVisibleActionCreated, and then sorted by displayName.

? lodashOrderBy(nonArchivedReports, ['lastVisibleActionCreated', (report) => report.displayName.toLowerCase()], ['desc', 'asc'])

If we delete only present message in the task report, BE responds empty lastVisibleActionCreated.
So the task shift to bottom.
Screenshot 2023-09-01 124926

If we revisit the task report, BE responds non-empty lastVisibleActionCreated, and then the task report will again regain its original position.

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

We can modify BE to respond correct lastVisibleActionCreated when delete only present message in the task report.
Or we can simply set proper lastVisibleActionCreated on FE side after DeleteComment API success.
For this, we can add optimistic successData in Report.deleteReportComment.

...
const lastVisibleAction = ReportActionsUtils.getLastVisibleAction(originalReportID, optimisticReportActions);
...
const successData = [
    ...
    {
        onyxMethod: Onyx.METHOD.MERGE,
        key: `${ONYXKEYS.COLLECTION.REPORT}${originalReportID}`,
        value: {
            lastVisibleActionCreated: optimisticReport ? optimisticReport.lastVisibleActionCreated : '',
        },
    },
];
...

What alternative solutions have you investigated? (Optional)

None.

@jliexpensify
Copy link
Contributor

Still seems to be occurring on v1.3.62-3 (staging) - I've noticed it jumps 1-2 positions when the message is deleted.

@jliexpensify jliexpensify changed the title Assign task - Task shifts to bottom in LHN if we delete only present message in it Assign task - the Task shifts position in the LHN if we delete the only message in it Sep 4, 2023
@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Sep 4, 2023
@melvin-bot melvin-bot bot changed the title Assign task - the Task shifts position in the LHN if we delete the only message in it [$500] Assign task - the Task shifts position in the LHN if we delete the only message in it Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

Current assignee @jliexpensify is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@mananjadhav
Copy link
Collaborator

I think this should be fixed from the backend.

🎀 👀 🎀 C+ Reviewed.

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Sep 11, 2023
@Li357
Copy link
Contributor

Li357 commented Sep 11, 2023

Hmm. I don't know if I agree @mananjadhav, just because this contradicts what lastVisibleActionCreated means. The CREATED report action isn't supposed to be visible, so there are no visible actions. Could we handle this in the frontend optimistically?

@melvin-bot melvin-bot bot removed the Overdue label Sep 11, 2023
@Li357
Copy link
Contributor

Li357 commented Sep 13, 2023

@mananjadhav Bump on this!

@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

@mananjadhav @Li357 @jliexpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@jliexpensify
Copy link
Contributor

Bump @mananjadhav to address Andrew's comments.

@mananjadhav
Copy link
Collaborator

@jliexpensify Can you please reassign another C+? I don't have the bandwidth to investigate this.

@jliexpensify jliexpensify added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Sep 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 17, 2023

Current assignee @jliexpensify is eligible for the External assigner, not assigning anyone new.

@jliexpensify jliexpensify changed the title [WAITING ON ANDREW TO CLOSE][$500] Assign task - the Task shifts position in the LHN if we delete the only message in it [$500] Assign task - the Task shifts position in the LHN if we delete the only message in it Dec 27, 2023
@robertKozik
Copy link
Contributor

@situchan can you get assigned to this one, as youwere lastly assigned to review connected PR?

@jliexpensify
Copy link
Contributor

Assigned! LMK if anything else needs to be done @robertKozik

@robertKozik robertKozik removed their assignment Jan 16, 2024
@robertKozik
Copy link
Contributor

Thanks 🙇🏼 , I think it would me all from me as I was not working on that issue for a long time and @situchan take the PR review over.

@jliexpensify
Copy link
Contributor

@situchan @blimpich how are we going here? This issue is a couple of months old, anything we need to do to push it along/resolve it?

@blimpich
Copy link
Contributor

@jliexpensify Can we categorize this under a wave and try to get it prioritized there? That would help. I don't have the time to pick this up as I'm working on p2p receipts which is higher priority.

I'm going to unassign myself as I won't be able to get to this anytime in the near future.

@blimpich blimpich removed their assignment Mar 26, 2024
@jliexpensify
Copy link
Contributor

jliexpensify commented Mar 31, 2024

Sure thing @blimpich (sorry was OOO) - this should go in #vip-vsb

@jliexpensify jliexpensify removed the Awaiting Payment Auto-added when associated PR is deployed to production label May 2, 2024
@blimpich blimpich added Hot Pick Ready for an engineer to pick up and run with and removed Reviewing Has a PR in review labels May 27, 2024
@melvin-bot melvin-bot bot added the Overdue label May 27, 2024
@blimpich
Copy link
Contributor

Added hot pick and removed reviewing label to help get this picked up

@jliexpensify
Copy link
Contributor

Thanks Ben! Not overdue

@melvin-bot melvin-bot bot removed the Overdue label Jun 6, 2024
@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@melvin-bot melvin-bot bot added the Overdue label Jul 3, 2024
@jliexpensify
Copy link
Contributor

Cool lets see if this pops up again. @mvtglobally can you re-test?

@melvin-bot melvin-bot bot removed the Overdue label Jul 18, 2024
@mvtglobally
Copy link

Issue not reproducible during KI retests. (Second week)

@melvin-bot melvin-bot bot added the Overdue label Aug 9, 2024
@jliexpensify
Copy link
Contributor

Sweet, lets close this. We are deprioritising VSB anyway.

@melvin-bot melvin-bot bot removed the Overdue label Aug 9, 2024
@situchan
Copy link
Contributor

@jliexpensify can I get compensation for reviewing PR?

@jliexpensify
Copy link
Contributor

@situchan hmm my first thought is that you wouldn't be eligible, as the PR was never deployed. It looks like @Li357 gave context and then you had the last comment, but then nothing after that.

Was this PR actually merged or deployed?

@situchan
Copy link
Contributor

I had commented with test result here.

PR was not merged.
Maybe this is the case in C+ doc:
https://docs.google.com/document/d/1BvohU05MTaHnjOD_vwJv_aqDAirv-ChkyRnKCAvOVyQ/edit?pli=1#heading=h.4qk1t4qmcejy (17. b.)

@jliexpensify
Copy link
Contributor

jliexpensify commented Aug 12, 2024

@situchan If I am understanding correctly, you might qualify for this?

If a C+ invested time in the issue or PR and they feel they are due compensation they should wait until any dupe, held or >related issues are closed. They should then post in #contributor-plus and:

  1. Tag the BZ and internal engineer
  2. Link to the GH issue and/or PR.
  3. Provide brief, yet detailed, reasoning for compensation
  4. State the amount they feel they’re due. Standard percentages are 25, 50 and 100% of the job price.

Are you able to share a post and tag me?

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. Engineering Hot Pick Ready for an engineer to pick up and run with Internal Requires API changes or must be handled by Expensify staff Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests