Skip to content

Spend - Expense remains on "Violations by submitter" despite solving violation. #100114

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.66-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #98391
Email or phone of affected tester (no customers): ibellicotest+2766@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome
App Component: Search

Action Performed:

Prerequisite: Account has at least one workspace with an invited member.
Prerequisite 2: Rules enabled.
Prerequisite 3: Submissions and approvals enabled.

  1. Open the staging.new.expensify.com website.
  2. Navigate to workspace chat as Admin.
  3. Create at least three expenses with different violations.
  4. Submit the just created expenses.
  5. Navigate to "Spend" > "Violations by submitter"
  6. Click on the "Date" exposed filter and change to "This Month"
  7. Expand the row with the just created expenses.
  8. Open one of the expenses.
  9. Solve the violation.
  10. Close RHP to return to "Violations by submitter"
  11. Note that expense is still visible but violation was cleared.
  12. Navigate to "Inbox" and return to "Violations by submitter"
  13. Note that expense remains visible and expense counter still show de same amount of expenses.

Expected Result:

Expense should disappear from "Violations by submitter" after violation is solved.

Actual Result:

Expense remains visible on "Violations by submitter" after violation is cleared-

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7248564_1788313280973.By_1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7248564

Activity

  1. applause-bot commented on Sep 2, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/b576cc3f311fdc7f38e22ee5290d63766b106759b2dc33501d50ade6006d826c

  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 2, 2026
  3. melvin-bot commented on Sep 2, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #98391

  4. melvin-bot commented on Sep 2, 2026

    @melvin-bot

    @neil-marcellini @cretadn22 you have been assigned to this deploy blocker because you reviewed the offending PR: #98391

  5. github-actions commented on Sep 2, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. melvin-bot commented on Sep 2, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  7. MelvinBot commented on Sep 2, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug (App feature area) — but the reported behavior is the intended semantics of the filter, not a code defect
    Causing PR: #98391 - "[Insights: Violations]: Expanding group & Suggested search v2" by nkdengineer (High confidence that this PR shipped the feature; Low confidence that it introduced a defect)
    Related Issues: #95859 (design issue for this feature), #98204, #98244

    Recommendation: DEMOTE

    "Violations by submitter" is built on the has:submitted-violation filter, which by design matches expenses that had a violation at the moment they were submitted — it is a historical/insight view, not a live to-do list. Resolving a violation after submission does not (and cannot) change the submit-time snapshot, so the row and the expense counter correctly stay put; a revert of #98391 would not change this behavior since the matching is done server-side.

    Assigned: nkdengineer (PR author), neil-marcellini and cretadn22 (approving reviewers) from the highest-confidence causing PR only
    Labels: No label changes made. DeployBlockerCash was left in place — the issue is not reproducible in production (new feature), and the demotion is a product-intent call that should be confirmed by an internal engineer before the blocker is removed. DeployBlocker was not present, so nothing was removed there.

    📋 Detailed Analysis

    Evidence

    • The whole feature is explicitly scoped to submit-time violations. The design issue for this PR, [Due for payment 2026-09-09] [Insights: Violations][R1] App - Expanding group & Suggested search #95859, describes the expanded-group work as: "Add a Violations column showing which rules each expense broke at submission time", and specifies the suggested search query as type:expense group-by:from date:last-month has:submitted-violation view:table limit:10.
    • The backend filter has:submitted-violation (added in an earlier phase of the same project, before this PR) is specified to return expenses that had a violation when they were submitted, evaluated against the submission snapshot. Filtering and group counts are computed server-side, so the App has no say in whether the row is returned.
    • The App's own data model documents the same semantics — the field the Violations column reads is described as a "Snapshot of transaction violations present when the report was submitted".
    • Not reproducible in production only because the feature is new; there is no prior behavior that regressed.
    • The App does re-fire the search when you return to the screen (see below), so "navigate to Inbox and back doesn't help" is consistent with the server legitimately still returning the expense — it is not a stale-snapshot/caching problem.

    Verification

    Root Cause

    There is no faulty code path. The list membership and the per-submitter expense count are produced by the server for the query has:submitted-violation, which is evaluated against the report's submission snapshot. Clearing a violation after the report was submitted leaves that snapshot untouched, so the expense continues to match and the count stays the same. The App faithfully renders what the search returns, and the Violations column deliberately reads the same immutable submit-time record.

    The expected result in the report ("expense should disappear once the violation is solved") describes live-violation semantics, which is a different filter than the one this insight uses.

    If the product decision is that the insight should instead reflect current violations, then:


    view run

  8. cretadn22 commented on Sep 2, 2026

    @cretadn22
    Contributor

    This is working as intended. The "Violations by submitter" view displays expenses that had violations at the time of submission, so the expense remains visible even after the violation is resolved.

  9. neil-marcellini commented on Sep 2, 2026

    @neil-marcellini
    Contributor

    Yep haha. Expected so closing.

    I do wonder if we will see regular customer confusion and might have to add some kind of explainer text, but we can figure that out once it's proven to be an issue.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringHourlyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions