[CP Staging] Revert "fix: Mark as unread doesn’t work with IOU report"#86980
Conversation
|
@AndrewGable Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d51231be0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| // If the user was mentioned and the comment got deleted the lastMentionedTime will be more recent than the lastVisibleActionCreated | ||
| return lastReadTime < (lastVisibleActionCreated ?? '') || lastReadTime < lastMentionedTime || lastReadTime < (latestReportActionFromOtherUsers?.created ?? ''); | ||
| return lastReadTime < (lastVisibleActionCreated ?? '') || lastReadTime < lastMentionedTime; |
There was a problem hiding this comment.
Include newer other-user actions when computing unread
This change makes isUnread() rely only on lastVisibleActionCreated and lastMentionedTime, which regresses IOU/threaded cases where a newer non-deleted action from another user exists in report actions but is not reflected in lastVisibleActionCreated. In that scenario, lastReadTime can equal the visible timestamp while a newer external action still exists, so the report is incorrectly treated as read and the unread marker/count is cleared after "mark as unread" flows. Please restore the comparison against the latest eligible action from other users (or pass report actions back into this check).
Useful? React with 👍 / 👎.
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @luacmartins has triggered a test Expensify/App build. You can view the workflow run here. |
[CP Staging] Revert "fix: Mark as unread doesn’t work with IOU report" (cherry picked from commit e1dc4b2) (cherry-picked to staging by luacmartins) (cherry-picked to staging by luacmartins)
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.3.51-10 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help Site Review: No changes required I reviewed the changes in this PR against all help site articles under These are purely internal code changes affecting how unread status is calculated. The help site articles that reference "unread" do so only in user-facing contexts:
No feature names, UI labels, settings, navigation paths, or user-facing workflows are affected by this revert. The concept of "unread" as documented in the help site remains accurate. |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.3.51-10 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.3.52-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.52-9 🚀
|
Reverts #81499
$ https://github.com/Expensify/Expensify/issues/618596
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari