Skip to content

Expense - Unable to submit expense with 0.00 to self DM when created from FAB #90681

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.3.74-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #87920
Email or phone of affected tester (no customers): sdsdjoijdoisnjodis@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Run Onyx.merge('betas', ['newManualExpenseFlow']); in console.
  1. Go to staging.new.expensify.com
  2. Open FAB > Create expense > Manual.
  3. Click To field.
  4. Select self DM.
  5. Enter 0 amount.
  6. Click Create expense.

Expected Result:

Expense with 0 amount can be submitted to self DM when created from FAB (we can create expense with 0 amount from self DM).

Actual Result:

Expense with 0 amount cannot be submitted to self DM when created from FAB.
"Invalid amount" appears on Amount field.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7154065_1778763963828.26.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @ChavdaSachin

Activity

  1. added
    DeployBlockerCash
    Daily
    Bug
    on May 14, 2026
  2. melvin-bot commented on May 14, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #87920

  3. melvin-bot commented on May 14, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. github-actions commented on May 14, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. OSBotify commented on May 14, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #87920 - "Feat: Manual expense flow UI refactor - r3" by @ChavdaSachin (High confidence)
    Related Issues: #82586 (original issue PR was fixing)

    Recommendation: REVERT

    The PR introduced a validation rule that explicitly blocks $0 amount for all P2P (self DM / person-to-person) expenses in the new manual expense flow, but the existing behavior allows $0 expenses in self DM contexts. This is a direct regression introduced by the PR's new validation logic.

    Assigned: @ChavdaSachin (PR author), @ShridharGoel and @puneetlath (approving reviewers)
    Labels: No label changes — DeployBlockerCash is correctly set; this is a Frontend (App) bug with no DeployBlocker present to remove.

    📋 Detailed Analysis

    Evidence

    Verification

    Root Cause

    In useConfirmationValidation.ts at line 163, the PR introduced this guard:

    if (
      iouType !== CONST.IOU.TYPE.PAY &&
      !isScanRequestUtil(transaction) &&
      !isTimeRequest &&
      !isDistanceRequest &&
      iouAmount === 0 &&
      isP2P
    ) {
      return { errorKey: "common.error.invalidAmount" };
    }

    isP2P is true whenever the first participant has an accountID and is not a policy expense chat — which includes self DMs. This check fires before the isAmountSet check and unconditionally rejects iouAmount === 0 for all P2P participants, including self DMs where $0 expenses are supposed to be allowed.

    The QA steps in the PR (Test 2, step 9) even explicitly described this as the expected behavior: "Verify the amount field shows an error" for $0 in a P2P chat. However, the existing product behavior allows $0 in self DMs, making this a regression for that specific case.

  6. ChavdaSachin commented on May 14, 2026

    @ChavdaSachin
    Contributor

    NAB: only happens on beta accounts

  7. 8 remaining items

  8. added
    Weekly
    and removed
    Daily
    on May 21, 2026
  9. melvin-bot commented on May 28, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  10. thelullabyy commented on Jun 3, 2026

    @thelullabyy
    Contributor

    @MelvinBot Please implement the fix. Can refer to this PR for more insights

  11. thelullabyy commented on Jun 3, 2026

    @thelullabyy
    Contributor

    Taking over as per slack

  12. MelvinBot commented on Jun 3, 2026

    @MelvinBot
    Contributor

    🤖 This appears to already be fixed on main — I'd recommend verifying on staging instead of opening a new PR.

    I checked out the latest main and reproduced the exact repro steps (FAB > Create expense > Manual > To = self DM > amount 0 > Create). The $0.00 expense was created successfully with no "Invalid amount" error.

    The approach that landed on main is different from (and supersedes) the closed PR #91326. Instead of special-casing $0 for a P2P submit, selecting your self DM now converts the expense to a Track expense (which inherently allows $0):

    Because of this, opening a PR based on #91326 would re-introduce the old SUBMIT-with-isSelfDM approach and conflict with the already-merged Track-conversion logic, so I did not create one.

    Test evidence (latest main, newManualExpenseFlow beta on)

    After selecting the self DM, the flow switches to a Track expense (URL becomes /create/track/..., the Report field disappears):

    Self DM selected, flow switched to track

    Entering 0 shows no "Invalid amount" error:

    0 entered in amount field with self DM selected, no error

    Clicking Create expense creates the $0.00 expense (status Unreported):

    Spend > Expenses showing the created $0.00 expense, status Unreported

    Suggested next step: Please verify on the latest staging build with the newManualExpenseFlow beta enabled. If it passes there too, this can be closed as already resolved. If you can still reproduce it on a specific platform/build, let me know the exact build + platform and I'll dig into the remaining gap.

  13. thelullabyy commented on Jun 4, 2026

    @thelullabyy
    Contributor

    @lanitochka17 Could you please re-verify this bug? It is not reproducible on staging. Thanks

    Screen.Recording.2026-06-04.at.00.19.55.mov
  14. IuliiaHerets commented on Jun 4, 2026

    @IuliiaHerets

    The issue is not reproducible in the latest build

    Screen.Recording.2026-06-04.at.18.11.13.mov
  15. trjExpensify commented on Jun 4, 2026

    @trjExpensify
    Contributor

    Great stuff, closing!

  16. MelvinBot commented on Jul 3, 2026

    @MelvinBot
    Contributor

    🤖 Verification could not be completed — I was unable to run the requested flow (submit a $0.00 expense to a self-DM via the FAB) on web.

    The app-web-tester was blocked by dev-environment constraints, not by the app behavior itself:

    • Beta flag can't be injected — this flow requires Onyx.merge('betas', ['newManualExpenseFlow']) in the console, but the web test harness doesn't support arbitrary page scripting, so the Create expense > Manual FAB option couldn't be enabled.
    • Account creation blocked — after the first signup, Cloudflare bot-challenged all further SignUpUser calls (HTTP 429), and the one account that was created hit an EmailDeliveryFailurePage on re-auth, so the session couldn't be restored.

    As a result I reached the home screen (FAB visible) but could not enter the $0.00 → self-DM manual-expense flow to confirm the fix.

    Screenshots (document the attempt, not the actual test)

    First session home screen with FAB visible
    EmailDeliveryFailurePage blocking re-authentication

    To verify this, a tester with the newManualExpenseFlow beta enabled on a persistent account should run the repro steps manually. Re-run @MelvinBot if the harness constraints are lifted.

  17. MelvinBot commented on Jul 9, 2026

    @MelvinBot
    Contributor

    🤖 Recording-pipeline smoke test — web drive complete, verification inconclusive

    The web drive ran and produced session recordings (the priority for this smoke test). However, the $0-to-self-DM behavior could not be verified because the required precondition could not be applied.

    What happened

    • The precondition Onyx.merge('betas', ['newManualExpenseFlow']) requires running an arbitrary command in the browser console, which is out of scope for the web driver — so the newManualExpenseFlow beta was never enabled.
    • Without that beta, FAB > Create expense > Manual shows the Amount screen first, and entering 0 is blocked inline with "Please enter a valid amount before continuing" — i.e. the pre-fix behavior. The To / self-DM step from the new flow was never reached, so the "$0 accepted to self DM" assertion could not be exercised.

    Result: ⚠️ Inconclusive — recordings captured, but the fix path (beta-gated) could not be driven without console injection.

    Create expense Manual tab with $0 showing 'Please enter a valid amount before continuing' error
    Confirmation session: $0 in Manual expense blocked with same validation error

    ▶ Web session recordings (4)

    To fully verify, the newManualExpenseFlow beta needs to be active on the test account (or enabled by a means other than console injection) so the driver can reach the self-DM To step and submit a $0 expense.

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

Metadata

Metadata

Labels

BugEngineeringReviewingWeekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions