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
[Due for payment 2026-06-22] [Due for payment 2026-06-19] Distance - Deleted rate is shown as inactive briefly after deleting it #93355
Version Number: 9.4.6-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#90920 Email or phone of affected tester (no customers):iosjnnsjdosnjsodj@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Workspace Settings
Action Performed:
Precondition:
Enable Distance rates.
Have at least two distance rates.
Go to staging.new.expensify.com
Go to workspace settings > Distance rates.
Delete any rate.
Expected Result:
Deleted rate will disappear immediately.
Actual Result:
Deleted rate is shown as inactive briefly after deleting it.
👋 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.
Please re-state the problem that we are trying to solve in this issue.
After deleting a distance rate, the row briefly shows a gray "Inactive" status badge before disappearing, instead of disappearing immediately.
What is the root cause of that problem?
Regression from #90920 (new Distance rates table UI). Deletion is optimistic: deletePolicyDistanceRates merges {enabled: false, pendingAction: 'delete'} onto the rate and leaves it in the collection until the server response removes it.
Two new behaviors then make that optimistic window visible:
The new status helper getRateStatus returns INACTIVE whenever !rate.enabled and never checks pendingAction, so a mid-delete rate (enabled: false) renders the gray "Inactive" badge.
The new row opts out of the auto-hide that the old list relied on by passing shouldHideOnDelete: false to OfflineWithFeedback. With the default (true), the row's children are hidden once pendingAction === 'delete', matching the pre-PR "disappears immediately" behavior.
The old list had no status badge and relied on OfflineWithFeedback's default hide-on-delete, so this is purely a new-UI regression.
What changes do you think we should make in order to solve the problem?
Make the badge ignore optimistic-delete state. Guard getRateStatus so a pending-delete rate isn't reported as INACTIVE — in PolicyDistanceRatesUtils.ts:174, short-circuit when rate.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE (return the prior/active status so no gray badge flashes).
Lowest-risk alternative: remove shouldHideOnDelete: false (or set it to true) at WorkspaceDistanceRatesTableRow.tsx:95 so the whole row hides during the optimistic delete (exactly the old behavior). Note OfflineWithFeedback only hides when there are no errors, so a failed delete still surfaces correctly. This option also hides the row instantly rather than just fixing the badge color, so it's the closer match to the expected result.
Onyx merges {enabled: false, pendingAction: 'delete'}; rate stays in the collection (no successData removes it — it's removed only when the BE replaces customUnits.<id>.rates).
ratesData is not filtered for pending-delete, so the row still renders with enabled: false.
getRateStatus sees !enabled → INACTIVE → gray badge.
shouldHideOnDelete: false prevents OfflineWithFeedback from hiding the row, so the badge stays visible until the server response removes the rate.
Confidence: High — confirmed end-to-end against the merge commit and verified the pre-PR list had no status badge.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93355) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Distance - Deleted rate is shown as inactive briefly after deleting it[/-][+][Due for payment 2026-06-19] Distance - Deleted rate is shown as inactive briefly after deleting it[/+]on Jun 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.6-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@Krishna2323 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
changed the title [-][Due for payment 2026-06-19] Distance - Deleted rate is shown as inactive briefly after deleting it[/-][+][Due for payment 2026-06-22] [Due for payment 2026-06-19] Distance - Deleted rate is shown as inactive briefly after deleting it[/+]on Jun 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.7-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@Krishna2323 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
applause-bot commentedon Jun 12, 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/45f5abd844ac719b4ebe346e52f9bdcc5f18b6c6d6cfec0aebcc0bb0cde29dd4
melvin-bot commentedon Jun 12, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #90920
melvin-bot commentedon Jun 12, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 12, 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 Jun 12, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
After deleting a distance rate, the row briefly shows a gray "Inactive" status badge before disappearing, instead of disappearing immediately.
What is the root cause of that problem?
Regression from #90920 (new Distance rates table UI). Deletion is optimistic:
deletePolicyDistanceRatesmerges{enabled: false, pendingAction: 'delete'}onto the rate and leaves it in the collection until the server response removes it.Two new behaviors then make that optimistic window visible:
getRateStatusreturnsINACTIVEwhenever!rate.enabledand never checkspendingAction, so a mid-delete rate (enabled: false) renders the gray "Inactive" badge.shouldHideOnDelete: falsetoOfflineWithFeedback. With the default (true), the row's children are hidden oncependingAction === 'delete', matching the pre-PR "disappears immediately" behavior.The old list had no status badge and relied on
OfflineWithFeedback's default hide-on-delete, so this is purely a new-UI regression.What changes do you think we should make in order to solve the problem?
Make the badge ignore optimistic-delete state. Guard
getRateStatusso a pending-delete rate isn't reported asINACTIVE— inPolicyDistanceRatesUtils.ts:174, short-circuit whenrate.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE(return the prior/active status so no gray badge flashes).Lowest-risk alternative: remove
shouldHideOnDelete: false(or set it totrue) atWorkspaceDistanceRatesTableRow.tsx:95so the whole row hides during the optimistic delete (exactly the old behavior). NoteOfflineWithFeedbackonly hides when there are no errors, so a failed delete still surfaces correctly. This option also hides the row instantly rather than just fixing the badge color, so it's the closer match to the expected result.Investigation details & data flow
deleteRatescallsdeletePolicyDistanceRates.{enabled: false, pendingAction: 'delete'}; rate stays in the collection (nosuccessDataremoves it — it's removed only when the BE replacescustomUnits.<id>.rates).ratesDatais not filtered for pending-delete, so the row still renders withenabled: false.getRateStatussees!enabled→INACTIVE→ gray badge.shouldHideOnDelete: falsepreventsOfflineWithFeedbackfrom hiding the row, so the badge stays visible until the server response removes the rate.Confidence: High — confirmed end-to-end against the merge commit and verified the pre-PR list had no status badge.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93355)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
Krishna2323 commentedon Jun 12, 2026
PR is up: #93378
cc: @JS00001 @thelullabyy
melvin-bot commentedon Jun 12, 2026
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.
JS00001 commentedon Jun 12, 2026
Tested on staging, this is fixed
[-]Distance - Deleted rate is shown as inactive briefly after deleting it[/-][+][Due for payment 2026-06-19] Distance - Deleted rate is shown as inactive briefly after deleting it[/+]melvin-bot commentedon Jun 12, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.6-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-06-19. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 12, 2026
@Krishna2323 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
[-][Due for payment 2026-06-19] Distance - Deleted rate is shown as inactive briefly after deleting it[/-][+][Due for payment 2026-06-22] [Due for payment 2026-06-19] Distance - Deleted rate is shown as inactive briefly after deleting it[/+]melvin-bot commentedon Jun 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.7-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-06-22. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 15, 2026
@Krishna2323 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]