Open lanitochka17 opened 3 weeks ago
Triggered auto assignment to @JmillsExpensify (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.
@JmillsExpensify Eep! 4 days overdue now. Issues have feelings too...
While this is not a common flow, we have lots of issues with reports you just created showing unread in the LHN, so I'm going to open this up to the community to see if we have any creative solutions.
Job added to Upwork: https://www.upwork.com/jobs/~021856693414198783158
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rayane-djouah (External
)
@JmillsExpensify, @rayane-djouah Eep! 4 days overdue now. Issues have feelings too...
Waiting on proposals
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@JmillsExpensify @rayane-djouah 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!
After creating a split expense and then switching to another chat, the chat in the LHN is displayed as unread.
The issue arises because the report is flagged as requiring attention from the user.
This is due to the requiresAttentionFromCurrentUser
function returning true—indicating that the report contains a child expense still awaiting action from the current user.
https://github.com/Expensify/App/blob/e04d145b607f768b36fb90b57fe57f40b536813d/src/components/LHNOptionsList/OptionRowLHN.tsx#L118 https://github.com/Expensify/App/blob/e04d145b607f768b36fb90b57fe57f40b536813d/src/libs/ReportUtils.ts#L2822-L2824
Specifically, the getReasonAndReportActionThatRequiresAttention
function returns a non-empty ReasonAndReportActionThatRequiresAttention
object, which signals that there is an unresolved action (such as a pending expense) requiring the user's attention.
This happens because the report’s hasOutstandingChildRequest
is true, meaning the report has a child expense that is still pending action from the user. As a result, the condition evaluates to true, triggering the attention-required status, which ultimately causes the report to appear as unread in the LHN.
To fix this, when the report has an hasOutstandingChildRequest
, we can add a check to see if the isUnread
flag is false
, like in the following snippet:
// Has a child report that is awaiting action (e.g. approve, pay, add bank account) from current user
if (optionOrReport.hasOutstandingChildRequest && !!('isUnread' in optionOrReport && optionOrReport.isUnread)) {
return {
reason: CONST.REQUIRES_ATTENTION_REASONS.HAS_CHILD_REPORT_AWAITING_ACTION,
reportAction: IOU.getIOUReportActionToApproveOrPay(optionOrReport, optionOrReport.reportID),
};
}
This ensures that the unread icon is not displayed if the user has already read the chat, even when there’s an outstanding expense awaiting action.
https://github.com/user-attachments/assets/32d7e002-c17b-4990-a381-70c975d95f4f
None
Reviewing
@JmillsExpensify, @rayane-djouah Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Other GHs have been a priority; I'll work on the proposal review soon.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Issue not reproducible during KI retests. (First week)
I'm not able to reproduce the issue. @ugogiordano, can you still reproduce it?
https://github.com/user-attachments/assets/fa64e5b2-31fe-4853-b871-9b3d8ec11cbe
@rayane-djouah I can no longer see the bold text, but the green dot is still present, even in your video. As I understand it, both the bold text and the green dot should disappear once the user has read the chat.
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.59-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Y Email or phone of affected tester (no customers): applausetester+bm203@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
The chat report in the LHN should not appear in bold, as the split expense has already been viewed
Actual Result:
The chat report in the LHN appears in bold, even though the split expense was seen
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/2fde62c4-6fb1-45e5-801c-f2c032a89c7f
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @rayane-djouah