Repository navigation
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🤖 Android test steps verification results: ❌ fail Testing was blocked: the Android account shows “No workspaces yet,” and available tools could not provision the required QBO-connected Control workspace. PR build identity could not be independently confirmed; these results do not establish a feature failure.
|
This comment has been minimized.
This comment has been minimized.
|
🤖 Web test steps verification results: ❌ fail Blocked on dev NewDot web: the signed-in account shows “No workspaces yet,” so the required QBO-connected Control workspace is unavailable. No feature failure was established.
|
This comment was marked as resolved.
This comment was marked as resolved.
|
Pushed 51138c3:
Passed: 55 targeted tests, lint, TypeScript, spelling, formatting, and Storybook smoke test. Full local Jest run timed out after 10 minutes. CI is rerunning. Independent approval still requires human review. |
This comment was marked as resolved.
This comment was marked as resolved.
|
|
|
|
51138c3 to
fa653f3
Compare
|
🤖 Web test steps verification results: ❌ fail Force-pushed to fa653f34c61, confirmed GitHub’s head matches exactly and
view run · no recording available |
This comment has been minimized.
This comment has been minimized.
|
Confirmed: the PR branch now points exactly to fa653f34c61, not merely an equivalent tree. GitHub and the remote branch both report that SHA. No further changes or push were needed. |
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
|
Knip failed because two internal types were unnecessarily exported. While I tested the fix, the identical change landed in 12b618d, so no additional push was needed. Knip now passes. Local verification passed 74 targeted tests, lint, TypeScript, spelling, formatting, and Storybook. Full local Jest timed out. The only remaining failure is independent approval, which requires human review. |
This comment has been minimized.
This comment has been minimized.
|
|
|
@MelvinBot Please replace the PR description with the below one Also change the PR title to DescriptionExplanation of ChangeAdmins moving card spend from QuickBooks Online bank feeds had to re-create their bank rules in Expensify by hand. QuickBooks Online has no API for bank rules, but it can export them to a file. This PR lets a workspace connected to QuickBooks Online import that file as merchant rules, without mapping any columns. The import is under Rules > More > Import QuickBooks Online rules, and only shows when the workspace is connected to QuickBooks Online. Collect workspaces go to the upgrade flow first, the same as New rule.
A QuickBooks Online rule is imported only when the merchant rule it becomes matches no expense the original wouldn't, and sets nothing the original doesn't:
The review page counts the rules only after the workspace's categories, tags, existing rules and QuickBooks Online data have fully loaded. If one of them fails to load, it shows an error with Try again. Offline, it only shows counts when that data was fully loaded earlier in the session. No backend change is needed: the rules go through the existing Fixed Issues$ #107578 TestsPrerequisite
Test 1: Import QuickBooks Online rules
Test 2: Upload a file that isn't a QuickBooks Online export
Test 3: Import the same file again
Test 4: Workspace without QuickBooks Online
Test 5: Collect workspace
Test 6: Import merchant rules still works
Offline testsSame as tests QA StepsSame as tests
PR Author Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safari |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb Safari |
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Please remove the No-QA from the title |
|
Removed |
|
Could you confirm these #108272 (comment) before CME review. Thanks! |
|
Left some changes for follow-ups, because they also happen on main and need shared changes/DRY |
pecanoro
left a comment
There was a problem hiding this comment.
These comments come from a review I ran with Claude.
| } | ||
| isMoneyOutRule = true; | ||
| break; | ||
| case RULE_TYPE.DOES_NOT_CONTAIN: |
There was a problem hiding this comment.
For an Any rule, can we drop the "Doesn't contain" condition instead of skipping the whole rule? Dropping it is as safe as dropping an amount condition. For example, contains HILTON or doesn't contain REFUND could still import as contains HILTON.
| goBackToImportedMerchantRules(policyID); | ||
| }; | ||
|
|
||
| const importRules = async () => { |
There was a problem hiding this comment.
A fast double tap on Import can send the request twice, which creates every rule twice. Can we add shouldShowLoadingImmediatelyOnPress to the button to block the second tap?
| } | ||
|
|
||
| // The server may have saved the rules, so they're read again, and one write marks that read in flight (offline nothing is sent) so no other screen sends its own | ||
| Onyx.multiSet({[ONYXKEYS.RAM_ONLY_HAS_RULES_DATA_BEEN_FETCHED]: false, [ONYXKEYS.RAM_ONLY_IS_LOADING_RULES]: !getIsOffline()}); |
There was a problem hiding this comment.
When an import fails, this reloads every rule from the server, and that reload replaces the rules stored on the device. A rule showing an error, from an earlier save that failed, would lose its error. Can we reload only when the request got no response, since that's the only case where the server might have saved the rules?
| const hasSeenReadInFlight = useHasSeenReadInFlight(policyID, isLoading); | ||
|
|
||
| // A read whose request threw stays loading for good, so a retry sends it whether or not one looks in flight | ||
| const retryLoadPolicyVendors = () => { |
There was a problem hiding this comment.
This hook copies the loading and retry logic of useLoadPolicyCategories and useLoadPolicyTags, and usePolicyConnectionsPrefetch repeats the same failure check. Can we move it into one shared hook?
|
Please merge main |
Co-authored-by: TaduJR <TaduJR@users.noreply.github.com>
|
Merged 233 targeted tests passed. Typecheck hit native dependency errors; full Jest timed out, and formatting verification was blocked by command permissions. |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: TaduJR <TaduJR@users.noreply.github.com>
|
|
|
|
|
A preview of your ExpensifyHelp changes have been deployed to https://b91ef321.helpdot.pages.dev ⚡️ Updated articles: |
|
Please merge main |
|
Resolved the two merge conflicts locally; 93 targeted tests, lint, typecheck, and Storybook smoke tests passed. I couldn’t push: the publishing tool doesn’t support merge commits. The PR is unchanged and needs |
|
New conflicts 😞 |
|
This all seems fine @TaduJR.
Sure, I'll do this. |
|
@TaduJR here's a real bank rules export from a QuickBooks Online test company (16 rules). It includes Bank text conditions with Contains, Is exactly and Doesn't contain, plus Amount conditions, an Any/OR rule, a split rule, and rules scoped to a single account. The format matches the test file on the issue (QBO_Rules_Test_Import.xls): same three columns and the same ruleType/actionType codes. On the Description vs Bank text question: the export doesn't record which field a text condition checks. It only has the match type (6 contains, 13 is exactly, 8 doesn't contain), and the current QBO editor only offers "Bank text" and "Amount." So there's no separate Description code to handle. |
|
@MelvinBot Please make this branch match fork's Don't add anything on top, don't change the PR description, and skip local checks. CI will run them. If you can't force-push, stop and tell me instead of committing on top. |
|
I can’t force-push an existing commit with the available publishing tool; it only publishes new commits. I stopped without changing the branch or PR description, adding commits, or running local checks. |
|
Closing this PR and re-raising a new one since Melvin got updated and we need to continue on a new PR inorder for him to work |












Explanation of Change
QuickBooks Online has no API for bank rules, but it can export them to a file. This PR lets a workspace connected to QuickBooks Online import that file as merchant rules from Rules > More > Import QuickBooks Online rules, without mapping any columns. The flow is an instructions page, the file upload, a review page with the counts and field mapping, and a summary after Import.
A QuickBooks Online rule is imported only when the merchant rule it becomes matches no expense the original wouldn't, and sets nothing the original doesn't. The exception is the bank account: an expense has none, so a rule limited to one bank account applies to every expense, which the instructions page says. Rules a merchant rule can't reproduce, such as money in, "Doesn't contain", split and exclude, are skipped. Settings that can't carry over, such as a category the workspace doesn't have, are left out, and rules the workspace already has aren't added again. When rules overlap, the higher rule in the file wins any field both set. A lower rule can still add a field the higher one doesn't set, because Expensify applies every matching rule. This was accepted in the proposal review, and the help article explains it.
No backend change is needed: the rules go through the existing
ImportMerchantRulesSpreadsheetcommand. These shared parts changed, so they need a regression check:ImportSpreadsheetnow share code with this import.AI Tests
969684bd897.Fixed Issues
$ #107578
PROPOSAL: #107578 (comment)
Tests
Prerequisite
COFFEE CORNER, set a category (Category A)COFFEE, set a different category (Category B)STRIPE, set any categoryTest 1: Import QuickBooks Online rules
COFFEE CORNERandCOFFEErules.COFFEE CORNER 42. Verify its category is Category A.Test 2: Import the same file again
Test 3: Upload a file that isn't a QuickBooks Online export
Test 4: Workspace without QuickBooks Online
Test 5: Collect workspace
Test 6: Import merchant rules still works
Offline tests
COFFEE CORNERandCOFFEErules on the Expense defaults tab.QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari