Skip to content

[NewDot Manual Merging] Implement the frontend section #65574

Closed
3 of 3 issues completed
Closed

Description

@youssef-lr

Part of the Manual Expense Merging in NewDot project

Main issue: https://github.com/Expensify/Expensify/issues/496985
Doc section: https://docs.google.com/document/d/1RXJyOVsX2AgKWNViLSxNm3PH2bSnJCuo6K_jcOxUGuo/edit?tab=t.0#bookmark=id.d4udct66dw0x
Project:

Feature Description

Implement the frontend section of the design doc allowing manually merging two expenses from the expense view, report view, and the Reports page.

Manual Test Steps

https://docs.google.com/document/d/1bQM6A13GZsrzsx7H9Q6wmbbf-1cwcu2qBM1HXpWABzw/edit?tab=t.0#heading=h.x1tkdmajx2wc

Automated Tests

  1. Add tests for making the API call and verifying optimistic data have been set properly. Mock data for MERGE_TRANSACTION{transactionID} key, mock the API call and then verify:
  • Original transaction is updated
  • If single expense report, the report was deleted
  • Other transaction is deleted
  • Violations of original transaction are deleted
  1. Update test of ReportSecondaryActionUtilsTest by adding test cases of:
  • Merging two cash expenses: merge option should show up
  • Merging two card expenses: merge option should not show up
  • Merging cash/card expenses: merge option should show up
Issue OwnerCurrent Issue Owner: @alexpensify
Issue OwnerCurrent Issue Owner: @alexpensify

Activity

  1. hoangzinh commented on Jul 7, 2025

    @hoangzinh
    Contributor

    Quick update:
    Today: I spun up a PR here #65596. Currently, it only contains routes of merging transaction + init pages.
    Tomorrow: I will start to add "Merge" menu into secondary action in the expense view

  2. hoangzinh commented on Jul 8, 2025

    @hoangzinh
    Contributor

    Quick update:
    Today: I added "Merge" to secondary actions + display skeleton and empty state for list page
    Tomorrow: I'm awaiting GetTransactionsForMerging API command to be deployed or a response example of this API so I can mock data in FE and complete the list page.

  3. hoangzinh commented on Jul 10, 2025

    @hoangzinh
    Contributor

    Quick update: I've done the merge list page. Tomorrow I will implement receipt review page

  4. melvin-bot commented on Jul 14, 2025

    @melvin-bot

    @hoangzinh Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  5. hoangzinh commented on Jul 14, 2025

    @hoangzinh
    Contributor

    Quick update: I've done the merge details page. Tomorrow I will try to implement the confirmation page. I also still need to implement getTransactionsForMergingLocally version here

    /**
    * Fetches eligible transactions for merging locally
    * This is FE version of READ_COMMANDS.GET_TRANSACTIONS_FOR_MERGING API call
    */
    function getTransactionsForMergingLocally(transactionID: string, transactions: OnyxCollection<Transaction>) {
    const transactionsArray = Object.values(transactions ?? {});
    const targetTransaction = transactionsArray.find((transaction) => transaction?.transactionID === transactionID);
    if (!targetTransaction || !transactionsArray) {
    Onyx.merge(`${ONYXKEYS.COLLECTION.MERGE_TRANSACTION}${transactionID}`, {
    eligibleTransactions: [],
    });
    return;
    }
    // TODO: Will implement this later
    const eligibleTransactions = transactionsArray.filter((transaction): transaction is Transaction => !!transaction && transaction.transactionID !== transactionID);
    Onyx.merge(`${ONYXKEYS.COLLECTION.MERGE_TRANSACTION}${transactionID}`, {
    eligibleTransactions,
    });
    }

  6. self-assigned this
    on Jul 16, 2025
  7. youssef-lr commented on Jul 16, 2025

    @youssef-lr
    ContributorAuthor

    @hoangzinh how's the implementation of Confirmation going?

  8. 120 remaining items

  9. melvin-bot commented on Apr 16, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. @garrettmknight, @hoangzinh, @youssef-lr, @dominictb eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  10. garrettmknight commented on Apr 20, 2026

    @garrettmknight
    Contributor

    Adding remaining issues to the OP

  11. garrettmknight commented on Apr 29, 2026

    @garrettmknight
    Contributor

    @dominictb @hoangzinh did we do it!?!

  12. dominictb commented on Apr 30, 2026

    @dominictb
    Contributor

    @garrettmknight We still have this backend PR but I think it's out of scope of Merge project payment (it's backend work).

  13. garrettmknight commented on May 5, 2026

    @garrettmknight
    Contributor

    Merge project paid out. I think we're finally done here!

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

Metadata

Metadata

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions