Skip to content

Expense-Manual expense submitted to a user via QAB lands on 1:1 chat instead of Spend #99209

Open

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.58-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: #97883
Email or phone of affected tester (no customers): agexptest+pr200826a5@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Windows 11/ Chrome, Samsung S23FE/ Android 16, iPhone 13 Mini/ iOS 26.5
App Component: Money Requests

Action Performed:

Preconditions: Use a new Gmail account and choose "Something else" on the onboarding "What do you want to do?" screen.

  1. Navigate to https://staging.new.expensify.com/
  2. Click the global create (+) button in Home tab
  3. Submit a manual expense to a user (1:1 expense)
  4. Go back to Home
  5. Click the global create (+) button > Quick action button (Create expense)
  6. Submit a manual expense

Expected Result:

The app redirects to Spend › Expenses.

Actual Result:

The app redirects to 1:1 chat.
Same result for scan and distance expenses.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7239348_1787328982482.1-1_instead_Spend.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7239348

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 21, 2026
  2. applause-bot commented on Aug 21, 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/feaa13dfbbc1914fe2eeb46683519b7aa8f1fbdbdfe6b7cbb75987a0841d34ad

  3. MelvinBot commented on Aug 21, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    This looks like it's working as designed, not a code defect — but it hinges on a product-intent call. PR #97883 deliberately scoped the "route Looking-Around users to Spend › Expenses" behavior to expenses whose sole destination is the user's own self-DM (Personal Space). A 1:1 expense submitted to another user is not a self-DM, so it lands on the 1:1 chat — and it does so identically whether submitted via the Quick Action Button (QAB) or the normal confirmation flow. The QAB path is not dropping a flag.

    Root cause of the observed behavior: the redirect is gated on isLookingAroundUser && isSelfDMDestination at navigateAfterExpenseCreate.ts:154. For a 1:1 expense to a real user, isSelfDMSoleDestination returns false (the sole participant is another person, not the current user's self-DM), so the gate collapses to the normal inbox path → dismissModalAndOpenReportInInboxTab → the 1:1 chat.

    The QAB path computes and passes both flags correctly — isLookingAroundUser and isSelfDMDestination at IOUAmountSubmission.ts:349 — with isSelfDMDestination = false for a 1:1-to-user. The PR's own doc comment states the intent: "A LOOKING_AROUND user who … submits to a real report/friend keeps their normal destination instead of being permanently sent to Search by mistake" (navigateAfterExpenseCreate.ts:51-57).

    The decision (for BugZero / product):

    • If the intended behavior is that a 1:1-to-a-user expense lands on the 1:1 chat → this is not a bug; the issue's Expected Result should be corrected. Only a self-DM (Personal Space) expense routes to Spend › Expenses.
    • If Looking-Around users should land on Spend › Expenses for all expense submissions (including 1:1-to-user) → this is a scope-broadening change: relax the isSelfDMDestination condition on the gates that combine it with isLookingAroundUser (in navigateAfterExpenseCreate.ts, submitWithDismissFirst.ts, getSubmitHandler.ts, and the pre-mount helpers). This would intentionally reverse the "keeps their normal destination" behavior the PR just shipped, so it needs product sign-off — not a drive-by fix.
    Investigation details

    Two flows, same result (both by-design):

    • QAB "Create expense" (skip confirmation): IOURequestStepAmount → IOUAmountSubmission.submitSkipConfirmationExpense → submitWithDismissFirst / cleanupAndNavigateAfterExpenseCreate → navigateAfterExpenseCreate. Flags computed at IOUAmountSubmission.ts:349 and passed through.
    • Normal global-create (confirmation page): IOURequestStepConfirmation → useExpenseSubmission → cleanupAndNavigateAfterExpenseCreate → navigateAfterExpenseCreate. Same isSelfDMSoleDestination helper, same false result for a 1:1-to-user.

    Both converge on navigateAfterExpenseCreate with isLookingAroundUser = true, isSelfDMDestination = false, and both take the inbox branch → 1:1 chat. There is no divergence between the two flows.

    Key gate: isSelfDMSoleDestination (IOUUtils.ts:624-631) returns false for SPLIT/INVOICE/PAY and for any sole participant that is not the current user's self-DM (isSelfDMParticipant, IOUUtils.ts:611-616). isLookingAroundUser comes from isLookingAroundUserSelector (Onboarding.ts:96) (= true for a "Something else" user).

    Note on live reproduction: the "Same result for scan and distance expenses" observation is expected — all three skip-confirmation types share the IOUAmountSubmission path and the same gate. Verifying this behaviorally requires a fresh Looking-Around account (new email + "Something else" onboarding); an existing (non-Looking-Around) account never triggers the redirect for any destination, so it can't confirm or deny the reported behavior.

    Confidence: high on the code mechanism (the redirect is gated on self-DM and both flows behave identically); the open question is purely product intent — whether a 1:1-to-user expense should redirect Looking-Around users to Spend › Expenses.


    Next Steps for Contributor+ team:
    To accept a scope change (Looking-Around users always land on Spend › Expenses): @MelvinBot implement this and I'll draft a PR relaxing the isSelfDMDestination gates — but please confirm this is the desired product behavior first, since it reverses part of #97883.
    To refine: @MelvinBot <your feedback>
    To reject: if a 1:1-to-user expense is meant to land on the 1:1 chat, this is working as designed and the Expected Result should be corrected.


    view run

  4. melvin-bot commented on Aug 24, 2026

    @melvin-bot

    Whoops! This issue is 2 days overdue. Let's get this updated quick!

  5. melvin-bot commented on Aug 26, 2026

    @melvin-bot

    Huh... This is 4 days overdue. Who can take care of this?

  6. melvin-bot commented on Aug 28, 2026

    @melvin-bot

    Still overdue 6 days?! Let's take care of this!

  7. melvin-bot commented on Sep 1, 2026

    @melvin-bot

    10 days overdue. Is anyone even seeing these? Hello?

  8. melvin-bot commented on Sep 3, 2026

    @melvin-bot

    12 days overdue now... This issue's end is nigh!

  9. melvin-bot commented on Sep 4, 2026

    @melvin-bot

    12 days overdue. Walking. Toward. The. Light...

  10. melvin-bot commented on Sep 4, 2026

    @melvin-bot

    12 days overdue. Walking. Toward. The. Light...

  11. melvin-bot commented on Sep 4, 2026

    @melvin-bot

    this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  12. melvin-bot commented on Sep 7, 2026

    @melvin-bot

    This issue has not been updated in over 14 days. eroding to Weekly issue.

  13. melvin-bot commented on Oct 1, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. 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!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is broken. Auto assigns a BugZero manager.MonthlyKSv2

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions