Skip to content

Domains - Long email overflows on Report suspicious activity RHP #84214

Closed

Description

@vincdargento

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.3.31-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #78372
Email or phone of affected tester (no customers): applausetester@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  1. Go to staging.new.expensify.com
  2. Go to Workspaces tab.
  3. Scroll to the bottom and open applause.expensifail.com.
  4. Go to Domain members.
  5. Click on any member with long email.
  6. Click Report suspicious activity.

Expected Result:

Long email will be wrapped.

Actual Result:

Long email overflows, which causes the content below it to overflow too.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @jmusial

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 4, 2026
  2. melvin-bot commented on Mar 4, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #78372

  3. melvin-bot commented on Mar 4, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. melvin-bot commented on Mar 4, 2026

    @melvin-bot

    Triggered auto assignment to @lydiabarclay (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  5. github-actions commented on Mar 4, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. OSBotify commented on Mar 4, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #78372 - "[Release 3.3] [Domain Control] Report suspicious activity" by @jmusial (High confidence)
    Related Issues: #79568

    Recommendation: REVERT

    This PR introduced a new "Report suspicious activity" feature for domain members. The issue occurs because long email addresses in the confirmation prompt are not properly wrapped, causing content overflow. Since this is a new feature that does not exist in production and reverting will not impact existing functionality, reverting is the safest approach to unblock the deploy.

    Labels: Keeping DeployBlockerCash - this is a Frontend bug that requires an App PR fix or revert


    Evidence

    PR #78372 added the DomainReportSuspiciousActivityPage.tsx file which renders the suspicious activity prompt. The issue is reproducible on staging only (v9.3.31-0) and matches the new feature added by this PR.

    Verification

    The bug affects the Report suspicious activity RHP for domain members. Key files modified:

    • src/pages/domain/Members/DomainReportSuspiciousActivityPage.tsx (new file)
    • src/pages/settings/Security/LockAccount/LockAccountPageBase.tsx
    • src/components/RenderHTML.tsx

    The prompt renders via RenderHTML component with email in strong tags.

    Root Cause

    The RenderHTML component sets contentWidth but the strong style does not include word-wrapping properties like wordBreak or overflowWrap. This causes long email addresses to overflow their container, pushing content below it out of bounds.

  7. OSBotify commented on Mar 4, 2026

    @OSBotify
    Contributor

    Label Decision

    The DeployBlockerCash label is correctly applied and should remain. This is a Frontend bug caused by App PR #78372, which means:

    • The fix or revert needs to happen in the App repository
    • The App (mobile) deploy should remain blocked until resolved
    • No backend changes are required
  8. MelvinBot commented on Mar 4, 2026

    @MelvinBot
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    On the "Report suspicious activity" RHP for domain members, long email addresses overflow their container horizontally, causing the content below to also overflow.

    What is the root cause of that problem?

    The DomainReportSuspiciousActivityPage uses the RenderHTML component to render a prompt that embeds the member's email inside <strong> HTML tags:

    // en.ts:8560-8561
    reportSuspiciousActivityPrompt: (email: string) =>
        `Are you sure? This will lock <strong>${email}'s</strong> account. <br /><br /> ...`,

    The RenderHTML component uses react-native-render-html, and the base text style (webViewStyles.baseFontStyle at src/styles/index.ts:243-250) has no wordBreak property:

    baseFontStyle: {
        color: theme.text,
        fontSize: variables.fontSizeNormal,
        ...FontUtils.fontFamily.platform.EXP_NEUE,
        flex: 1,
        lineHeight: variables.fontSizeNormalHeight,
        ...writingDirection.ltr,
        // No wordBreak here
    },

    The <strong> tag style (src/styles/index.ts:302-305) also has no wordBreak. Without this property, CSS defaults to wordBreak: 'normal', which only breaks text at whitespace. Long email addresses have no whitespace, so they render as a single unbreakable text run that overflows the container.

    The container View in LockAccountPageBase.tsx:92 has flex: 1 and mh5 margins but no overflow control for the text child.

    Note: The self-lock version (LockAccountPage.tsx) uses plain <Text> components (not RenderHTML), which handle wrapping natively and are not affected.

    What changes do you think we should make in order to solve the problem?

    Add ...wordBreak.breakWord to webViewStyles.baseFontStyle in src/styles/index.ts. This pattern is already used in 14+ other styles in the same file (e.g., emojiSuggestionsText, chat message text styles). On native, wordBreak.breakWord resolves to an empty object (src/styles/utils/wordBreak/index.native.ts), so this change is a no-op on mobile and only affects web.

    The change:

    baseFontStyle: {
        color: theme.text,
        fontSize: variables.fontSizeNormal,
        ...FontUtils.fontFamily.platform.EXP_NEUE,
        flex: 1,
        lineHeight: variables.fontSizeNormalHeight,
        ...writingDirection.ltr,
        ...wordBreak.breakWord,  // <-- add this
    },

    This ensures all HTML content rendered via react-native-render-html will break long words to prevent overflow, matching the behavior already applied to most other text elements in the app.

    What alternative solutions did you explore? (Optional)

    1. Scoped fix on LockAccountPageBase.tsx container — Adding wordBreak to just the wrapping <View> in LockAccountPageBase.tsx:92. This is more targeted but less robust, as other RenderHTML usages throughout the app could have the same issue with long unbreakable strings.

    2. Replace RenderHTML with plain <Text> components — Similar to how the self-lock version (LockAccountPage.tsx) works. This would require restructuring the translation strings and adding React elements for bold text, which is more invasive and doesn't fix the root cause for other RenderHTML usages.


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  9. jmusial commented on Mar 5, 2026

    @jmusial
    Contributor

    PR with a fix here

  10. m-natarajan commented on Mar 5, 2026

    @m-natarajan

    Passed, Chrome / v9.3.31-11

    Screen.Recording.2026-03-06.at.00.47.44.mp4
  11. mountiny commented on Mar 5, 2026

    @mountiny
    Contributor

    Perfect, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions