You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Split expense- Error appears when split distance expense in self dm #97436
Version Number: 9.4.46-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:#92055 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Exploratory - Critical User Impact Device used: Windows 11 Home/Chrome App Component: Money Requests
👋 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:
Identify the pull request that introduced this issue and revert it.
The failing behavior lives entirely in a small, well-isolated block that #92055 changed, and a targeted fix is far safer than reverting a 2,100+ line PR that fixes eight other self-DM split bugs (a revert would reintroduce those). Recommend a follow-up that corrects the isCustomUnitOutOfPolicy logic for self-DM P2P distance splits.
Assigned: @ZhenjaHorbach (PR author), @lakchote and @dmkt9 (approving reviewers) — all already auto-assigned to this blocker. Labels: No change. Kept DeployBlockerCash (App deploy is blocked — this is a frontend bug fixed in Expensify/App). DeployBlocker was not present, so nothing to remove.
Its title — "Fix bugs for selfDM splits feature" — and its changed files map directly to this bug's area: src/pages/iou/SplitExpenseEditPage.tsx, src/libs/actions/IOU/SplitExpenseItems.ts, src/libs/actions/IOU/Split.ts, src/libs/DistanceRequestUtils.ts, and IOURequestStepDistanceRate.tsx.
The reported symptom — "Tap on any splitted expense, error appears on Rate field" — is the violation string violations.customUnitOutOfPolicy = "Rate not valid for this workspace" (src/languages/en.ts#L9772).
The whole self-DM split feature is new and not in production, so this is App-side (frontend). Reproducible on staging only, which is consistent.
Verification
Affected file/line: src/pages/iou/SplitExpenseEditPage.tsx#L207-L218 — isCustomUnitOutOfPolicy feeds getErrorForField('customUnitRateID'), which is what renders the error text and brick-road indicator on the Rate row (L262-L269).
The current checkout (staging 9.4.46-3) already contains this change, confirming it landed.
Root Cause
A self-DM distance expense uses the P2P/personal rate (CONST.CUSTOM_UNITS.FAKE_P2P_ID), so isP2PRate === true. Before #92055, a self-DM split with a P2P rate was not flagged out of policy (isRateBroken is false for a P2P rate, since isRateBroken requires !isP2PRate).
After #92055, the new clause (isDistance && isP2PRate && (hasAvailableEnabledRates || shouldSelectPolicy)) flips isCustomUnitOutOfPolicy to true whenever the user has any other enabled distance rate available orshouldSelectPolicy is set. The bug's preconditions — two workspaces created, with the personal workspace set as default in OD — guarantee exactly that state (hasAvailableEnabledRates/shouldSelectPolicy are true, and no workspace policy is resolved for the self-DM context). As a result, getErrorForField('customUnitRateID') returns "Rate not valid for this workspace" and paints the Rate field red on every split item, even though a valid P2P rate exists — so the split cannot complete as expected.
The intent of the new clause appears to be nudging the user to pick a real workspace rate, but for a valid self-DM P2P distance split it produces a false error state and blocks the flow (expected result per QA: "Expense can be splitted"). The fix should scope this clause so a valid self-DM P2P rate is not reported as out-of-policy. The companion rate-resolution change in SplitExpenseItems.ts#L672-L688 (which deliberately falls back to the original transaction's rate for the P2P case) should be reconciled with the edit-page's out-of-policy check so the two agree on P2P handling.
Activity
applause-bot commentedon Jul 30, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/897bb5eb139473b601ef55a8e3add5226d44179b2c9aa866480b88b272e66124
melvin-bot commentedon Jul 30, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #92055
melvin-bot commentedon Jul 30, 2026
@lakchote @dmkt9 you have been assigned to this deploy blocker because you reviewed the offending PR: #92055
melvin-bot commentedon Jul 30, 2026
@ZhenjaHorbach you have been assigned to this deploy blocker because you authored the offending PR: #92055
melvin-bot commentedon Jul 30, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jul 30, 2026
👋 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:
MelvinBot commentedon Jul 30, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #92055 - "Fix bugs for selfDM splits feature" by @ZhenjaHorbach (High confidence)
Related Issues: This PR is part of the unreleased self-DM splits feature (fixes #91874, #91876, #91879, #91907, #91913, #91917, #91918, #91920)
Recommendation: ROLL FORWARD
The failing behavior lives entirely in a small, well-isolated block that #92055 changed, and a targeted fix is far safer than reverting a 2,100+ line PR that fixes eight other self-DM split bugs (a revert would reintroduce those). Recommend a follow-up that corrects the
isCustomUnitOutOfPolicylogic for self-DM P2P distance splits.Assigned: @ZhenjaHorbach (PR author), @lakchote and @dmkt9 (approving reviewers) — all already auto-assigned to this blocker.
Labels: No change. Kept
DeployBlockerCash(App deploy is blocked — this is a frontend bug fixed inExpensify/App).DeployBlockerwas not present, so nothing to remove.📋 Detailed Analysis
Evidence
StagingDeployCashchecklist for release9.4.46, and merged 2026-07-29, one day before this blocker was reported (2026-07-30).src/pages/iou/SplitExpenseEditPage.tsx,src/libs/actions/IOU/SplitExpenseItems.ts,src/libs/actions/IOU/Split.ts,src/libs/DistanceRequestUtils.ts, andIOURequestStepDistanceRate.tsx.violations.customUnitOutOfPolicy= "Rate not valid for this workspace" (src/languages/en.ts#L9772).Verification
src/pages/iou/SplitExpenseEditPage.tsx#L207-L218—isCustomUnitOutOfPolicyfeedsgetErrorForField('customUnitRateID'), which is what renders the error text and brick-road indicator on the Rate row (L262-L269).isCustomUnitOutOfPolicy:const isCustomUnitOutOfPolicy = isSelfDMSplit ? isRateBroken : !rates[currentRateID] || (isDistance && !rate);isSelfDMSplit ? isRateBroken || (isDistance && isP2PRate && (hasAvailableEnabledRates || shouldSelectPolicy)) : ...9.4.46-3) already contains this change, confirming it landed.Root Cause
A self-DM distance expense uses the P2P/personal rate (
CONST.CUSTOM_UNITS.FAKE_P2P_ID), soisP2PRate === true. Before #92055, a self-DM split with a P2P rate was not flagged out of policy (isRateBrokenis false for a P2P rate, sinceisRateBrokenrequires!isP2PRate).After #92055, the new clause
(isDistance && isP2PRate && (hasAvailableEnabledRates || shouldSelectPolicy))flipsisCustomUnitOutOfPolicytotruewhenever the user has any other enabled distance rate available orshouldSelectPolicyis set. The bug's preconditions — two workspaces created, with the personal workspace set as default in OD — guarantee exactly that state (hasAvailableEnabledRates/shouldSelectPolicyare true, and no workspace policy is resolved for the self-DM context). As a result,getErrorForField('customUnitRateID')returns "Rate not valid for this workspace" and paints the Rate field red on every split item, even though a valid P2P rate exists — so the split cannot complete as expected.The intent of the new clause appears to be nudging the user to pick a real workspace rate, but for a valid self-DM P2P distance split it produces a false error state and blocks the flow (expected result per QA: "Expense can be splitted"). The fix should scope this clause so a valid self-DM P2P rate is not reported as out-of-policy. The companion rate-resolution change in
SplitExpenseItems.ts#L672-L688(which deliberately falls back to the original transaction's rate for the P2P case) should be reconciled with the edit-page's out-of-policy check so the two agree on P2P handling.lakchote commentedon Jul 30, 2026
This is expected, see https://expensify.slack.com/archives/C01GTK53T8Q/p1785417436218129?thread_ts=1785399819.129099&cid=C01GTK53T8Q
We can fix the error by selecting a group workspace as default instead of a personal one.
Closing.