Repository navigation
Part 6 - Audit usage of Str.removeSMSDomain - #106525
Conversation
|
@shubham1206agra 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] |
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d93c0faaa3
ℹ️ 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".
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Eskalifer1
left a comment
There was a problem hiding this comment.
The tests are well-written, but I think the QA team might have questions about how to reproduce the precondition so that there is no display name.
I suggest adding a note explaining that this can be done by first adding a phone number(which hasn’t yet been registered in Expensify) from another account to the Workspace as an admin, and only then logging in with that number - in which case the display name won’t be set and the fallback will be used.
Also let's add note to step 4 in tests that invite login(phone number) should not be Workspace member
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e7ccec277
ℹ️ 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".
This comment was marked as resolved.
This comment was marked as resolved.
|
1 small cosmetic bug: You have double One more 1: Do you plan to upload recordings for other platforms or we are good to move only with MacOs? |
Reviewer Checklist
Screenshots/Videos |
Eskalifer1
left a comment
There was a problem hiding this comment.
This is Part 7 of the ongoing audit
This should be only Part 6, let's also fix that in Explanation of change section
yes it's ok |
|
One pending question @Eskalifer1 |
|
We are done here right? @Eskalifer1 |
Yep! Waiting on @mountiny approve |
mountiny
left a comment
There was a problem hiding this comment.
LGTM, but there are conflicts
|
✋ 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.5.40-0 🚀
|
|
No help site update needed — this PR fixes phone-number formatting without adding a feature, changing a workflow, or making existing article instructions incorrect. |










Explanation of Change
Str.removeSMSDomainalready stripped the@expensify.smssuffix, but left the bare, unformatted digits behind wherever it was used for a phone-login user's name or login — inconsistent with the rest of the app, which usesformatPhoneNumberto show a readable national/international number. This is Part 6 of the ongoing audit (#97957), covering the remaining misc sites: the account switcher's login subtitle and the single-invite confirmation screen's member name.Converted
AccountSwitcher.tsxandAccountSwitcherButton.tsx(both display a login, so bareformatPhoneNumber(login), no guard needed) andWorkspaceInviteMessageComponent.tsx'sinvitingMemberName(built from a displayName, so the guardedStr.isSMSLogin(x) ? formatPhoneNumber(x) : x). Two originally-scoped sites were dropped:getUserNameByEmailno longer exists in the codebase, andgetPhoneNumberinPersonalDetailsUtils.tsis a raw-value getter whose three callers already apply the guard themselves, so it correctly stays unconverted.Fixed Issues
$ #97957
PROPOSAL:
Tests
Precondition: an account whose login is a phone/SMS number (e.g.
+14155550100@expensify.sms) with no display name set, so its display name falls back to the raw login.To reproduce that precondition: as an admin, invite a phone number that has not yet been registered on Expensify to your Workspace. Then, from a separate session/device, sign in using that same phone number for the first time. Because the account is brand new and was never given a display name, its display name falls back to the raw login — this is the state that currently prints unformatted digits.
+1 (415) 555-0100), not raw digits like+14155550100.4155550100) into the search box. Verify the account still appears, even though its displayed description is formatted.Offline tests
Same as tests.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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