Skip to content

Revert "Fix distance rate auto-selection when submitting from Self DM to workspace"#86348

Closed
aldo-expensify wants to merge 1 commit intomainfrom
revert-85942-claude-fixDistanceRateValidationOnSubmit-v2
Closed

Revert "Fix distance rate auto-selection when submitting from Self DM to workspace"#86348
aldo-expensify wants to merge 1 commit intomainfrom
revert-85942-claude-fixDistanceRateValidationOnSubmit-v2

Conversation

@aldo-expensify
Copy link
Contributor

@aldo-expensify aldo-expensify commented Mar 25, 2026

Reverts #85942

$ #86337

@aldo-expensify aldo-expensify requested review from a team as code owners March 25, 2026 18:52
@melvin-bot melvin-bot bot requested review from chuckdries and trjExpensify and removed request for a team March 25, 2026 18:52
@melvin-bot
Copy link

melvin-bot bot commented Mar 25, 2026

@chuckdries Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@aldo-expensify aldo-expensify marked this pull request as draft March 25, 2026 18:54
@aldo-expensify
Copy link
Contributor Author

I'm still seeing the bug with this revert...

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 41bd87c7de

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

!transactionID ||
!lastSelectedRate ||
(isMovingTransactionFromTrackExpense && customUnitRateID === CONST.CUSTOM_UNITS.FAKE_P2P_ID) ||
isMovingTransactionFromTrackExpense ||

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Allow auto-select when moving expense rate ID is '-1'

This unconditional isMovingTransactionFromTrackExpense guard blocks the setCustomUnitRateID(..., lastSelectedRate, ...) path for all submit/share/categorize flows, including the distance-rate upgrade/new-rate flow where we intentionally set customUnitRateID to '-1' before returning to confirmation (src/pages/iou/request/step/IOURequestStepUpgrade.tsx:111). In that scenario, the effect now exits early and never applies the last selected workspace rate, which regresses rate auto-selection and can leave users with an invalid/default rate unless they manually reselect it.

Useful? React with 👍 / 👎.

@codecov
Copy link

codecov bot commented Mar 25, 2026

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/components/MoneyRequestConfirmationList.tsx 61.78% <0.00%> (ø)
... and 10 files with indirect coverage changes

@aldo-expensify
Copy link
Contributor Author

aldo-expensify commented Mar 25, 2026

#85942 was not the real culprit

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant