Skip to content

[$250] Expense-Rates from workspace does not appear in the Rate field #94115

Closed

Description

@applause-bot

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: v9.4.16-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #93588
Email or phone of affected tester (no customers): agexptest+pr190626@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.3
App Component: Money Requests

Action Performed:

Prerequisites:
Create a test account with + in email (e.g., yourname+test1@gmail.com) to mark it as a test account.
Have at least one paid workspace (Team or Corporate type).

  1. Navigate to staging.new.expensify.com
  2. Open a DM chat with another user
  3. Tap the FAB (+) button > "Split expense" > Distance tab
  4. Complete the start and stop waypoints > Next

Expected Result:

The rates from the paid workspace appear in the Rate field.

Actual Result:

The rate displayed in the Rate field does not match the rate from the paid workspace, and the Rate field is not editable.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7185871_1781905252450.no_workspace_rates.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Nathan Lemma
Bug ID: 7185871

Upwork Automation - Do Not Edit

Activity

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

  3. MelvinBot commented on Jun 20, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    TL;DR — both reported symptoms are working as designed; the "Expected Result" in this report appears incorrect. For a DM split, the distance rate is intentionally the personal P2P default mileage rate, not a paid-workspace rate, and the Rate field is intentionally read-only for all splits. There is no code path that surfaces paid-workspace rates for a freshly-created DM distance split.

    This was caught during QA of #93588 (removal of isPolicyExpenseChatEnabled), but it reproduces in production and is unrelated to that PR — the behavior predates it (shipped with the distance-split feature in #74067, Dec 2025).

    Why each symptom happens (by design)

    1. "Rate field is not editable" — The Rate row is hard-coded non-interactive for every split:
    RateField.tsx:65

    const isRateInteractive = !!rate && !isReadOnly && iouType !== CONST.IOU.TYPE.SPLIT;

    A DM split is iouType === SPLIT, so isRateInteractive is always false → no chevron, tapping does nothing. This has been true since splits shipped.

    2. "Rate does not match the paid workspace" — A DM has no workspace policy, so the transaction is stamped with the FAKE_P2P_ID sentinel and the rate resolves to the personal P2P default (or a 67¢/mi fallback), never a workspace rate. Paid-workspace rate lookup (getGroupPaidPolicies) only runs on the rate-selection page and only when editing an existing split — never on initial DM split creation.

    Investigation details & evidence

    Data flow (DM distance split):

    1. DM > FAB > Split expense > Distance > waypoints > Next → iouType = SPLIT, report has no policyID.
    2. DistanceRequestUtils.ts:455-463 — empty policy → customUnitRateID = FAKE_P2P_ID.
    3. usePolicyForTransaction.ts:44-47 — DM has no policy/draft → empty policy.
    4. DistanceRequestUtils.ts:560-569 → getRateForP2P 295-307 — P2P sentinel → personal default rate (67¢/mi hardcoded fallback).
    5. Rate passed to RateField.tsx with isRateInteractive = false.
    6. Paid-workspace lookup is gated on isEditingSplit only: IOURequestStepDistanceRate.tsx:100-102.

    History: Non-interactive-for-split was introduced in #74067 (distance splits shipped). #93294 (Jun 2026) explicitly documents that DM distance splits are supposed to use the default P2P mileage rate via getDefaultP2PMileageRate() — confirming workspace rates are not the intended source here.

    One genuine-bug angle to rule out: Since workspace rates aren't expected, the only real bug would be if the displayed P2P rate itself is malformed (e.g. the P2P default failed to load and fell back to the hardcoded 67¢/mi). #93294 exists specifically to prevent that. If the tester's complaint is really "the rate value looks wrong/blank" rather than "it isn't my workspace rate," that's worth a targeted check; otherwise this is WAI.

    Recommendation

    This looks like a QA expectation mismatch, not a product bug — the "Expected Result" assumes DM splits inherit paid-workspace rates and an editable field, neither of which is how the feature is built. Suggest BugZero either close as WAI / correct the expected result, or — if Expensify wants DM distance splits to offer workspace rates — re-file this as a feature request, since it's not implemented today. Worth confirming with the tester whether the repro was truly a DM (workspace-chat splits do use workspace rates) and whether the displayed P2P rate value itself looked wrong.


    Next Steps for Contributor+ team:
    To treat as WAI: close the issue / fix the expected result in the report.
    To pursue as a feature (workspace rates for DM splits): re-scope as a feature request.
    To refine: @MelvinBot <your feedback> — e.g. confirm whether the displayed rate value itself was malformed.

  4. melvin-bot commented on Jun 23, 2026

    @melvin-bot

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

  5. melvin-bot commented on Jun 25, 2026

    @melvin-bot

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

  6. melvin-bot commented on Jun 29, 2026

    @melvin-bot

    Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

  7. melvin-bot commented on Jul 1, 2026

    @melvin-bot

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

  8. melvin-bot commented on Jul 3, 2026

    @melvin-bot

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

  9. melvin-bot commented on Jul 4, 2026

    @melvin-bot

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

  10. melvin-bot commented on Jul 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!

  11. 23 remaining items

  12. melvin-bot commented on Jul 29, 2026

    @melvin-bot

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

  13. melvin-bot commented on Jul 31, 2026

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  14. melvin-bot commented on Jul 31, 2026

    @melvin-bot

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

  15. mvtglobally commented on Aug 1, 2026

    @mvtglobally

    Issue not reproducible during KI retests. (First week)

  16. mananjadhav commented on Aug 2, 2026

    @mananjadhav
    Collaborator

    @KJ21-ENG's proposals seems to be good. I am able to reproduce.

    🎀 👀 🎀 C+ reviewed.

  17. melvin-bot commented on Aug 2, 2026

    @melvin-bot

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

  18. flodnv commented on Aug 3, 2026

    @flodnv
    Contributor

    @neil-marcellini I see you worked on #74067, could you please take a look? 🙇

  19. neil-marcellini commented on Aug 4, 2026

    @neil-marcellini
    Contributor

    Adding to my list to review today, or tomorrow.

  20. neil-marcellini commented on Aug 5, 2026

    @neil-marcellini
    Contributor

    This is not a bug. It's a P2P split because it's being created in a DM chat, not on a chat tied to a workspace. So it's working correctly and using the default P2P distance rate.

    @fedirjh @puneetlath I believe the test step in this PR is incorrect. "Test 4: Split Expense", #93588.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions