You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expense report- Violation expense follows the expense without violation #96371
Version Number: 9.4.36-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#96022 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Pixel 7a/ Android 16 App Component: Chat Report View
Create an expense with violation (date: today, leave the category empty)
Create 2 more expense without violation (date is older than today)
Open the report
Expected Result:
Step 4 in PR :Verify that the expense with a violation is and then followed by an expense without a violation
Actual Result:
Expense with a violation follow the expenses without violation in report page.
If create an expense with a violation when enable rules (ex: amount over $25 without receipt), the violation expense is displayed first
This looks like a duplicate of #90063 ("Expense without category appears in the first place in carousel, then moves to last place"), which already has an approved root-cause analysis and an open fix in review (#90464). The two reports describe the same bug at different moments: #90063 captures the transition (violation expense flashes to the top, then drops), and this issue captures the settled end state (violation expense sits below the non-violation ones).
On creation, the client writes an optimisticmissingCategory violation with showInReview: true (ViolationsUtils.ts:553-554), so the empty-category expense briefly sorts first.
When the server response syncs, its missingCategory violation comes back with showInReview false/omitted, so hasViolation(..., true) now returns false. RBR disappears and the expense falls back to its natural date order — and since it has today's date (newest) while the others are older, it lands last.
This is exactly why the rules-based case behaves differently: a receiptRequired-type violation is returned by the server with showInReview: true, so it keeps its RBR and stays on top. The sort itself is violation-type-agnostic — the divergence is entirely in the synced showInReview flag.
Both missingCategory and rules-based violations are stored as type: VIOLATION, so the comparator treats them identically when present — the bug is that the synced missingCategory fails the showInReview === true filter, not that its type differs.
Scope note: The in-review fix (#90464) only touches the carousel preview (MoneyRequestReportPreviewContent.tsx). This report is about the report page transaction list, which sorts through the same transactionHasRBR/showInReview path. Whoever picks this up should confirm the report-page ordering is covered too, not just the carousel — and decide whether the durable fix belongs on the client (don't require showInReview for missingCategory RBR) or on the server (return missingCategory with showInReview: true, matching receiptRequired).
Recommended next step: Close this as a duplicate of #90063 and track the fix there, while confirming the report-page path is included in the fix scope.
Reply with @MelvinBot <your feedback> to refine this analysis.
📣 @zeryns! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
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!
This issue has not been updated in over 15 days. 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!
Activity
applause-bot commentedon Jul 17, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/ba901dbcb3032f78b94393eff22aea573076cfbe89d121836a2f3dd2a1ba240d
https://platform.applause.com/services/links/v1/external/776453f338494e35258a15253e08c856d89a3560b9d37d99928037fadc15e800
https://platform.applause.com/services/links/v1/external/aaff819b2c99cb59644fe4e1abed96f200d31f604488cfffe04ec564dd834c20
MelvinBot commentedon Jul 17, 2026
Issue Analysis
This looks like a duplicate of #90063 ("Expense without category appears in the first place in carousel, then moves to last place"), which already has an approved root-cause analysis and an open fix in review (#90464). The two reports describe the same bug at different moments: #90063 captures the transition (violation expense flashes to the top, then drops), and this issue captures the settled end state (violation expense sits below the non-violation ones).
Root Cause: The report/carousel sort pushes transactions with a red-brick-road (RBR) indicator to the top, and RBR is detected via
transactionHasRBR→hasViolation(..., showInReview=true). That check only counts a violation whenshowInReview === true(TransactionUtils/index.ts:2135).missingCategoryviolation withshowInReview: true(ViolationsUtils.ts:553-554), so the empty-category expense briefly sorts first.missingCategoryviolation comes back withshowInReviewfalse/omitted, sohasViolation(..., true)now returnsfalse. RBR disappears and the expense falls back to its natural date order — and since it has today's date (newest) while the others are older, it lands last.This is exactly why the rules-based case behaves differently: a
receiptRequired-type violation is returned by the server withshowInReview: true, so it keeps its RBR and stays on top. The sort itself is violation-type-agnostic — the divergence is entirely in the syncedshowInReviewflag.Investigation details
MoneyRequestReportTransactionList.tsx:386-405useReportPreviewCarousel.tsx:88-104missingCategoryand rules-based violations are stored astype: VIOLATION, so the comparator treats them identically when present — the bug is that the syncedmissingCategoryfails theshowInReview === truefilter, not that its type differs.showInReviewconclusion with the same code path.Scope note: The in-review fix (#90464) only touches the carousel preview (
MoneyRequestReportPreviewContent.tsx). This report is about the report page transaction list, which sorts through the sametransactionHasRBR/showInReviewpath. Whoever picks this up should confirm the report-page ordering is covered too, not just the carousel — and decide whether the durable fix belongs on the client (don't requireshowInReviewformissingCategoryRBR) or on the server (returnmissingCategorywithshowInReview: true, matchingreceiptRequired).Related issues (likely duplicate):
Recommended next step: Close this as a duplicate of #90063 and track the fix there, while confirming the report-page path is included in the fix scope.
Reply with
@MelvinBot <your feedback>to refine this analysis.melvin-bot commentedon Jul 17, 2026
📣 @zeryns! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
melvin-bot commentedon Jul 17, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
melvin-bot commentedon Jul 20, 2026
Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Jul 22, 2026
Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Jul 24, 2026
Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Jul 28, 2026
10 days overdue. I'm getting more depressed than Marvin.
melvin-bot commentedon Jul 30, 2026
12 days overdue. Walking. Toward. The. Light...
melvin-bot commentedon Jul 31, 2026
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!
melvin-bot commentedon Aug 3, 2026
This issue has not been updated in over 14 days. eroding to Weekly issue.
melvin-bot commentedon Aug 27, 2026
This issue has not been updated in over 15 days. 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!
melvin-bot commentedon Nov 9, 2026
@applause-bot[bot], this Monthly task hasn't been acted upon in 6 weeks; closing.
If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.