Skip to content

[CP stag] Revert "[Insights: Violations]: Expanding group & Suggested search" - #98345

Merged
jasperhuangg merged 1 commit into
mainfrom
revert-97067-fix/95859
Aug 11, 2026
Merged

jasperhuangg merged 1 commit into
mainfrom
revert-97067-fix/95859

Conversation

@jasperhuangg

@jasperhuangg jasperhuangg commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Reverts #97067

Fixed Issues

$ #98204
$ #98208
$ #98244
$ #98253
$ #98261

@jasperhuangg
jasperhuangg requested review from a team as code owners August 11, 2026 18:46
@melvin-bot
melvin-bot Bot requested review from JmillsExpensify and Valforte and removed request for a team August 11, 2026 18:46
@melvin-bot

melvin-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

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

@Valforte

Valforte commented Aug 11, 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 proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and 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 that this PR follows the guidelines as stated in the Review Guidelines
  • 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 a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • 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.
  • 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
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari

@jasperhuangg

Copy link
Copy Markdown
Contributor Author

(Jasper's Agent) Notes on the five linked issues, so none of them get closed as fixed by this revert.

Fixed by the revert. These are App-side bugs from the PR, and the two to fix before we re-land:

  • 98204 Violations column missing from the column list
  • 98244 Row highlighted when the Submitted violation filter is not selected

Not fixed. These come back when we re-land:

  • 98208 and 98253 are the submit-time snapshot working as designed. The search matches expenses that had a violation when they were submitted. It never re-checks current state. So fixing a violation later does not drop the row, and an expense added to an already submitted report never shows up. These need a product call, not a code fix.
  • 98261 is a real bug, but it sits in Auth, not in this PR. buildMessageSnapshot writes every violation from reportIDToViolations and never calls shouldKeepViolation. Dismissed violations get baked into the submit action, and the search matches on key presence alone. That code shipped in Release 0 and stays on main after this revert.

One more note on 98261: the snapshot is write-once. A fix only helps reports submitted after it deploys. Reports submitted before then keep the bad snapshot unless someone backfills.

cc @nkdengineer @cretadn22 @neil-marcellini. Neil, the product call on 98208 and 98253 is yours since you wrote the Release 1 doc.

@jasperhuangg jasperhuangg changed the title Revert "[Insights: Violations]: Expanding group & Suggested search" [CP stag] Revert "[Insights: Violations]: Expanding group & Suggested search" Aug 11, 2026
@nkdengineer

Copy link
Copy Markdown
Contributor

@jasperhuangg 98204 is demoted. 98244 raised a fix for this. Other issues are expected or backend issue. So I think we don't need to revert

@nkdengineer

Copy link
Copy Markdown
Contributor

Or we can do my suggestion here instead #98261 (comment)

@codecov

codecov Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

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.

Files with missing lines Coverage Δ
src/CONST/index.ts 94.81% <ø> (ø)
...archList/ListItem/TransactionGroupListExpanded.tsx 67.69% <100.00%> (ø)
.../TransactionListItem/TransactionListItemNarrow.tsx 0.00% <ø> (ø)
...em/TransactionListItem/TransactionListItemWide.tsx 0.00% <ø> (ø)
src/components/Search/SearchTableHeader.tsx 49.43% <ø> (ø)
...ents/TransactionItemRow/TransactionItemRowWide.tsx 98.37% <ø> (-0.03%) ⬇️
src/hooks/useSearchShouldCalculateTotals.ts 100.00% <ø> (ø)
src/hooks/useSearchTypeMenuSections.ts 95.08% <ø> (ø)
src/libs/ReportActionsUtils.ts 78.47% <ø> (ø)
src/libs/SearchUIUtils.ts 65.99% <ø> (-0.74%) ⬇️
... and 2 more
... and 37 files with indirect coverage changes

@jasperhuangg

Copy link
Copy Markdown
Contributor Author

#95859 (comment)

@jasperhuangg
jasperhuangg merged commit 42808f1 into main Aug 11, 2026
57 of 63 checks passed
@jasperhuangg
jasperhuangg deleted the revert-97067-fix/95859 branch August 11, 2026 19:14
@OSBotify

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

Copy link
Copy Markdown
Contributor

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

OSBotify pushed a commit that referenced this pull request Aug 11, 2026
[CP stag] Revert "[Insights: Violations]: Expanding group & Suggested search"

(cherry picked from commit 42808f1)

(cherry-picked to staging by roryabraham)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Aug 11, 2026
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/roryabraham in version: 9.4.52-6 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

Help site review: no changes required

I reviewed the changes in this PR against the help site files under docs/articles and no help site updates are required. I did not create a draft PR.

Why no docs changes are needed
  • This PR is a pure revert of [Insights: Violations]: Expanding group & Suggested search #97067. Every changed file is under src/ or tests/ — there are no docs/articles changes in this PR, and the original feature PR didn't add any help site docs either.
  • The reverted feature was a NewDot Search addition: a "Violations" table column and a "Violations by submitter" suggested search. A search of the help site turns up no article that references either the Violations column or the "Violations by submitter" suggested search — the feature was never documented.
  • The existing Insights/grouping docs (e.g. How-to-Use-Insights-in-Expensify.md and Use-Search-Operators-to-Filter-and-Analyze.md) describe pre-existing, unaffected functionality such as group-by:from ("Group by submitter"), which this revert does not touch.

Since the reverted feature was never reflected on the help site, there's nothing to roll back or update there.

jasperhuangg — since no help site changes are needed, there's no linked docs PR to review. If you believe this feature was documented somewhere I missed, let me know and I'll take another look.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/roryabraham in version: 9.4.52-11 🚀

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

Bundle Size Analysis (Sentry):

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/roryabraham in version: 9.4.53-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site changes required

This PR reverts #97067, removing the "Violations by submitter" suggested search and the expanding-group Violations column from the NewDot Search/Insights UI. That feature was never documented on the help site, so there's nothing to update or remove in App/docs/articles.

What I checked
  • The reverted feature is undocumented. The Available Insights section of How-to-Use-Insights-in-Expensify.md:35 lists only Spend over time, Top Spenders, Top Categories, and Top Merchants — there is no Violations by submitter Insight. A full-text search across docs/articles for "violations by submitter", "violations column", and related phrasing returned no matches.
  • Documented search functionality is unaffected. The general search operators the help site does cover — group-by:from ("Group by submitter"), view:, and has: in Use-Search-Operators-to-Filter-and-Analyze.md:164 — are core features that remain in the product. This revert only removed one prebuilt suggested search and a violations table column, not any documented operator or capability.

Because no App/docs/articles content described the reverted feature, no draft PR was created.

@jasperhuangg, no help site PR was created since the reverted feature isn't covered by any existing help articles. If you believe a specific article should have documented it, let me know which one and I'll take another look.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/roryabraham in version: 9.4.53-10 🚀

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

Bundle Size Analysis (Sentry):

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

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants