[NoQA] API integration for freeze card#82199
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 475ddec0ab
ℹ️ 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".
| const previousFrozen = card?.nameValuePairs?.frozen ?? null; | ||
|
|
||
| const frozenData: PartialDeep<Card> = { | ||
| state: CONST.EXPENSIFY_CARD.STATE.STATE_SUSPENDED, |
There was a problem hiding this comment.
Avoid hiding cards when freezing sets suspended state
Setting state to STATE_SUSPENDED here will make the card disappear from workspace card selectors as soon as freezeCard() runs, because filterInactiveCards() treats suspended cards as inactive (src/libs/CardUtils.ts:798-811) and getAllCardsForWorkspace() applies that filter before details rendering (src/libs/CardUtils.ts:831-833). In that flow, the details page can immediately lose card and render NotFoundPage (src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx:99-101), leaving no in-app path to unfreeze.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
We need to show the frozen card in the list and will be handled in a future PR.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
| type CardListUpdateData = Omit<PartialDeep<Card>, 'errors'> & { | ||
| errors?: Card['errors'] | null; | ||
| }; |
There was a problem hiding this comment.
| type CardListUpdateData = Omit<PartialDeep<Card>, 'errors'> & { | |
| errors?: Card['errors'] | null; | |
| }; | |
| type CardListUpdateData = PartialDeep<Card>; |
Can we do this and set errors: undefined in building optimistic data?
There was a problem hiding this comment.
Isn't it true that Onyx.merge() can ignore top-level undefined changes? And setting to null is better?
There was a problem hiding this comment.
Ah, Ok. I thought to keep the same type of Card errors prop.
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #81642 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @MariaHCD 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/MariaHCD in version: 9.3.19-0 🚀
|
Explanation of Change
API integration for freeze card feature.
Fixed Issues
$ #81642
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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