[Commuter Exclusion] Allow editing historical distance expenses - #98368
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@mjasikowski 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-09-02.at.9.22.43.PM.movAndroid: mWeb ChromeScreen.Recording.2026-09-02.at.7.00.50.PM.moviOS: HybridAppScreen.Recording.2026-09-02.at.9.15.31.PM.moviOS: mWeb SafariScreen.Recording.2026-09-02.at.6.57.23.PM.movMacOS: Chrome / SafariScreen.Recording.2026-09-02.at.6.52.29.PM.mov |
Bug: Editing the distance does not show the Model require GPS and the distance is edited successfully RF-1.mov |
|
@fedirjh, could you please take a look at this #98368 (comment), thanks. |
@marufsharifi Why is this considered a bug? This looks like expected behavior — the distance was created before GPS enforcement was turned on, so letting the edit through matches what we intended with this PR. We should be consistent and either block both cases or allow both, and I think we already settled on allowing it here: |
|
We only restrict moving forward, not historically. |
|
@Gonals, could you please merge this when you get a chance, since everyone has approved it? Thanks! |
|
🚧 Gonals has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.4.76-0 🚀
|
|
Yes — help site changes are required. Draft PR: #100905 This PR removed the creation guard when editing an existing manual or odometer distance expense, so members can now change the distance on expenses they created before the workspace started requiring map or GPS distance. Neither that rule nor this new exception was documented anywhere under What I changed
One thing to flag: I deliberately left commuter exclusions out of the public docs. The Exclude commutes row is gated behind the UI label verificationChecked live against dev NewDot on web:
Not screen-confirmed (beta-gated or modal-only), sourced from
@fedirjh, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Hi @fedirjh. We are not seeing the “Exclude a fixed distance per claim” feature in the workspace’s Distance Settings. bandicam.2026-09-11.03-43-26-483.mp4 |
|
@IuliiaHerets Yes, the copy was updated recently. |
|
@IuliiaHerets Updated |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.76-1 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Manual and odometer distance expenses created before commuter exclusions were enabled were blocked from being edited because the guard only checked the workspace's current settings. This change lets existing distance expenses bypass that creation guard.
Commuter exclusions are still not applied retroactively: transaction recalculation only updates exclusion data when the expense already has an applied exclusion. Creating a new manual or odometer expense in a workspace with commuter exclusions remains blocked.
Fixed Issues
$ #98223
PROPOSAL: #98223 (comment)
Tests
Prerequisite:
Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari
CleanShot.2026-08-24.at.11.59.45.mp4