Keep icon for 3 suggested rules after copy update - #98199
Conversation
|
@mjasikowski 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] |
|
(Yuwen's Agent) Root cause: the remote build cache missed ( Other open PRs' same build job pass in ~45s via a cache hit, so this only surfaces when the cache misses. Failed run. Re-running once the workflow finishes. |
|
(Yuwen's Agent) Recurred identically after the ESLint fix push — same file, same lines, same cache-miss trigger. Confirmed this is a reproducible (not one-off) issue and filed Expensify#670173 to track it separately, since it's unrelated to this PR's changes and any PR can hit it on a cold cache. |
…gested-rule-icons
|
🚧 yuwenmemon has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/yuwenmemon in version: 9.4.53-0 🚀
|
|
🤖 No help site changes required. This PR is a purely internal cosmetic fix: Why no docs update is needed
Since no docs changes are needed, I did not open a draft help site PR. |
Explanation of Change
getSuggestedAgentRuleIconpicks a suggestion's icon by keyword-matching itsid + titletext. Web-Expensify#55257 updates the in-product suggested-rule titles with newly-reviewed copy, and three of the new titles pick up a keyword that outranks the one that used to describe them (or drop their only match entirely), silently flipping their icon. This adds an explicit per-id override for those three so their icon staysFlagregardless of how the title is worded, and adds regression tests pinned to the exact new titles.Fixed Issues
$
PROPOSAL:
Tests
Covered entirely by unit tests, no UI to manually verify beyond what's already exercised by tests/unit/getSuggestedAgentRuleIconTest.ts.
npx jest tests/unit/getSuggestedAgentRuleIconTest.ts.number-of-expenses,receipt-transaction-mismatch, anditemized-split-recommended.Offline tests
N/A — pure client-side string matching, no network or Onyx dependency.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Not applicable — no visual/UI change, pure logic fix covered by unit tests.