[No QA] Stephanieelliott patch 28#79858
[No QA] Stephanieelliott patch 28#79858stephanieelliott merged 10 commits intostephanieelliott-patch-27from
Conversation
…ls-1 [NoQA] Refactor: ReportNameUtils from translateLocal to translate from hook (part 1)
Call the invite whisper for only workspace chats
…show-on-chat-member Hide empty tag field for chat member
db872d9
into
stephanieelliott-patch-27
Concierge reviewer checklist:
For more detailed instructions on completing this checklist, see How do I review a HelpDot PR as a Concierge Team member? |
|
@youssef-lr @johncschuster One of you needs to 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] |
| const ancestors = useAncestors(report); | ||
|
|
||
| const inviteUsers = useCallback(() => { | ||
| const inviteUsers = () => { |
There was a problem hiding this comment.
❌ PERF-4 (docs)
The inviteUsers function should be wrapped with useCallback to prevent unnecessary re-renders of child components.
Why this matters:
RoomInvitePageis NOT optimized by React Compiler- Both
SelectionListandFormAlertWithSubmitButtonARE optimized/memoized - Without
useCallback, a newinviteUsersfunction reference is created on every render - This breaks memoization and causes unnecessary re-renders of both child components
Suggested fix:
const inviteUsers = useCallback(() => {
HttpUtils.cancelPendingRequests(READ_COMMANDS.SEARCH_FOR_REPORTS);
if (\!validate()) {
return;
}
const invitedEmailsToAccountIDs: MemberEmailsToAccountIDs = {};
selectedOptions.forEach((option) => {
const isSelectedOptionLogin = \!\!option.login;
let {login: optionLogin, accountID} = option;
if (\!isSelectedOptionLogin || \!optionLogin || \!accountID) {
return;
}
const login = addSMSDomainIfPhoneNumber(optionLogin);
invitedEmailsToAccountIDs[login] = Number(accountID);
});
if (report?.reportID) {
if (isPolicyExpenseChat(report)) {
inviteToRoomAction(report, ancestors, invitedEmailsToAccountIDs, currentUserPersonalDetails.timezone ?? CONST.DEFAULT_TIME_ZONE);
} else {
inviteToRoom(reportID, invitedEmailsToAccountIDs, formatPhoneNumber);
}
clearUserSearchPhrase();
if (backTo) {
Navigation.goBack(backTo);
} else {
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(report.reportID));
}
}
}, [validate, selectedOptions, ancestors, report, currentUserPersonalDetails.timezone, backTo, reportID, formatPhoneNumber]);|
A preview of your ExpensifyHelp changes have been deployed to https://47a97c49.helpdot.pages.dev ⚡️ Updated articles: |
HelpDot Documentation ReviewOverall AssessmentThis PR updates the Two-Factor Authentication documentation from Expensify Classic to New Expensify. The changes show a significant restructuring with improved clarity and user-focused guidance. However, there are several critical issues that need to be addressed before merging. Scores Summary
Key FindingsCritical Issues
Structural Issues
Content Issues
RecommendationsPriority 1 (Must Fix Before Merge)
Priority 2 (Should Fix)
Priority 3 (Nice to Have)
Files Reviewed
Positive Aspects
Note: This PR also includes code changes to MoneyRequestView.tsx, ReportNameUtils.ts, and RoomInvitePage.tsx which are outside the scope of this documentation review. |
| title: Two-Factor Authentication (2FA) | ||
| description: Learn how to set up, use, and recover your Expensify account with two-factor authentication (2FA), including lost device and admin recovery options. | ||
| keywords: [Expensify Classic, two-factor authentication, 2FA, login security, authenticator app, recovery codes, locked out, lost phone, account recovery, Domain Admin reset] | ||
| keywords: [New Expensify, two-factor authentication, 2FA, login security, authenticator app, recovery codes, locked out, lost phone, account recovery, Domain Admin reset, backup codes. |
There was a problem hiding this comment.
YAML metadata violation: Missing closing bracket ] in keywords array. The line should end with ] not .
| --- | ||
|
|
||
| # How two-factor authentication works | ||
| # Who can use Two-Factor Authentication in Expensify Classic |
There was a problem hiding this comment.
Terminology violation: This heading mentions "Expensify Classic" but the article is for New Expensify (based on the file path new-expensify/settings/). This creates confusion. Either correct the heading to "Who can use Two-Factor Authentication in New Expensify" or clarify why Classic is mentioned here.
| 2. Enter a 6-digit code generated by your authenticator app (such as Google Authenticator, Microsoft Authenticator, or Authy). | ||
|
|
||
| Codes refresh every few seconds. If one expires, simply open the app for a new code. | ||
| Anyone can enable Two-Factor Authentication on their own account. Domain admins can also enable Two-Factor Authentication for domains, which forces each domain member to set up Two-Factor Authentication on their account. |
There was a problem hiding this comment.
Terminology violation: Use "workspace" instead of "domain" to match Expensify standards. Change "Domain admins" to "Workspace Admins".
| 2. Enter a 6-digit code generated by your authenticator app (such as Google Authenticator, Microsoft Authenticator, or Authy). | ||
|
|
||
| Codes refresh every few seconds. If one expires, simply open the app for a new code. | ||
| Anyone can enable Two-Factor Authentication on their own account. Domain admins can also enable Two-Factor Authentication for domains, which forces each domain member to set up Two-Factor Authentication on their account. |
There was a problem hiding this comment.
Terminology violation: Use "domain member" should be "workspace member" to align with Expensify terminology standards.
| 1. Ensure an authenticator app is installed on your device. | ||
| 2. From the left-hand menu, select **Account > Security**. | ||
| 3. Under **Security options**, select **Two-Factor Authentication**. | ||
| 4. Enable **Two-factor authentication**. |
There was a problem hiding this comment.
Readability violation: Duplicate step number. You have two step 4s (lines 22 and 23). Renumber the steps correctly.
| 3. Under **Security options**, select **Two-Factor Authentication**. | ||
| 4. Enable **Two-factor authentication**. | ||
| 4. Save a copy of your backup codes: | ||
| - Click **Download** to save them to your computer. |
There was a problem hiding this comment.
Button label violation: Use "Select" instead of "Click" for consistency with Expensify style. Change "Click Download" to "Select Download".
| 4. Enable **Two-factor authentication**. | ||
| 4. Save a copy of your backup codes: | ||
| - Click **Download** to save them to your computer. | ||
| - Click **Copy** to store them in a secure location. |
There was a problem hiding this comment.
Button label violation: Use "Select" instead of "Click" for consistency. Change "Click Copy" to "Select Copy".
| 4. Save a copy of your backup codes: | ||
| - Click **Download** to save them to your computer. | ||
| - Click **Copy** to store them in a secure location. | ||
| **Important:** If you lose access to your authenticator app and didn’t save your recovery codes, you may permanently lose access to your account. Consider adding 2FA on multiple devices (e.g., phone and tablet) for backup. |
There was a problem hiding this comment.
Markdown formatting violation: The Important: note should be on a new line or properly formatted as a note/callout block, not continuing directly from the bullet point above.
| - Click **Download** to save them to your computer. | ||
| - Click **Copy** to store them in a secure location. | ||
| **Important:** If you lose access to your authenticator app and didn’t save your recovery codes, you may permanently lose access to your account. Consider adding 2FA on multiple devices (e.g., phone and tablet) for backup. | ||
| 5. Click **Continue**. |
There was a problem hiding this comment.
Button label violation: Use "Select" instead of "Click". Change "Click Continue" to "Select Continue".
| 6. Open your authenticator app and either: | ||
| - Scan the QR code displayed on your screen. | ||
| - Enter the 6-digit code from your authenticator app into Expensify and then click **Verify**. | ||
|
|
There was a problem hiding this comment.
Button label violation: Use "Select" instead of "Click". Change "click Verify" to "select Verify".
| --- | ||
|
|
||
| # Recovery options | ||
| ## For Domain Admins: Reset Two-Factor Authentication for a member |
There was a problem hiding this comment.
AI Readiness violation: Heading level is too deep (##). Use # or ## only for better structure and AI parsing. Change "## For Domain Admins:" to "# For Domain Admins: Reset Two-Factor Authentication for a member".
| # Recovery options | ||
| ## For Domain Admins: Reset Two-Factor Authentication for a member | ||
|
|
||
| If a member loses access to their authenticator app or recovery codes, you can reset their 2FA — *but only if*: |
There was a problem hiding this comment.
Terminology violation: Use "Workspace Admin" instead of "Domain Admin" to match Expensify standards.
| ## For Domain Admins: Reset Two-Factor Authentication for a member | ||
|
|
||
| If a member loses access to their authenticator app or recovery codes, you can reset their 2FA — *but only if*: | ||
| - They use a company email on your verified domain, **and** |
There was a problem hiding this comment.
Terminology violation: Use "workspace" instead of "domain". Change "verified domain" to "verified workspace".
|
|
||
| If a member loses access to their authenticator app or recovery codes, you can reset their 2FA — *but only if*: | ||
| - They use a company email on your verified domain, **and** | ||
| - You (the Domain Admin) also have 2FA enabled |
There was a problem hiding this comment.
Terminology violation: Use "Workspace Admin" instead of "Domain Admin".
| To reset a member’s 2FA settings: | ||
|
|
||
| Backup recovery codes work like one-time passwords. They are your fastest recovery method if you lose access to your authenticator app. | ||
| 1. Go to **Settings > Domains > Domain Members**. |
There was a problem hiding this comment.
Button label violation: Use "Select" instead of "Click". Change "Click Edit Settings" to "Select Edit Settings".
|
|
||
| Backup recovery codes work like one-time passwords. They are your fastest recovery method if you lose access to your authenticator app. | ||
| 1. Go to **Settings > Domains > Domain Members**. | ||
| 2. Click **Edit Settings** for the affected email address. |
There was a problem hiding this comment.
Button label violation: Use "Select" instead of "Click". Change "Click Reset" to "Select Reset".
| 2. Click **Edit Settings** for the affected email address. | ||
| 3. Click **Reset** to disable 2FA. | ||
| 4. The member can now log in and set up 2FA again. | ||
|
|
There was a problem hiding this comment.
Terminology violation: Use "workspace" instead of "domain". Change "If your domain doesn't have 2FA enabled yet" to "If your workspace doesn't have 2FA enabled yet".
| 3. Then follow the steps above to reset 2FA for the member. | ||
|
|
||
| # Admin recovery and overrides | ||
| **Note** Domain Admin 2FA resets are only available in Expensify Classic. To complete these steps, temporarily [switch to Expensify Classic]([url](https://help.expensify.com/articles/new-expensify/settings/Switch-between-New-Expensify-and-Expensify-Classic.html)). |
There was a problem hiding this comment.
Terminology violation: Use "Workspace Admin" instead of "Domain Admin". Change "Domain Admin 2FA resets" to "Workspace Admin 2FA resets".
| 3. Then follow the steps above to reset 2FA for the member. | ||
|
|
||
| # Admin recovery and overrides | ||
| **Note** Domain Admin 2FA resets are only available in Expensify Classic. To complete these steps, temporarily [switch to Expensify Classic]([url](https://help.expensify.com/articles/new-expensify/settings/Switch-between-New-Expensify-and-Expensify-Classic.html)). |
There was a problem hiding this comment.
Markdown formatting violation: Invalid markdown link syntax. The format [text]([url](actual-url)) is incorrect. Should be [switch to Expensify Classic](https://help.expensify.com/articles/new-expensify/settings/Switch-between-New-Expensify-and-Expensify-Classic.html).
| - Select the member, then disable their 2FA. | ||
| --- | ||
|
|
||
| ## What to do if you're locked out because of Two-Factor Authentication |
There was a problem hiding this comment.
AI Readiness violation: Heading level is too deep (##). Use # instead for main sections. Change "## What to do if you're locked out" to "# What to do if you're locked out because of Two-Factor Authentication".
| 1. Verify domain ownership by proving control of the domain’s email DNS or MX records. | ||
| 2. Assign a new Domain Admin in **Settings > Domains > [Domain Name] > Domain Settings**. | ||
| 3. Once the new admin is assigned, follow the steps above to reset 2FA for affected members. | ||
| If you can’t access your authenticator app and don’t have your recovery codes, contact your Domain Admin to reset your 2FA. |
There was a problem hiding this comment.
Terminology violation: Use "Workspace Admin" instead of "Domain Admin".
| If you can’t access your authenticator app and don’t have your recovery codes, contact your Domain Admin to reset your 2FA. | ||
|
|
||
| # Best practices | ||
| If no Domain Admin is available and you're using a company email, you can follow [this guide](https://help.expensify.com/articles/new-expensify/workspaces/Claim-and-Verify-a-Domain) to claim the domain and reset your 2FA settings yourself. |
There was a problem hiding this comment.
Terminology violation: Use "Workspace Admin" instead of "Domain Admin". Change "If no Domain Admin is available" to "If no Workspace Admin is available".
| If you can’t access your authenticator app and don’t have your recovery codes, contact your Domain Admin to reset your 2FA. | ||
|
|
||
| # Best practices | ||
| If no Domain Admin is available and you're using a company email, you can follow [this guide](https://help.expensify.com/articles/new-expensify/workspaces/Claim-and-Verify-a-Domain) to claim the domain and reset your 2FA settings yourself. |
There was a problem hiding this comment.
Terminology violation: Use "workspace" instead of "domain". Change "claim the domain" to "claim the workspace".
| - Save your recovery codes as soon as you set up 2FA. | ||
| - Consider adding 2FA on multiple devices (e.g., phone and tablet) during setup for backup. | ||
| - Keep your device’s clock set to the correct time—codes depend on accurate timing. | ||
| For more help regaining access, see [Troubleshoot login issues](LINK). |
There was a problem hiding this comment.
Missing link violation: The text says "see Troubleshoot login issues" but LINK is a placeholder. Replace with the actual URL or remove if not available.
|
|
||
| When you enable 2FA, you are prompted to either copy or download backup codes which you can use in lieu of the 6-digit authenticator code. If you downloaded the codes they will be saved with the file name `two-factor-auth-codes`. | ||
|
|
||
| If you are unable to access the codes, see [Troubleshoot login issues](LINK) for instructions. |
There was a problem hiding this comment.
Missing link violation: The text says "see Troubleshoot login issues" but LINK is a placeholder. Replace with the actual URL or remove if not available.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🚀 Deployed to staging by https://github.com/stephanieelliott in version: 9.3.6-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.6-4 🚀
|
Explanation of Change
Fixed Issues
$
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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