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 2025-08-01] [$250] Reports - Searching a non existing user on "From", opens a report behind opened modal #65619
Prerequisite: Account has at least one workspace.
Prerequisite 2: Workspace has at least one expense created.
Open the staging.new.expensify.com website.
Navigate to "Reports"
Tap on "From"
Input a user name that will not trigger any result.
Tap on enter on keyboard, to trigger the search.
Note that after triggering the search, an expense report opens on the background while "From" modal is still opened.
Expected Result:
Only a "No results found" message should be seen when searching for a non existing user in the "From" filter on "Reports"
Actual Result:
When searching for an user that doesn’t trigger any result on "From" filter on "Reports", an expense report is opened on the background while the "From" modal is still opened.
Please re-state the problem that we are trying to solve in this issue.
Reports - Searching a non existing user on "From", opens a report behind opened modal
What is the root cause of that problem?
When we search for some non existing user in the UserSelectPopup, the focusedIndex becomes -1 here and makes the shouldBubble to get value true, which makes our enter key press event to bubble to the parent and trigger the enter key there as well which open the report in the background.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/a
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
When searching for an user that doesn’t trigger any result on "From" filter on "Reports", an expense report is opened on the background while the "From" modal is still opened.
Note: We can also check if the modal is a popover or has type bottom_docked
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-]Reports - Searching a non existing user on "From", opens a report behind opened modal[/-][+][$250] Reports - Searching a non existing user on "From", opens a report behind opened modal[/+]on Jul 8, 2025
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: NA. This is just a minor edge case.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Have an expense
Test:
Go to Reports
Open From filter
Input something that would return no results
Press Enter key
Verify that expense report is NOT opened in the background
Activity
melvin-bot commentedon Jul 8, 2025
Triggered auto assignment to @CortneyOfstad (
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.Burhan-Rashid commentedon Jul 8, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Reports - Searching a non existing user on "From", opens a report behind opened modal
What is the root cause of that problem?
When we search for some non existing user in the
UserSelectPopup, the focusedIndex becomes -1 here and makes theshouldBubbleto get valuetrue, which makes our enter key press event to bubble to the parent and trigger the enter key there as well which open the report in the background.App/src/components/SelectionList/BaseSelectionList.tsx
Line 851 in 30d781e
App/src/components/SelectionList/BaseSelectionList.tsx
Line 870 in 30d781e
What changes do you think we should make in order to solve the problem?
We need to add a new prop to the BaseSelectionList component here
with default value as true.
We need to make changes here
and here
and pass the props shouldBubble={false} and shouldPreventDefault={false} here
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/a
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
daledah commentedon Jul 8, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When searching for an user that doesn’t trigger any result on "From" filter on "Reports", an expense report is opened on the background while the "From" modal is still opened.
What is the root cause of that problem?
We subscribed
enterkey behavior inSearchListApp/src/components/Search/SearchList.tsx
Lines 253 to 259 in 30d781e
But when the
UserSelectPopuppopover is displayed,isFocusedis stilltrue=> we can still trigger the enter behaviour.
What changes do you think we should make in order to solve the problem?
We can add condition
focusedIndex >= 0similar to hereApp/src/components/SelectionList/BaseSelectionList.tsx
Line 854 in 30d781e
Or if the modal or popover is showing then we will set
isActivetofalseby using onyxkeymodalNote: We can also check if the modal is a popover or has type
bottom_dockedWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
[-]Reports - Searching a non existing user on "From", opens a report behind opened modal[/-][+][$250] Reports - Searching a non existing user on "From", opens a report behind opened modal[/+]melvin-bot commentedon Jul 8, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021942680116458279588
melvin-bot commentedon Jul 8, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dominictb (
External)CortneyOfstad commentedon Jul 8, 2025
Hey @dominictb! We have a couple of proposals (here and here) for you to review. Thanks!
dangrous commentedon Jul 8, 2025
Happy to help with internal review here when it's ready!
20 remaining items
melvin-bot commentedon Jul 29, 2025
Triggered auto assignment to @johncschuster (
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.CortneyOfstad commentedon Jul 29, 2025
@dominictb can you please complete the checklist as soon as you can!
Hey @johncschuster! Reassigned this as I will be OoO on Friday so there is not a delay in getting this paid. Payment summary found here. Thanks!
dominictb commentedon Jul 31, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: NA. This is just a minor edge case.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
johncschuster commentedon Jul 31, 2025
Payment Summary
Contributor: @daledah paid $250 via Upwork ✅
Contributor+: @dominictb paid $250 via Upwork ✅