[CP Staging] Source signerEmail from session instead of account.primaryLogin - #97226
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🚧 joekaufmanexpensify has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb SafariMacOS: Chrome / Safariweb.mov |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good from my perspective.
|
Kind bump @situchan on review here |
ReviewThe fix is correct and well-scoped. Sourcing Verified root cause: Two minor, non-blocking notes: Details
Nothing here blocks merge — items above are just for the reviewer's awareness. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
Hey @situchan, any ETA on reviewing this one? |
|
ETA today |
|
I'll be OOO next week (back Aug 10) 🌴 |
QA StepsPrerequisites
Test 1 — Normal session (director completes signer info)
Test 2 — Copilot / delegate session (the previously-broken case)
Test 3 — Emailed second signer (AUD / two-signer path, if applicable)
Expected result (all tests): the signer/director step completes successfully; the bank account setup never gets permanently stuck on the "Hang tight" screen. |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #97151 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
@situchan mind completing the reviewer checklist? thanks |
|
@MelvinBot why PR Reviewer Checklist failing even if it's filled here? |
|
The check is stale — it's not actually seeing your checked boxes. Just re-submit a review on the PR to re-run it and it'll pass. What happened:
The workflow runs Fix: submit any new review on the PR (e.g. re-approve, or a "comment" review). That fires a fresh |
…51-fix-blank-signer-email # Conflicts: # src/pages/ReimbursementAccount/EnterSignerInfo/index.tsx
bccaf8a
account.primaryLoginaccount.primaryLogin
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
…7151-fix-blank-signer-email [CP Staging] Source signerEmail from session instead of `account.primaryLogin` (cherry picked from commit 4da55ef) (cherry-picked to staging by mountiny)
|
✋ 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! 🧪🧪
|
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.48-1 🚀
|
|
🤖 No help site changes required. I reviewed the changes in this PR and no updates to the help site files under Why: This is a purely internal bug fix. It changes where
Since there's no user-facing behavior or copy change to document, I did not create a draft docs PR. |

Explanation of Change
Non-USD (e.g. UK/GBP) bank account setup could get permanently stuck on the "hang tight" screen because
SaveCorpayOnboardingDirectorInformationwas sent with a blanksignerEmail, failing backend required-field validation.Both submission paths read the email from
account.primaryLogin, which isn't reliable:Delegate.connectcallsclearOnyxForDelegateTransition, which wipesONYXKEYS.ACCOUNTand only re-hydrates it asynchronously viaOpenApp.ONYXKEYS.SESSIONis inKEYS_TO_PRESERVE_DELEGATE_ACCESSand survives the switch.account.primaryLogincan be blank or belong to the wrong account, whilesession.emailis the account being acted on.DelegateAccessHandleralready relies on this.ONYXKEYS.ACCOUNTis unhydrated at submit time.Fix: read
signerEmailfromONYXKEYS.SESSION(via the existingemailSelector) in both paths —NonUSD/SignerInfo/index.tsx(in-line director flow) andEnterSignerInfo/index.tsx(emailed-signer flow).Fixed Issues
$ #97151
PROPOSAL: N/A
Tests
console.logtosrc/pages/ReimbursementAccount/NonUSD/SignerInfo/index.tsxwith currentUserEmail. Open linkhttps://dev.new.expensify.com:8082/bank-account/new/global/signer-info/is-director?policyID=<POLICY_ID>. See, currentUserEmail isn't empty.console.logtosrc/pages/ReimbursementAccount/EnterSignerInfo/index.tsxwith signerEmail. Open linkhttps://dev.new.expensify.com:8082/bank-account/enter-signer-info?policyID=<POLICY_ID>&bankAccountID=1&isCompleted=false. See, signerEmail isn't empty.Offline tests
N/A
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Verify that no errors appear in the JS console
Complete UK/non-USD bank account signer/director verification in a normal session → succeeds.
Complete it in a Copilot/delegate session → succeeds (previously stuck on "hang tight").
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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