Closed lanitochka17 closed 2 months ago
Triggered auto assignment to @dylanexpensify (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.
@dylanexpensify 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 bug and can be handled by external contributors
Reviewing today!
@dylanexpensify Huh... This is 4 days overdue. Who can take care of this?
Trying again today
@dylanexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@dylanexpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Couldn't repro. @lanitochka17 can you confirm if you can?
@dylanexpensify Issue is still reproducible
https://github.com/Expensify/App/assets/78819774/df87d184-d5a9-4bfa-9d31-157ab7e8de19
@dylanexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
Job added to Upwork: https://www.upwork.com/jobs/~0152b49882e3aa4a66
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External
)
made external!
If we look at other places that add report action to the report like here, we'll see that the lastVisibleActionCreated
and lastReadTime
of the report will be set to currentTime
(also the same time of the added optimistic report action), because lastVisibleActionCreated
should be of the added optimistic report action, and since the user is in the report and adding the action, they must be reading that created report action right then, hence the lastReadTime
update. The response from the back-end is also the same.
However, when editing the transaction details, when adding the modified expense report action here, we currently don't set the lastVisibleActionCreated
and lastReadTime
of the transaction thread report to the time of the newly created modified expense report action. The back-end response for this case is also incorrect (the lastVisibleActionCreated
and lastReadTime
returned from the back-end is not equal).
This causes the isUnread
here to be true
(which is wrong because the user already read that modified expense report action), causing readNewestAction to be run and the New
message marker is cleared.
In https://github.com/Expensify/App/blob/e8ae3c5acedf0e6788dc574c7b6f3043ca37092a/src/libs/actions/IOU.ts#L2415 Set the lastVisibleActionCreated
and lastReadTime
to the current time/or optimistically added report action's time
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${transactionThread?.reportID}`,
value: {
lastVisibleActionCreated: updatedReportAction.created,
lastReadTime: updatedReportAction.created,
},
})
(of course we'll need to reset the data in failureData
)
Optionally, fix the back-end to return the same (lastVisibleActionCreated
and lastReadTime
should be the same and equal to the modified expense's report action created time)
Use currentTime
instead of updatedReportAction.created
for the optimistic data update, and optionally can add other fields like lastMessageText
to the report
too
@rushatgabhane to review!
@dylanexpensify @tienifr why is this a bug? after editing transaction details, we come back to the IOU page and it clears the unread marker because we're on the page.
What do you think?
I think we can close this issue
@dylanexpensify @tienifr why is this a bug?
@rushatgabhane How the unread marker works is, it will only disappear if you navigate to another report and back, or if you close the browser tab and open it again.
Please try attempting to edit the transaction details, but actually do not save and just dismiss the modal, you'll see that the unread marker stays there.
it clears the unread marker because we're on the page.
We're back on the page, but the marker is still there (as it should be, both when you actually did the edit and you just close the modal and did not do any edit)
Also, there's a second bug due to the same root cause (2
in my proposal), that's noticeable and definitely a bug.
@rushatgabhane @dylanexpensify this issue is now 4 weeks old, please consider:
Thanks!
@rushatgabhane, @dylanexpensify Huh... This is 4 days overdue. Who can take care of this?
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@rushatgabhane thoughts on this?
@rushatgabhane, @dylanexpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
@rushatgabhane, @dylanexpensify Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@rushatgabhane, @dylanexpensify 12 days overdue now... This issue's end is nigh!
okay that makes sense
https://github.com/Expensify/App/issues/41211#issuecomment-2122370121
@tienifr 's proposal looks good πππ
Triggered auto assignment to @srikarparsi, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @tienifr π 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 π
@rushatgabhane PR https://github.com/Expensify/App/pull/43162 is ready
Ongoing!
This issue has not been updated in over 15 days. @rushatgabhane, @srikarparsi, @dylanexpensify, @tienifr eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
PR on production
PR on production last week. Payment due today.
cc: @dylanexpensify could you please attach payment summary π
Do we need a regression test for this one?
This was caught by QA and is a very minor bug. So I think not needed.
But in case you disagree -
Bump on that last comment
Contributor: @tienifr due $250 via NewDot Contributor+: @rushatgabhane due $250 via NewDot
TestRail GH (I prefer to create them then let QA decide what to do with them, if anything (cuz we have the option to check monthly for edge cases))
$250 approved for @rushatgabhane
$250 approved for @tienifr
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.67 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/4522562 Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
In transaction details page, after mark as unread, if we alter transaction details, new message green line must not disappear
Actual Result:
In transaction details page, after mark as unread, if we alter transaction details, new message green line disappears
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/78819774/f65f916e-15b8-4346-b18b-16895f7e29c1
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @rushatgabhane