Skip to content

Refactor: require translate for split saves and bulk edits (4 of 4) - #106925

Draft
MelvinBot wants to merge 1 commit into
claude-transactionTranslateSplitDraftsfrom
claude-transactionTranslateSplitBulk
Draft

MelvinBot wants to merge 1 commit into
claude-transactionTranslateSplitDraftsfrom
claude-transactionTranslateSplitBulk

Conversation

@MelvinBot

Copy link
Copy Markdown
Contributor

Explanation of Change

Part 4 of the approved four-PR refactor. Pass the caller's translator through existing-split saves, split deletion, and bulk edits so every production getUpdatedTransaction invocation now has an explicit translation dependency.

  • Require and forward translate through updateSplitTransactions and updateMultipleMoneyRequests, including their page/hook callers.
  • Make getUpdateMoneyRequestParams.translate and getUpdatedTransaction.translate required; remove the temporary translateLocal default and import from the transaction helper.
  • Update all affected fixtures, preserving custom injected translators, and assert translator identity reaches the optimistic transaction helper through both bulk edits and existing-split saves.
  • Remove the now-obsolete translation deprecation lint-baseline entry. Unrelated translateLocal usages remain outside this refactor.

Dependency: stacked on Pass translate through split draft updates (3 of 4). Merge preceding parts first, then retarget to main.

AI Tests

  • Passed: 834 tests across seven targeted suites (BulkEdit, split actions, self-DM splits, split report totals, transaction actions, transaction utilities and Search bulk-edit UI); typecheck; lint; lint-changed; spell-changed; Storybook smoke; explicit React Compiler checks for the three changed production hooks/pages.
  • Read-only coding-standards/correctness review found no violations and verified all four production helper calls and their caller chains.
  • Full Jest exceeded the 200-second execution window with no failing suites reported before termination; not a full-suite pass.
  • Changed-file React Compiler command cannot resolve its base (origin/); explicit file checks passed. No prettier npm script exists; Oxfmt runs in the commit hook.
  • Browser verification blocked by a blank dev app with zero UI nodes. Existing-split edit/delete and bulk-edit/language flows remain unverified; no confirmed product regression.

Blank app page preventing all requested expense tests

parasharrajat is requested as reviewer, not assignee. The environment's commit hook automatically adds requester co-authorship, as noted on preceding parts.

Fixed Issues

$ #64943
PROPOSAL: #64943 (comment)

Tests

// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review".

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Co-authored-by: parasharrajat <parasharrajat@users.noreply.github.com>
@MelvinBot
MelvinBot requested review from a team and parasharrajat November 14, 2026 12:57
@melvin-bot melvin-bot Bot added Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web labels Nov 14, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Both failing Jest jobs hit TypeError: Cannot redefine property: getUpdatedTransaction in the new spies:

CI’s coverage transform makes barrel re-exports non-configurable. The minimal fix is to import the defining module, @libs/TransactionUtils/getUpdatedTransaction, in both tests, preserving the translator assertions.

No changes pushed: the request did not identify the requester, so I couldn’t verify authorization. An existing co-author or PR assignee must retry the request with their identity available.


view run

@MelvinBot

MelvinBot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ⚠️ partial

Android testing was blocked because the signed-in account has no expenses or existing splits; no product regression was established. The PR’s detailed Tests/QA steps remain TODO, so the intended split and bulk-edit cases could not be verified.

Missing expenses blocking localized bulk-edit verification

Step Status
Edit and save existing splitsBlocked: Expenses displays “No expenses yet.” Persistence and totals were not tested.
Empty expense list blocking existing-split testing
❌
Delete a split and verify remaining splits and totalsBlocked: no existing split was available.
Empty expense list blocking split deletion testing
❌
Bulk edit multiple expenses and verify persistenceBlocked: the empty expense list prevented selection and editing.
Empty expense list blocking bulk editing
❌
Change language and repeat bulk editingNot executed: prerequisite expenses were absent.
Missing expenses blocking localized bulk-edit verification
❌
Verify no JavaScript console errorsUnverified: requested flows were blocked, and collected logs could not be inspected.
❌

view run · view recording

@MelvinBot

MelvinBot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

All four functional assertions passed on dev NewDot web. JavaScript console verification remains blocked by the supported browser interface; no product regression was observed.

Spanish expense list with both bulk-edited descriptions saved

Step Status
Edit and save existing splitsChanged $60/$60 splits to $40/$80 and added a description. Saved values persisted; selecting both showed a $120 total.
Saved split amounts and edited description
✅
Delete a split and verify remaining splits and totalsRemoved the $80 split and saved. The remaining expense retained its description and showed the redistributed $120 total.
One remaining expense with the original 20 total preserved
✅
Bulk edit multiple expenses and verify persistenceBoth merchants saved as “QA Bulk English,” retaining the $40/$80 amounts and existing description.
Both expenses retain the saved bulk merchant change
✅
Change language and repeat bulk editingChanged to Español and bulk-saved “Edición múltiple guardada” on two expenses. Read-back confirmed both descriptions, translated controls, and localized amounts.
Account navigation showing Preferences; the earlier navigation blocker was subsequently resolved
Spanish expense list with both bulk-edited descriptions saved
✅
Verify no JavaScript console errorsUnverified: the supported browser interface does not expose console inspection.
⚠️

view run · view recording

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant