Repository navigation
[Payment due @Krishna2323] Keep personal details when switching to and from copilot account - #99368
Conversation
|
@jasperhuangg 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d194876704
ℹ️ 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".
| // Keep personal details through the switch so the nav avatar and user names render | ||
| // instantly instead of showing a skeleton while OpenApp responds. OpenApp overwrites | ||
| // this key with fresh data when its response lands, so stale entries are short lived. | ||
| ONYXKEYS.PERSONAL_DETAILS_LIST, |
There was a problem hiding this comment.
Clear unrelated personal details after account switches
Preserving the entire collection crosses the account boundary: OpenApp personal-detail updates are merged, so entries omitted for the newly active account are not removed despite the comment claiming that the key is overwritten. After switching into or out of a copilot account, contact pickers and search build options from every retained entry in PERSONAL_DETAILS_LIST, exposing contacts from the previous account and accumulating potentially large directories across repeated switches. Preserve only the personal-detail entries needed for the transition avatar, or explicitly replace/clean this collection once OpenApp completes.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
We can wait to see if this is a problem before we fix it. Since the account has access to the copilot accounts, they have access to the personal details available to those accounts
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid_hybrid.mp4Android: mWeb Chromeandroid_mWeb.mp4iOS: HybridAppios_hybrid.mp4iOS: mWeb Safariios_mWeb.mp4MacOS: Chrome / Safariweb_chrome.mp4 |
|
🎯 @Krishna2323, 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. |
|
🚀 Deployed to staging by https://github.com/tgolen in version: 9.4.62-1 🚀
|
|
🤖 No help site changes required — no draft PR created. This PR is a purely internal QOL fix. It adds There is no user-facing behavior, feature, flow, label, tab, or button change here — only the removal of a transient loading state. The existing Copilot help articles remain accurate: Their documented steps for switching into and exiting a Copilot account still match the current UI, so no updates under |
|
@cead22 @Krishna2323 NO QA steps / Test steps, Can you please check? |
|
This is working well, here's v9.4.61-4 vs 9.4.62-1 Screen.Recording.2026-08-26.at.5.27.26.PM.movScreen.Recording.2026-08-26.at.5.30.43.PM.mov |
|
@cead22, so, can we check it off? |
|
Yes! |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.4.62-4 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Payment issue created: #99699 |
|
@cead22 @Krishna2323 This is regarding the regression test proposal for this , Offline modal displayed when tried to switch to copilot account. Is this expected?
|
|
@m-natarajan yes, you cannot copilot into another account when offline |

Explanation of Change
When switching into Copilot Accounts and then back to your account, the avatar and personal details on the account settings page unnecessarily shows a skeleton loading UI. This makes it so that we don't blow up personal details when switching to and from copilot accounts by using the existing mechanism to preserve some Onyx keys in those flows.
We discussed this recently on Slack, and there was a video showing the issue, but I can't find the conversation. That said, the before video in the test below shows what this solves
Fixed Issues
QOL improvement
PROPOSAL: n/a
Tests
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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Tested throttling network on dev (3G)
Before
Screen.Recording.2026-08-24.at.5.55.21.PM.mov
After
Screen.Recording.2026-08-24.at.5.56.15.PM.mov