Skip to content

[Due for payment 2026-08-25] Personal Card - Mark transactions as reimbursable toggle show enabled after disable it in import #98243

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: v9.4.52-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/68502605/folder/54018371/109584594/1646242938?sort=%2Bidentifier
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Windows 10 / Chrome, Honor x6b/ Android 16
App Component: Other

Action Performed:

  1. Log into NewDot
  2. Navigate to Settings > Wallet and click on "Import transactions"
  3. Click on the Card display name field, input a valid name, and save the input
  4. Toggle off "Transactions are reimbursable"
  5. Click the "Next" button container and upload the "CSV file to upload"
  6. Click on "Import"
  7. Click directly on the newly created transaction card item row
  8. Verify that Mark transactions as reimbursable is toggle off
    Result: Mark transactions as reimbursable is enabled
  9. Close and reopen RHP
    Result: Mark transactions as reimbursable is enabled
  10. Click on "View transactions"
  11. Return to the Card imported row
  12. Click to open RHP
    Result: Mark transactions as reimbursable is disabled.

Expected Result:

When Transactions are reimbursable is disabled during card import, the Mark transactions as reimbursable toggle should remain disabled

Actual Result:

After importing the card with Transactions are reimbursable disabled, the Mark transactions as reimbursable toggle in the card details is enabled. After navigating to imported transactions and back to the imported card and reopening it, the Mark transactions as reimbursable toggle is displayed as disabled.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7230489_1786395973629.bandicam_2026-08-10_16-01-30-873.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7230489

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 11, 2026
  2. applause-bot commented on Aug 11, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/a8cc9e707ec91c6443f51b18e69700efe60deb701b9d4e3271f59ed8badef1b6

  3. changed the title [-]Personal Card-Mark transactions as reimbursable toggle show enabled after disable it in import[/-] [+]Personal Card - Mark transactions as reimbursable toggle show enabled after disable it in import[/+] on Aug 11, 2026
  4. MelvinBot commented on Aug 11, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The optimistic card created during CSV import never stores the reimbursable value the user chose, and the card details page defaults a missing value to enabled.

    When you import and toggle Transactions are reimbursable OFF, that isReimbursable=false is correctly applied to the optimistic transactions, the saved column layout, and the API request — but not to the optimistic card object written to CARD_LIST. buildOptimisticCard() isn't even passed isReimbursable and returns a card with no reimbursable field.

    The card details RHP then reads card?.reimbursable ?? true. Since the optimistic card's reimbursable is undefined, it falls back to true, so the toggle shows enabled right after import. Once you visit "View transactions" and come back, the card is refreshed from the server (which returns reimbursable: false), so the toggle then correctly shows disabled. That refresh is why the workaround "fixes" the display.

    Evidence / data flow

    What changes do you think we should make in order to solve the problem?

    Populate the optimistic card with the user's chosen value so the local state matches the server. Pass isReimbursable into buildOptimisticCard() and set reimbursable on the returned card object (updating the call site at ImportTransactions.ts:313 accordingly). This keeps the toggle correct immediately after import, with no reliance on a server round-trip.

    What alternative solutions did you explore? (Optional)

    Changing the default at PersonalCardDetailsPage.tsx:84 was considered but rejected — the user's selection is already known at import time, so fixing the optimistic write is the correct fix; the ?? true default is a reasonable fallback for cards where the field genuinely hasn't been set.

    Possibly related

    #97779 — "Wallet - Upload CSV 'flip amount sign' is not preserved for subsequent uploads" is in the same CSV-import settings-persistence area, though a different field. Worth a glance but likely a separate fix.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/98243) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 11, 2026
  6. melvin-bot commented on Aug 11, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk (External)

  7. melvin-bot commented on Aug 11, 2026

    @melvin-bot
  8. brunovjk commented on Aug 12, 2026

    @brunovjk
    Contributor

    I believe we can go with @MelvinBot's proposal; it works well in my initial tests. Thank you.

    🎀 👀 🎀 C+ reviewed

  9. melvin-bot commented on Aug 12, 2026

    @melvin-bot

    Triggered auto assignment to @rlinoz, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  10. rlinoz commented on Aug 12, 2026

    @rlinoz
    Contributor

    Sounds good, can you ask it to implement it please?

  11. MelvinBot commented on Aug 12, 2026

    @MelvinBot
    Contributor

    Thanks for the review, brunovjk 🙏

    This now goes to rlinoz for the internal engineer sign-off. Once it's approved, reply with @MelvinBot implement [this](https://github.com/Expensify/App/issues/98243#issuecomment-5248872710) and I'll spin up the draft PR.

  12. 16 remaining items

  13. added a commit that references this issue on Aug 24, 2026
  14. brunovjk commented on Aug 24, 2026

    @brunovjk
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: 5d30ea5#r197494222

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue: https://github.com/Expensify/Expensify/issues/675708

    Regression Test Proposal

    Test:

    1. Log into NewDot.
    2. Navigate to Settings Wallet and click on "Import transactions".
    3. Click on the Card display name field, input a valid name, and save.
    4. Toggle off "Transactions are reimbursable".
    5. Click "Next" and upload a CSV file.
    6. Click on "Import".
    7. Click directly on the newly created transaction card item row to open the RHP.
    8. Verify that "Mark transactions as reimbursable" is toggled off (previously it incorrectly showed enabled until the card was re-fetched).
    9. Close and reopen the RHP and verify the toggle stays off.

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-19bd-a57e-8ce8-5dddc13092b4
  15. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Aug 24, 2026
  16. melvin-bot commented on Aug 24, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  17. melvin-bot commented on Aug 24, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  18. mallenexpensify commented on Aug 26, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @brunovjk due $250 via NewDot

  19. laurenreidexpensify commented on Aug 27, 2026

    @laurenreidexpensify
    Contributor

    $250 approved @brunovjk New Expensify

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions