Remove unsafe type assertions from Plaid connection - #98846
Draft
KJ21-ENG wants to merge 1 commit into
Draft
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Removes six unsafe type assertions from the Plaid company-card connection step. The shared Plaid success metadata union now narrows the web and native institution shapes directly, raw Plaid institution IDs remain strings through the add-card and assign-card data contracts, and an optional company-card domain suffix is removed only when the import request is built. Existing empty-error fallback, missing-institution handling, bank naming, account selection, and import behavior are preserved.
Fixed Issues
$ #94739
PROPOSAL: #94739 (comment)
Count change
Current baseline source:
config/eslint/eslint.seatbelt.tsvat basee69182c5379d82f41b6c9d6b7c7237d2c1cb0dd1.Before:
src/pages/workspace/companyCards/addNew/PlaidConnectionStep.tsx: 6 violationsAfter:
src/pages/workspace/companyCards/addNew/PlaidConnectionStep.tsx: 0 violationsNet reduction:
TSV evidence:
config/eslint/eslint.seatbelt.tsvbyte-for-byte after confirming zero cleanup findings in the target and approved support paths.Changed files
src/pages/workspace/companyCards/addNew/PlaidConnectionStep.tsxsrc/libs/actions/Plaid.tssrc/types/onyx/AssignCard.tssrc/types/onyx/CardFeeds.tsTests
src/components/AddressSearch/index.tsx.git diff --check, exact changed-path proof, and generated-TSV restoration passed.32107998656passed typecheck, lint, format, React Compiler, and Jest at signed commitb16d549be9465de5e1dc0bfaa27e8bef119a5915.No manual application testing was performed; the evidence above is automated verification and independent review.
Offline tests
N/A: Plaid account linking requires network access, this cleanup does not change networking or offline behavior, and no manual offline testing was performed.
QA Steps
PR Author Checklist
N/A rationale: no intended product behavior, copy, CSS, assets, networking, deeplink, Storybook story, messaging flow, generic component, or new feature/bug flow is introduced. No manual platform, high-traffic-account, offline, console, screenshot/video, staging, or production testing was performed. The web/native metadata shapes and downstream Plaid data contracts were examined during planning and independent review, and exact-head CI covered the full repository checks. Every item below was considered against that scope.
### 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
N/A: no UI or visual behavior changed, and no screenshots or videos were produced.
Changed files (4)
src/libs/actions/Plaid.ts(reserved support path)src/pages/workspace/companyCards/addNew/PlaidConnectionStep.tsxsrc/types/onyx/AssignCard.ts(reserved support path)src/types/onyx/CardFeeds.ts(reserved support path)