You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-06-02] Expense - Amount field is not focused after selecting participant when account has no workspace #90666
Version Number: 9.3.74-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:#87920 Email or phone of affected tester (no customers):sdsdjoijdoisnjodis@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Run Onyx.merge('betas', ['newManualExpenseFlow']); in console.
Account has no workspace.
Go to staging.new.expensify.com
Open FAB > Create expense > Manual.
Select a participant.
Expected Result:
After selecting participant, Amount field will be focused.
Actual Result:
After selecting participant, Amount field is not focused.
👋 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:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #87920 - "Feat: Manual expense flow UI refactor - r3" by @ChavdaSachin (High confidence) Related Issues: #82586 (the issue this PR fixed)
Recommendation: REVERT
The PR introduced the new manual expense flow UI refactor (newManualExpenseFlow beta) and directly owns the focus logic for the Amount field. Reverting it is the cleanest path to unblock staging.
Assigned: @ChavdaSachin (PR author), @ShridharGoel and @puneetlath (approving reviewers) Labels: DeployBlockerCash kept (frontend App PR is the cause). No label changes made.
Detailed Analysis
Evidence
The issue is staging-only ("new feature, doesn't exist in prod"), triggered under the newManualExpenseFlow beta.
melvin-bot already assigned this issue to PR Feat: Manual expense flow UI refactor - r3 #87920, which introduced the new manual expense flow UI including the ParticipantPicker inline flow and the AmountField auto-focus logic.
The bug reproduces on web (MacOS Chrome/Safari) only, consistent with the !canUseTouchScreen() guard that gates shouldAutoFocusAmountField in TransactionDetailsFields.tsx.
It also modifies src/pages/iou/request/step/IOURequestStepConfirmation.tsx to embed the new ParticipantPicker component inline (rather than navigating away to a separate screen).
The PR adds shouldAutoFocusAmountField = !canUseTouchScreen() in TransactionDetailsFields.tsx and passes it to AmountField as autoFocus.
Root Cause
The AmountField focus useEffect fires when didScreenTransitionEnd first becomes true on the initial RHP open. When the user selects a participant, the ParticipantPicker component is rendered inline in the same ScreenWrapper (not as a separate navigation screen). Closing the picker does not trigger a new screen transition, so didScreenTransitionEnd remains true and does not change. Because the useEffect dependency array includes didScreenTransitionEnd as a stable true value, the effect does not re-execute after the picker closes. As a result, amountInputRef.current?.focus() is never called after participant selection, leaving the Amount field unfocused.
In the prior flow (before this PR), selecting a participant navigated to a separate screen and returning to the confirmation page would trigger a fresh screen transition — causing didScreenTransitionEnd to cycle from false back to true and re-fire the focus effect.
In the new manual expense flow (PR #87920), IOURequestStepConfirmation is rendered inline in the Manual tab. For users with no workspace, the ParticipantPicker auto-opens as a right-docked modal on the same page. When a participant is selected, handleParticipantsAdded closes the picker but never focuses the amount field.
The AmountField has a focus useEffect that depends on didScreenTransitionEnd, which fires once at screen mount. Since the participant picker is a modal overlay (not a navigation event), closing it does not re-trigger the screen transition, so the focus effect never re-fires after participant selection.
What changes do you think we should make in order to solve the problem?
Add a mechanism to focus the AmountField after the participant picker closes. Specifically:
In IOURequestStepConfirmation, track when a participant was just added (e.g., a state flag or ref set in handleParticipantsAdded).
Pass this signal down through MoneyRequestConfirmationList → TransactionDetailsFields → AmountField.
In the AmountField's focus useEffect, add this signal as a dependency so focus is triggered when the picker closes and the amount hasn't been set yet.
The existing !canUseTouchScreen() guard at TransactionDetailsFields.tsx:161 should be respected — focus should only be applied on non-touch devices (web desktop) to avoid unwanted keyboard pop-ups on mobile.
What alternative solutions did you explore? (Optional)
An alternative would be to use InteractionManager.runAfterInteractions inside handleParticipantsAdded with a direct ref to the amount input. However, threading a ref from AmountField all the way up to IOURequestStepConfirmation adds coupling. Using a boolean prop/signal is cleaner and keeps the focus logic co-located in AmountField.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
melvin-bot commentedon May 14, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #87920
melvin-bot commentedon May 14, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 14, 2026
👋 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:
OSBotify commentedon May 14, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #87920 - "Feat: Manual expense flow UI refactor - r3" by @ChavdaSachin (High confidence)
Related Issues: #82586 (the issue this PR fixed)
Recommendation: REVERT
The PR introduced the new manual expense flow UI refactor (
newManualExpenseFlowbeta) and directly owns the focus logic for the Amount field. Reverting it is the cleanest path to unblock staging.Assigned: @ChavdaSachin (PR author), @ShridharGoel and @puneetlath (approving reviewers)
Labels:
DeployBlockerCashkept (frontend App PR is the cause). No label changes made.Detailed Analysis
Evidence
newManualExpenseFlowbeta.ParticipantPickerinline flow and theAmountFieldauto-focus logic.!canUseTouchScreen()guard that gatesshouldAutoFocusAmountFieldinTransactionDetailsFields.tsx.Verification
src/components/MoneyRequestConfirmationList/sections/AmountField.tsx, which is exactly the file containing the focus logic.src/pages/iou/request/step/IOURequestStepConfirmation.tsxto embed the newParticipantPickercomponent inline (rather than navigating away to a separate screen).shouldAutoFocusAmountField = !canUseTouchScreen()inTransactionDetailsFields.tsxand passes it toAmountFieldasautoFocus.Root Cause
The
AmountFieldfocususeEffectfires whendidScreenTransitionEndfirst becomestrueon the initial RHP open. When the user selects a participant, theParticipantPickercomponent is rendered inline in the sameScreenWrapper(not as a separate navigation screen). Closing the picker does not trigger a new screen transition, sodidScreenTransitionEndremainstrueand does not change. Because theuseEffectdependency array includesdidScreenTransitionEndas a stabletruevalue, the effect does not re-execute after the picker closes. As a result,amountInputRef.current?.focus()is never called after participant selection, leaving the Amount field unfocused.In the prior flow (before this PR), selecting a participant navigated to a separate screen and returning to the confirmation page would trigger a fresh screen transition — causing
didScreenTransitionEndto cycle fromfalseback totrueand re-fire the focus effect.MelvinBot commentedon May 14, 2026
Proposal
What is the root cause of that problem?
In the new manual expense flow (PR #87920),
IOURequestStepConfirmationis rendered inline in the Manual tab. For users with no workspace, theParticipantPickerauto-opens as a right-docked modal on the same page. When a participant is selected,handleParticipantsAddedcloses the picker but never focuses the amount field.The AmountField has a focus
useEffectthat depends ondidScreenTransitionEnd, which fires once at screen mount. Since the participant picker is a modal overlay (not a navigation event), closing it does not re-trigger the screen transition, so the focus effect never re-fires after participant selection.What changes do you think we should make in order to solve the problem?
Add a mechanism to focus the AmountField after the participant picker closes. Specifically:
IOURequestStepConfirmation, track when a participant was just added (e.g., a state flag or ref set inhandleParticipantsAdded).MoneyRequestConfirmationList→TransactionDetailsFields→AmountField.useEffect, add this signal as a dependency so focus is triggered when the picker closes and the amount hasn't been set yet.The existing
!canUseTouchScreen()guard atTransactionDetailsFields.tsx:161should be respected — focus should only be applied on non-touch devices (web desktop) to avoid unwanted keyboard pop-ups on mobile.What alternative solutions did you explore? (Optional)
An alternative would be to use
InteractionManager.runAfterInteractionsinsidehandleParticipantsAddedwith a direct ref to the amount input. However, threading a ref fromAmountFieldall the way up toIOURequestStepConfirmationadds coupling. Using a boolean prop/signal is cleaner and keeps the focus logic co-located inAmountField.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.ChavdaSachin commentedon May 14, 2026
NAB: only happens on beta accounts
puneetlath commentedon May 14, 2026
Demoting.
23 remaining items
melvin-bot commentedon Jun 1, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jun 1, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
ChavdaSachin commentedon Jun 3, 2026
This was a regression from my own PR - #91004
I am not due payment here.
My payment would be handled at #82586 at the end
mallenexpensify commentedon Jun 4, 2026
Payment summary deleted
dukenv0307 commentedon Jun 7, 2026
@mallenexpensify can you please reopen the issue to handle my payment? Thanks
mallenexpensify commentedon Jun 8, 2026
Payment Summary
Contributor+: @dukenv0307 due $250 via NewDot
quinthar commentedon Jun 13, 2026
Approved $250 to @dukenv0307