Repository navigation
[Payment due @huult] Stop a client-side session age check from signing users out and dropping GPS trips - #97787
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@Eskalifer1 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] |
|
This PR adds a new |
|
LMK if you need my help here! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08fac85824
ℹ️ 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".
GCyganek
left a comment
There was a problem hiding this comment.
Added one comment, other than that it looks good 👍 I tested GPS flows and they seem to be working fine
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-08-21.at.14.47.25.movAndroid: mWeb ChromeiOS: HybridAppScreen.Recording.2026-08-21.at.14.24.33.moviOS: mWeb SafariMacOS: Chrome / Safari |
|
So, could you update the change description to reflect the new updates? |
Screen.Recording.2026-08-21.at.15.15.56.mov@allgandalf Could you double-check after your update? I can’t continue the trip anymore |
|
already updated, attachment steps are out and the GPS steps are renumbered |
|
good catch, real bug. a trip started before this build has no accountID so it got dropped. fixed in 87e9830, please retest |
@allgandalf Do we need to update this as well? |
|
good catch again, that para was still describing the attachment fix. rewritten, and added a step for the trip started before this change |
huult
left a comment
There was a problem hiding this comment.
LGTM.
Screen.Recording.2026-08-21.at.17.24.06.mov
|
🎯 @huult, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
mountiny
left a comment
There was a problem hiding this comment.
Looks good to me, the tests could be added in some follow up but also curious if Carlos and Tim want to review
There was a problem hiding this comment.
Can you also please follow the Given, when, then comments for tests?
|
I dont want to hold this over the weekend due to the comments, lets just do a quick follow up later |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.59-0 🚀
|
Help site review — no changes requiredI reviewed this PR against the help site articles under Why: This is an internal bug fix that restores expected behavior for a narrow edge case. It stops a client-side session-age check from signing users out and dropping an in-progress GPS trip during a forced SAML re-auth, and it stamps the trip with the What I checkedThe GPS distance flow is already documented and remains accurate after this PR:
Neither article makes any claim about trips being lost on sign-out/re-auth, so there is no incorrect statement to correct. The change also doesn't introduce a new documented feature:
The behavior only triggers for SAML-required accounts undergoing a forced re-auth mid-trip, which isn't a workflow the help site documents. @allgandalf, this is my read that no help-site update is needed for this PR — the documented GPS distance flow stays accurate. If you'd rather I add an FAQ entry about what happens to an in-progress GPS trip when you're signed out and back in (this resume/continue behavior is currently undocumented), reply with |
|
Hi @allgandalf. QA team attempted to test this flow, but Step 3 doesn’t seem to work as expected. aaa.mp4 |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.4.59-5 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Payment issue created: #99363 |

Explanation of Change
A forced SAML re-auth signs you out mid recording, and the
Onyx.clearbehind it wipes the in-progress GPS trip, so a long trip is lost. The trip is now kept across that re-auth. It also stores theaccountIDthat started it, so the trip is dropped rather than offered when a different user signs in on the same device.The attachment side is out of scope here, tracked in #92435.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/665676
PROPOSAL: n/a
Tests
Needs a SAML required account, so the re-auth signs you out instead of refreshing the token in the background.
On iOS or Android:
Invalidate with delayand wait ~15 seconds. Test tools are hidden on production, so use dev or staging.Continue GPS trip recording?prompt appears and thatContinue tripresumes with the earlier distance intact.main, then switch to this branch and reopen the app.Continue tripworks, since a trip started before this change stores noaccountID.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.Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-08-12.at.15.17.37.mov