[No QA] Add itemized receipt changelog support and fix manual approval threshold bug#87414
[No QA] Add itemized receipt changelog support and fix manual approval threshold bug#87414
Conversation
…old format, fix bug - Add UPDATE_MAX_EXPENSE_AMOUNT_NO_ITEMIZED_RECEIPT action type to CONST - Add original message fields for itemized receipt amounts - Add getPolicyChangeLogMaxExpenseAmountNoItemizedReceiptMessage function - Add dispatch in PureReportActionItem and SidebarUtils - Add English and Spanish translations for itemized receipt changelogs - Fix bug in getUpdatedManualApprovalThresholdMessage that checked oldLimit twice instead of checking newLimit on the second clause Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: The diff is too large to include in this comment (64KB), so I've created a gist for you: 📋 View the translation diff here 📋 Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
|
Fixed the Prettier check failure: import statements in |
Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
|
Fixed the failing checks: added missing |
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.
|
|
All checks are now passing. The latest run shows every substantive check green — typecheck, ESLint, Prettier, all 8 test jobs, Storybook, iOS build, Android build, spellcheck, codecov, and CLA all pass. The only remaining item is It's possible the checks were still running when you posted — the most recent push triggered a fresh CI run and everything completed successfully. |
|
The failing Evidence:
You can re-run the check, but no code changes are needed. |
|
@MelvinBot please update the variable names to isOldLimitDisabled and isNewLimitDisabled instead of oldIsDisabled and newIsDisabled |
…sabled Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
|
Renamed |
…ble reference The file on main was refactored from useState/isModalVisible to useConfirmModal but a reference to isModalVisible was left on line 85 (SelectCountryStep's disableAutoFocus prop). This caused TS2304 when CI merges main into the branch. Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
|
Fixed the failing typecheck. Root cause: On `main`, `AddNewCardPage.tsx` was refactored from `useState`/`isModalVisible` to `useConfirmModal`, but a stale reference to `isModalVisible` was left on line 85 (``). When CI merges `main` into this branch, that broken reference caused `TS2304: Cannot find name 'isModalVisible'`. Fix: Updated the branch's copy of `AddNewCardPage.tsx` to match `main`'s version with the stale `isModalVisible` prop removed from `SelectCountryStep`. |
|
MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR. Next steps: A human should review the recent commits and resolve the conflicting CI errors manually. |
|
@MelvinBot please merge main, handle conflicts, and see how things go |
…tory) The original branch had no common ancestor with main (created in isolated worktree), making a standard merge impossible. Recreated by applying PR changes on top of current main and resolving the conflict in AddNewCardPage.tsx (removed stale useState/isModalVisible references that main had already partially cleaned up). Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
…gelog' into claude-updateItemizedReceiptChangelog-v2 Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com> # Conflicts: # Mobile-Expensify
|
Merged main into the branch. The original branch had no shared history with What I did:
CI checks are now running. |
|
@MelvinBot something went weird here, can you clean up the commit history, or just recreate this PR with only the new changes please? |
|
The failing checks are unrelated to this PR's code changes:
No code fix needed — please re-run the failed checks. |
The expo-secure-store package was removed from dependencies but patch files remained after a merge, causing patch-package to fail during CI with ENOENT on node_modules/expo-secure-store/.patch-package.json. Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
|
Fixed the failing checks: removed orphaned The |
|
Recreated this PR with a clean commit history as #87532. Closing this one. |
|
The typecheck failure is unrelated to this PR's changes. Analysis: All TypeScript errors are in files not modified by this PR — Evidence: The PR modifies policy changelog, sidebar, and translation files. None of the 50+ erroring files overlap with the PR diff. The previous |
|
The All errors are in files not modified by this PR — they are pre-existing typecheck issues on
None of these files are in this PR's diff. |
|
All current failures are unrelated to this PR's changes — they are pre-existing issues on main:
Evidence: This PR modifies |
…ReceiptChangelog Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
The branch carried old versions of files (MultifactorAuthentication, FlagCommentPage, ReimbursementAccount, ConnectToQuickbooksDesktopFlow, etc.) that were introduced by a prior merge but no longer exist on main. These caused typecheck, ESLint, and test failures. Co-authored-by: Daniel Gale-Rosen <dangrous@users.noreply.github.com>
|
Fixed the failing checks: the branch carried 29 stale files (MultifactorAuthentication, FlagCommentPage, ReimbursementAccount, ConnectToQuickbooksDesktopFlow, etc.) from a prior bad merge that don't exist on main. These caused typecheck errors, ESLint failures, and test failures. Removed all stale files — the PR now only contains the intended itemized receipt changelog and manual approval threshold bug fix changes. |
Explanation of Change
This PR adds frontend support for the itemized receipt changelog action type and fixes a bug in the manual approval threshold message, to match the formatting changes made in https://github.com/Expensify/Web-Expensify/pull/51501.
Itemized receipt changelog:
UPDATE_MAX_EXPENSE_AMOUNT_NO_ITEMIZED_RECEIPTaction type toCONST.tsoldMaxExpenseAmountNoItemizedReceiptandnewMaxExpenseAmountNoItemizedReceiptfields toOriginalMessage.tsgetPolicyChangeLogMaxExpenseAmountNoItemizedReceiptMessagefunction inReportActionsUtils.ts(mirrors the existingNoReceiptversion)PureReportActionItem.tsxandSidebarUtils.tsBug fix:
getUpdatedManualApprovalThresholdMessagewhich checkedtypeof oldLimit !== 'number'twice instead of checkingnewLimiton the second clause. This meantnewLimitwas never validated, so if it wasundefined, the function would produce incorrect output instead of falling back togetReportActionText.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/616183
Tests
POLICYCHANGELOG_UPDATE_MAX_EXPENSE_AMOUNT_NO_ITEMIZED_RECEIPTreport actionPOLICYCHANGELOG_UPDATE_MANUAL_APPROVAL_THRESHOLDaction with undefinednewLimitnow falls back togetReportActionTextinstead of showing "undefined"Offline tests
N/A - these are display-only changes for server-generated report actions.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
N/A - display-only changelog text changes
Android: mWeb Chrome
N/A - display-only changelog text changes
iOS: Native
N/A - display-only changelog text changes
iOS: mWeb Safari
N/A - display-only changelog text changes
MacOS: Chrome / Safari
N/A - display-only changelog text changes
Screenshots/Videosundefined