Skip to content

fix: Opening a room at its oldest unread message never loads newer messages - #107793

Merged
marcaaron merged 12 commits into
Expensify:mainfrom
zeryns:fix-105204
Dec 1, 2026
Merged

marcaaron merged 12 commits into
Expensify:mainfrom
zeryns:fix-105204

Conversation

@zeryns

@zeryns zeryns commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Opening a chat at an older message (its oldest unread message, a message marked as unread, or a linked message) stopped loading newer messages partway, and could mark the chat as read before they loaded. This PR:

  1. Keeps maintainVisibleContentPosition on while there are newer messages, so each page loads below the message being read instead of leaving the user stuck at the bottom
  2. Only passes onStartReached once there are newer messages to load, so FlashList one call isn't used up early
  3. Asks for the next page when the newer-messages cursor moves while the user is still at the bottom (a page that lands mid-fling, or reopening a chat that is still unread)
  4. Doesn't complete a skipped mark-as-read while newer messages are still on the server

Fixed Issues

$ #105204
PROPOSAL: #105204 (comment)

Tests

Test 1: Newer messages keep loading

  1. Use two accounts, A (reader) and B (sender), in separate browsers.
  2. B starts a DM with A and sends one message. A opens the DM, then goes to Inbox or another chat.
  3. A closes the tab completely.
  4. B sends about 200 messages into the DM, and waits until they're all sent.
  5. A opens the app and waits about 10 seconds on Inbox.
  6. A opens the DM.
  7. Verify the chat opens at B's first unread message.
  8. A scrolls to the bottom of the chat and keeps scrolling.
  9. Verify newer messages keep loading until B's last message, the same one the LHN preview shows.
  10. B sends another message.
  11. Verify it shows at the bottom of A's chat right away.

Test 2: The chat isn't marked as read while newer messages are still loading

  1. A opens the DM with B, then goes to Inbox or open another chat.
  2. B sends about 150 messages into the DM, and waits until they're all sent.
  3. A goes to Account > Troubleshoot > Clear cache and restart > Reset and refresh.
  4. A opens the DM.
  5. Verify the chat opens at B's first unread message and the DM is not marked as read yet (it stays bold in the LHN, and there's no ReadNewestAction request in the network tab).
  6. A scrolls to the bottom of the chat.
  7. Verify the DM is marked as read once B's last message is loaded.

Test 3: Opening a link to an older message

  1. In the same DM, copy the link of a message about 200 messages back.
  2. Go to Account > Troubleshoot > Clear cache and restart > Reset and refresh.
  3. Open the copied link.
  4. Scroll down to the bottom and keep scrolling.
  5. Verify newer messages keep loading until the newest message.
  • Verify that no errors appear in the JS console

Offline tests

  1. Do steps 1-5 of the first test, then turn A's network off.
  2. A opens the DM.
  3. Verify the cached messages show and no error appears.
  4. Turn the network back on and scroll to the bottom.
  5. Verify newer messages load until B's last message.

QA Steps

Same as Tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android-Native-App.mov
Android-Native-App-2.mov
Android-Native-App-3.mov
Android: mWeb Chrome
Android-Mobile-Web.mov
Android-Mobile-Web-2.mov
Android-Mobile-Web-3.mov
iOS: Native
iOS-Native-App.mov
iOS-Native-App-2.mov
iOS-Native-App-3.mp4
iOS: mWeb Safari
iOS-Mobile-Web.mov
iOS-Mobile-Web-2.mov
iOS-Mobile-Web-3.mov
MacOS: Chrome / Safari
Desktop-Web.mp4
Desktop-Web-2.mp4
Desktop-Web-3.mov

@zeryns

zeryns commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Sorry for the delay here, I need a bit more time to test this thoroughly

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T12:50:37.900342Z a456961 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 5c4d639986

ℹ️ 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".

@mukhrr

mukhrr commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Sorry for the delay here, I need a bit more time to test this thoroughly

@zeryns can you pls make sure to finish this one before posting new proposals?! Thanks!

@zeryns

zeryns commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

@zeryns can you pls make sure to finish this one before posting new proposals?! Thanks!

@mukhrr sorry for the inconvenience, I'll make sure to finish this one ASAP

@zeryns
zeryns marked this pull request as ready for review November 25, 2026 06:33
@zeryns
zeryns requested review from a team as code owners November 25, 2026 06:33
@expensify-chore-bot
expensify-chore-bot Bot requested review from mukhrr and removed request for a team November 25, 2026 06:33
@expensify-chore-bot

Copy link
Copy Markdown

@mukhrr 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]

@expensify-chore-bot
expensify-chore-bot Bot requested review from garrettmknight and removed request for a team November 25, 2026 06:33
@zeryns

zeryns commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @mukhrr, I have a few updates on this PR

While testing on mobile, I found newer messages could still get stuck in two cases

  1. Scrolling down fast. If a page arrives while the list is still flinging, FlashList doesn't keep the scroll position, so the view jumps straight to the new bottom. Since onStartReached only fires again after the list leaves the bottom, nothing else loads
Screen.Recording.2026-11-25.at.00.49.33.mov
  1. Leaving the chat and coming back while it's still unread. The second OpenReport moves newestFetchedReportActionID back (e.g. from 75 to 26), so the next GetNewerActions only returns messages we already have, and the list doesn't change
Screen.Recording.2026-11-25.at.01.42.26.mov

To fix this, I added a useEffect in useReportActionsListScroll (I've re-tested all test case on all platforms). When the cursor changes and the user is still at the bottom, it requests the next page, only once per cursor so it can't loop. This also handles the GetNewerActions that useAgentZeroStatusIndicator sends on reconnect, since that one can move the cursor back too

There is also one more thing I left out of this PR and wanted to check with you first. About the early read, in this PR I only added the missing hasNewerActions check in completeSkippedMarkAsRead, which covers test case 2. There's another case that still behaves like main. If a page saved from an earlier visit still has the -1 (newest) marker, the chat gets marked as read as soon as it opens, before OpenReport loads the unread messages (for example in test 1, ReadNewestAction goes out immediately (<1s) after opening the DM)

We can fix it by holding the mount read until OpenReport loads the unread messages, but it would delay the read on open and might leave the chat as unread if the user leaves the chat room immediately

I'm not sure this delay on read is what the product/design team would want, so I left it out of this PR for now. Let me know what you think we should do next!

Comment thread src/hooks/useReportActionsScroll.ts Resolved
Comment thread src/hooks/useMarkAsRead.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bbeb022021

ℹ️ 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".

Comment thread src/hooks/useMarkAsRead.ts Resolved
@mukhrr

mukhrr commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot review

@MelvinBot

Copy link
Copy Markdown
Contributor

Review: one confirmed issue

P2 — Retry the skipped read when newer-message loading finishes
src/hooks/useMarkAsRead.ts:356

The new guard correctly postpones marking the chat as read, but nothing retries it when hasNewerActions becomes false. If the final response only confirms already-cached messages, the viewport and report timestamp can remain unchanged, leaving the chat unread until another scroll, focus change, or message arrives.

Recheck the pending read when pagination finishes, while preserving viewport/focus eligibility. The new test manually invokes completion again, masking the missing production trigger. This confirms the existing reviewer’s P2 finding.

Validation: Two focused unit suites passed: 82 tests. Browser behavior was not verified.


view run

@zeryns

zeryns commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 99d4ec9961

ℹ️ 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".

@mukhrr

mukhrr commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@zeryns I think test 2 fails when the unread messages fit in one more page.

Test 2: The chat isn't marked as read while newer messages are still loading

Clear cache, have 60 unread, open the DM. OpenReport returns 1-26, GetNewerActions returns 27-60 (the last page), and the view jumps to 34-54 with the unread line off screen. ReadNewestAction goes out 0.6s later without any scroll, so 1-33 are never seen. The last page lands with hasNewerActions already false, so MVCP is off for it.

ONe thing though, it is the same on main as well. So @marcaaron we are still good to include this in this PR, aren't we? since it's not what #105204 directly asks to fix, but related in the end

@mukhrr

mukhrr commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

2. Leaving the chat and coming back while it's still unread. The second OpenReport moves newestFetchedReportActionID back (e.g. from 75 to 26), so the next GetNewerActions only returns messages we already have, and the list doesn't change

hmm yeah it makes sense to hold the mount read until OpenReport loads

@mukhrr

mukhrr commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@zeryns Also, right after OpenReport two GetNewerActions go out at the same time. With a cached chat, one uses the cursor from the previous visit and returns 1-49, which are already loaded, and the other returns 26-75. With cleared cache both have the same cursor and both return 27-60. So one of them is extra every time. Can you check where the second one comes from pls?

Comment on lines +192 to +202
useEffect(() => {
if (!hasNewerActions || !newestFetchedReportActionID || requestedNewerCursorRef.current === newestFetchedReportActionID || listHeightRef.current <= 0) {
return;
}
const scrollOffset = listRef.current?.getAbsoluteLastScrollOffset?.();
if (scrollOffset === undefined || scrollOffset > listHeightRef.current * START_REACHED_THRESHOLD) {
return;
}
loadNewerChatsAfterTransitions();
}, [hasNewerActions, newestFetchedReportActionID, listRef, loadNewerChatsAfterTransitions]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you pls use the same guards as useMoneyRequestReportPagination (hasFinishedInitialLoad, isLoadingNewerReportActions) and wrap the call in useEffectEvent so deps are only the cursor and hasNewerActions? I think this also fixes the extra request on open

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated! The extra request on open was actually coming from onStartReached and not the effect. FlashList calls it twice on open, both before the first GetNewerActions comes back. The guards are in the shared load function now, so onStartReached goes through them too and makes it just one request

One small diff tho. I've add the guard in the deps as well. Without it, a second visit would get stuck, because the cursor moves while the response is still marked as loading

@zeryns

zeryns commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

I think test 2 fails when the unread messages fit in one more page.

hmm I'm not sure if it counts as failing and it is expected IMO. In my test, OpenReport loads the unread line plus ~25 newer messages, and the first GetNewerActions (~50 messages) loads right away since we're still near the bottom. So if there are about 75 unread or fewer, everything is loaded without scrolling and the chat is marked as read, same as main (on main it's actually read even before that page comes back). I checked this with 70 unread (read on open) and 85 unread (stays unread until the user scroll). In test 2 it uses 150, so there's still a page left to load

for the jump, could you share where you tested it? I tried the same steps but couldn't reproduce it. Your numbers do match what happens when MVCP is already off when the last page lands tho, so the list ends up around 34-54

@zeryns

zeryns commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

hmm yeah it makes sense to hold the mount read until OpenReport loads

@mukhrr I tried this locally, and it adds a delay before the chat is marked as read. It only kicks in when new messages arrived since the last visit, so the cached newest page is out of date

On the current PR (and main as well), opening the chat sends ReadNewestAction right away, before OpenReport comes back with the new messages

Without the hold (this PR & main)
Screen.Recording.2026-11-26.at.18.29.37.mov

With the hold, ReadNewestAction waits until OpenReport comes back. On a normal connection that's about half a second

With the hold, normal connection
Screen.Recording.2026-11-26.at.18.24.49.mov

On a slow connection (3G simulation) the chat stays unread for about 2 seconds after opening, then it's read once OpenReport comes back

With the hold, 3G connection
Screen.Recording.2026-11-26.at.18.26.07.mov

And also, if the user leaves the chat before OpenReport comes back, the chat would stay unread

With the hold, leaving before OpenReport returns (3G)
Screen.Recording.2026-11-26.at.18.39.26.mov

So the hold makes sure the chat isn't marked as read before the new messages load, but the cost is a short delay before the read, and if the user leaves within that window the chat stays unread. It's also a behavior change from main. Do you think we should add this?

@zeryns

zeryns commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 43bcd58ce8

ℹ️ 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".

Comment on lines +198 to +199
if (!hasNewerActions || !newestFetchedReportActionID || requestedNewerCursorRef.current === newestFetchedReportActionID || listHeightRef.current <= 0) {
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Replay start requests skipped during the initial report load

When a partially cached chat already has a cursor and the user reaches its loaded bottom while OpenReport is pending, onStartReached now returns at the loading guard. If OpenReport returns the same page/cursor, clearing the loading flag cannot resume pagination: this comparison matches the cursor used to initialize requestedNewerCursorRef, despite no newer request having been made. Since FlashList has consumed its start-zone callback, newer messages remain unloaded until the user scrolls away and back. Track the deferred start request or initialize the ref as unrequested so finishing the initial load retries it.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this one. I've tested this on native app, desktop and mobile web, but couldn't reproduce it, even when forcing the conditions (failing the first GetNewerActions and delaying OpenReport)

On the first visit in a session, the list remounts after OpenReport finishes, so onStartReached runs again. On later visits, onStartReached fires before OpenReport sets the loading flag, so it isn't skipped and the request just waits for OpenReport to finish

Comment thread src/hooks/useMarkAsRead.ts Outdated
@@ -274,6 +274,7 @@ function useMarkAsRead({
const shouldReadOnReportChange = ((isVisible && Visibility.hasFocus()) || isFromNotification) && !hasNewerActions && isScrolledToEnd;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zeryns comparing lastVisibleActionCreated with newest loaded action doesnt work, newest message is already in Onyx on mount so read still goes out early. Lets add the hold, but only while OpenReport is loading so normal opens read right away. cc @marcaaron

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated! however, this approach still has the cost I mentioned here

one small note: we couldn't use isLoadingInitialReportActions for the check, because OpenReport hasn't set it yet when the chat opens, so the chat was still read right away instead of waiting for OpenReport

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if OpenReport fails? Hold only clears when pages change, so chat may stay unread untill next open. Can you check pls

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah, when OpenReport fails the pages don't change, so the hold stayed on and the chat stayed unread

updated it so the hold also ends once OpenReport finishes, so the chat is read right after a failure too. Could you please review it again? thanks!

@mukhrr

mukhrr commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

for the jump, could you share where you tested it? I tried the same steps but couldn't reproduce it. Your numbers do match what happens when MVCP is already off when the last page lands tho, so the list ends up around 34-54

hmmm, I am not able to rerpoduce this anymore too

@zeryns

zeryns commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: a456961c9f

ℹ️ 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".

@codecov

codecov Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/hooks/useMarkAsRead.ts 98.89% <100.00%> (+0.14%) ⬆️
src/hooks/useReportActionsScroll.ts 96.74% <100.00%> (ø)
...ort/ReportActionsList/ReportActionsListContent.tsx 98.09% <ø> (ø)
...rt/ReportActionsList/useReportActionsListScroll.ts 95.04% <100.00%> (+0.98%) ⬆️
src/selectors/ReportMetaData.ts 97.26% <100.00%> (+0.03%) ⬆️
... and 7172 files with indirect coverage changes

@mukhrr

mukhrr commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
107793-android-app.mp4
Android: mWeb Chrome
107793-android-web.mp4
iOS: HybridApp
107793-ios-app.mp4
iOS: mWeb Safari
107793-ios-web.mp4
MacOS: Chrome / Safari
web.mp4

@mukhrr mukhrr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@melvin-bot
melvin-bot Bot requested a review from marcaaron December 1, 2026 04:08
Comment thread src/hooks/useMarkAsRead.ts Resolved
@marcaaron
marcaaron merged commit c935716 into Expensify:main Dec 1, 2026
44 of 45 checks passed
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

🚧 marcaaron has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@OSBotify

OSBotify commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/marcaaron in version: 9.5.57-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed — this PR restores expected message loading and read-status behavior when opening older messages, without adding a feature or making existing help instructions incorrect.


view run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants