[Payment due @abdulrahuman5196] Improve column auto-mapping when the file structure is different - #96654
Conversation
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.
|
|
@abdulrahuman5196 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] |
|
@ikevin127 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba05f09ca3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| // Whether each column may auto-detect its role from its header. Flows that compute the whole mapping in one | ||
| // coordinated pass (e.g. company cards) set this to false to avoid duplicate pre-selections. | ||
| shouldAutoDetectColumns?: boolean; |
There was a problem hiding this comment.
❌ CONSISTENCY-10 (docs)
Per STYLE.md, component props must be documented with a /** ... */ block comment above the prop, not a // line comment. The newly added shouldAutoDetectColumns prop is documented with // comments.
Convert the // comment into a JSDoc block:
/**
* Whether each column may auto-detect its role from its header. Flows that compute the whole mapping in one
* coordinated pass (e.g. company cards) set this to false to avoid duplicate pre-selections.
*/
shouldAutoDetectColumns?: boolean;Reviewed at: ba05f09 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
|
This one is for @abdulrahuman5196 to review best on first C+ assignment, if I'm needed due to Abdul not being available - ping me, meanwhile I'll unsubscribe 🙌 |
|
I can review, Is this ready for review? Hold is added |
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required on this one.
|
@abdulrahuman5196 All yours |
|
@codex Review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@codex review |
|
@chiragsalian 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] |
|
🎯 @abdulrahuman5196, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
Looks like you have a valid AI review you didnt handle - #96654 (comment). The rest of the code LGTM |
|
Bump any update here? |
All yours! Sorry about the delay! Work got in the way of work! |
|
🚧 chiragsalian has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.4.82-0 🚀
|
|
🤖 Yes — help site changes are required. Draft PR: Docs updates for E/A#96654 Company card CSV column auto-mapping behavior One article documents this flow, and it described the old behavior: Import-Company-Card-Transactions-From-a-Spreadsheet.md said "Previously mapped fields auto-fill to save time" and never mentioned that mappings are pre-filled from the file's column headers at all. What the article now says, matching
Changes made and how labels were verifiedChanges (all in
Labels verified against the strings the app renders in No other article needed changes. The Not run: cspell on the changed file — the sandbox blocked the command. The added wording is ordinary English, but CI will confirm. @Gonals, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.4.86-0 🚀
|
|
🤖 Yes, help site changes were required. Draft PR: Docs updates for E/A#96654 header-first company card CSV column mapping One article needed updating — Import Company Card Transactions From a Spreadsheet. It described the auto-fill only as "previously mapped fields auto-fill," which no longer matches what admins see now that mappings are matched from the uploaded file's column headers first and fall back to saved column positions second. What the docs PR changes:
No other article needs changing. Two accuracy details worth confirmingBoth were checked against
Label verification: The docs PR has no linked issue: this PR's own linked issue is internal, so it isn't referenced from a public docs PR. Add one if the automation needs it. @Gonals, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.4.89-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.89-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Payment issue created: #101623 |
Explanation of Change
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/662378
PROPOSAL:
Tests
Go to Workspaces->Company Cards-> Add cards and add some cards via CSV:
uploads_1594908368712-Best+Example+CSV+for+Domains.csv
Wait until the cards show up
In the feed, go to settings -> Import from spreadsheet and add more cards from a differently structured file:
fake_transactions-2026-01-16 10_56_55.629.csv
Confirm the auto-mapping of columns makes sense. It won't be perfect, as some columns are different, but there should not be attributes double assigned or things like date being assigned to the amount column.
Offline tests
None
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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari