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.3.67-11
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from BrowserStack:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @shawnborton
Slack conversation (hyperlinked to channel name): #Expensify Bugs
Action Performed:
- Trigger an email notification with multiple messages (e.g., chat thread or report activity)
- Open the email
- Observe the order of messages
Expected Result:
Messages should be displayed in chronological order with the latest message at the bottom
Actual Result:
Messages are displayed in reverse order
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
MelvinBot investigation:
I investigated the email notification comment ordering code. Here's what I found:
The array_reverse() on email comments has been in the code since at least Oct 2024 (and likely since Jan 2023 when getCommentBlock() was first created). This means email notifications have shown newest-on-top for a long time — this is not a recent regression.
The data flow is:
1. Auth returns comments in ASC order (oldest first) via getHistory() with ACTION_ORDER_ASC
2. Comment.php:686 calls array_reverse() → flips to newest-first
3. The for loop renders them top-to-bottom → newest comment appears at top of email
Recent changes reviewed:
• App PR #85114 (FlashList migration) — purely frontend, zero impact on email notifications
• Commit 47b5d98640 (Apr 21, 2026) — added usort() + system message filtering in ReportUtils.php:3190. The usort sorts by created ASC which is the same order the data was already in, so this shouldn't have changed display order.
Bottom line: I could not find a recent commit that changed the ordering. The newest-on-top behavior appears to be long-standing. If the ordering truly needs to be oldest-on-top (newest-on-bottom), the fix would be to remove the array_reverse() call on line 686 of Comment.php. But I'd recommend first confirming with the reporter whether this is actually a recent change vs. something that was always this way and is only now being noticed.
Screenshots/Videos
View all open jobs on GitHub
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.3.67-11
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from BrowserStack:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @shawnborton
Slack conversation (hyperlinked to channel name): #Expensify Bugs
Action Performed:
Expected Result:
Messages should be displayed in chronological order with the latest message at the bottom
Actual Result:
Messages are displayed in reverse order
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
MelvinBot investigation:
I investigated the email notification comment ordering code. Here's what I found:
The array_reverse() on email comments has been in the code since at least Oct 2024 (and likely since Jan 2023 when getCommentBlock() was first created). This means email notifications have shown newest-on-top for a long time — this is not a recent regression.
The data flow is:
1. Auth returns comments in ASC order (oldest first) via getHistory() with ACTION_ORDER_ASC
2. Comment.php:686 calls array_reverse() → flips to newest-first
3. The for loop renders them top-to-bottom → newest comment appears at top of email
Recent changes reviewed:
• App PR #85114 (FlashList migration) — purely frontend, zero impact on email notifications
• Commit 47b5d98640 (Apr 21, 2026) — added usort() + system message filtering in ReportUtils.php:3190. The usort sorts by created ASC which is the same order the data was already in, so this shouldn't have changed display order.
Bottom line: I could not find a recent commit that changed the ordering. The newest-on-top behavior appears to be long-standing. If the ordering truly needs to be oldest-on-top (newest-on-bottom), the fix would be to remove the array_reverse() call on line 686 of Comment.php. But I'd recommend first confirming with the reporter whether this is actually a recent change vs. something that was always this way and is only now being noticed.
Screenshots/Videos
View all open jobs on GitHub