Skip to content

[Due for payment 2026-03-19] Report field & Taxes - Name field auto throws error #84958

Closed

Description

@mitarachim

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.36-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #82510
Email or phone of affected tester (no customers): sjnodijsodjnoindjisoj@gmail.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:

  • Enable Report fields in workspace settings > Reports.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Reports.
  3. Click Add field.
  4. Click Name.

Expected Result:

Name field will not throw error.

Actual Result:

Name field auto throws error.

If user enters text on Name field before error shows up, "Name" header is highlighted instead.

Similar issue is observed in Taxes > Add rate > Name.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7100344_1773260691661.3.mp4

View all open jobs on GitHub

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Mar 11, 2026

    @melvin-bot

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

  4. github-actions commented on Mar 11, 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.
  5. OSBotify commented on Mar 11, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #82510 - "fix: Screen Reader: Many Pages: There is no dialog role and title announced" by @TaduJR (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #82510 introduces a focus management conflict that causes immediate validation errors when opening TextSelectorModal for required fields. The PR added accessibility improvements but inadvertently breaks the user flow for creating report fields and tax rates.

    Labels: No label changes needed - keeping both DeployBlockerCash and DeployBlocker as this is reproducible on staging only and requires an App PR fix.

    Detailed Analysis

    Evidence

    PR #82510 added dialog accessibility features to RHP (Right Hand Panel) pages, including:

    1. DialogLabelContext - tracks the dialog title
    2. useDialogTitleFocus - automatically focuses the Header title after RHP transition completes
    3. Header component registers its title and receives focus via tabIndex={-1}

    The focus happens after SCREEN_TRANSITION_END_TIMEOUT (1000ms) as a fallback or when the transitionEnd navigation event fires.

    Verification

    Affected files from PR #82510:

    • /home/runner/_work/App/App/src/components/Header.tsx - Added dialog label registration and focus management
    • /home/runner/_work/App/App/src/hooks/useDialogTitleFocus/index.ts - New hook that focuses title after transition
    • /home/runner/_work/App/App/src/components/DialogLabelContext.tsx - New context for managing dialog labels
    • /home/runner/_work/App/App/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx - Wrapped Stack.Navigator in DialogLabelProvider

    Affected pages:

    • /home/runner/_work/App/App/src/pages/workspace/reports/CreateReportFieldsPage.tsx - Uses TextPicker for Name field
    • /home/runner/_work/App/App/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx - Uses TextPicker for Name field

    Both pages use TextPicker component which opens TextSelectorModal.

    Root Cause

    Timeline of events when clicking "Name" field:

    1. T+0ms: TextSelectorModal opens (RIGHT_DOCKED modal)
    2. T+300ms: TextInput tries to focus via useFocusEffect with ANIMATED_TRANSITION delay
    3. T+1000ms: Header title "Name" steals focus via useDialogTitleFocus with SCREEN_TRANSITION_END_TIMEOUT fallback
    4. Focus lost: When Header takes focus, TextInput loses focus and triggers blur validation
    5. Error shown: Form validation runs, sees empty required field, displays error immediately

    Key code locations:

    src/hooks/useDialogTitleFocus/index.ts:32:

    const timeout = setTimeout(focusTitle, CONST.SCREEN_TRANSITION_END_TIMEOUT); // 1000ms

    src/components/Header.tsx:112-117:

    <Text
        ref={isInsideDialog ? titleRef : undefined}
        ...
        tabIndex={isInsideDialog ? -1 : undefined}
    >

    src/components/TextPicker/TextSelectorModal.tsx:99-118:

    useFocusEffect(
        useCallback(() => {
            focusTimeoutRef.current = setTimeout(() => {
                if (inputRef.current && isVisible) {
                    inputRef.current.focus(); // This happens at T+300ms
                    ...
                }
            }, CONST.ANIMATED_TRANSITION); // 300ms
        }, [isVisible, autoGrowHeight]),
    );

    The issue description confirms this: "If user enters text on Name field before error shows up, Name header is highlighted instead" - the header text is receiving focus as designed by PR #82510.

  6. OSBotify commented on Mar 11, 2026

    @OSBotify
    Contributor

    Labels: Removed DeployBlocker label. This is a frontend bug that requires reverting or fixing PR #82510 in the App repository. Keeping DeployBlockerCash to block the App deploy until resolved.

  7. 10 remaining items

  8. melvin-bot commented on Mar 12, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  9. melvin-bot commented on Mar 12, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  10. melvin-bot commented on Mar 12, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  11. melvin-bot commented on Mar 12, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  12. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Mar 12, 2026
  13. changed the title [-]Report field & Taxes - Name field auto throws error[/-] [+][Due for payment 2026-03-19] Report field & Taxes - Name field auto throws error[/+] on Mar 12, 2026
  14. melvin-bot commented on Mar 12, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  15. melvin-bot commented on Mar 12, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.36-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-03-19. 🎊

  16. melvin-bot commented on Mar 12, 2026

    @melvin-bot

    @amyevans The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  17. melvin-bot commented on Mar 12, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions