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-15] [$250] Try it out-"Scan our test receipt" tooltip appears in the wrong place when entering recipient #65702
Version Number: 9.1.78 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#64988 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: MacBook Air 15.5 Chrome App Component: Other
Action Performed:
Navigate to the staging.new.expensify.com, sign in with a brand new gmail account
Click green "+" button - "Create expense"
Verify that the "Scan our test receipt to see how it works" tooltip is displayed
Click "Choose file" and upload a receipt
Start typing an email address in the "Choose recipient" field
Expected Result:
"Scan our test receipt to see how it works" tooltip does not appear in the wrong place
Actual Result:
"Scan our test receipt to see how it works" tooltip appears in the wrong place when typing a recipient email
Please re-state the problem that we are trying to solve in this issue.
Try it out-"Scan our test receipt" tooltip appears in the wrong place when entering recipient
What is the root cause of that problem?
The IOURequestStartPage remains behind the choose receipt page. Since the tooltip display logic is in IOURequestStartPage, the tooltip continues to display even when the user is on the choose receipt page.
Since the SCAN_TEST_TOOLTIP has a lower priority than SCAN_TEST_TOOLTIP_MANAGER, when SCAN_TEST_TOOLTIP_MANAGER is not displayed when search, SCAN_TEST_TOOLTIP will reappear.
This happened after PR #61824, where we mistake removed the logic focused.
What changes do you think we should make in order to solve the problem?
We should only display the tooltip when the screen is focused.
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.
But when we open the participant page, the SCAN_TEST_TOOLTIP_MANAGER tooltip is shown, and because this tooltip has higher priority, shouldRender of SCAN_TEST_TOOLTIP is changed to false.
When the user enters a user, the MC test participant is removed, and SCAN_TEST_TOOLTIP_MANAGER is hidden. It leads shouldRender of SCAN_TEST_TOOLTIP being changed to true, and the tooltip is shown based on this useEffect.
// When tooltip is used inside an animated view (e.g. popover), we need to wait for the animation to finish before measuring content.
consttimerID=setTimeout(()=>{
show.current?.();
},500);
return()=>{
clearTimeout(timerID);
What changes do you think we should make in order to solve the problem?
Instead of fixing it case by case, we can prevent this bug from occurring on other pages by fixing it on BaseEducationalTooltip. We can create a state to determine the focus state
Then for all places that we use shouldHideOnNavigate={false} we will pass shouldShowOnBlur as true to useProductTrainingContext
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 [-]Try it out-"Scan our test receipt" tooltip appears in the wrong place when entering recipient[/-][+][$250] Try it out-"Scan our test receipt" tooltip appears in the wrong place when entering recipient[/+]on Jul 9, 2025
@hoangzinh any thoughts on my proposal?
I don’t think using isFocused inside BaseEducationalTooltip is correct, because we have a priority logic in tooltip. With that approach, if the current screen’s tooltip has a lower priority than the previous screen’s, the tooltip will not be displayed.
And if we use that logic inside useProductTrainingContext, I have concerns about potential performance and regression issues, since useProductTrainingContext is also used within many place.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.90-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@hoangzinh@lschurr 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]
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: No offending PR. It's a case we haven't covered yet.
[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: N/A
[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
Test:
Sign in with a new account
Complete the onboarding flow
Go FAB > Create Expense > Scan
Verify that the "Scan our test receipt to see how it works" tooltip is displayed
Click "Choose file" and upload a receipt
Start typing an email address in the "Choose recipient" field
Verify that the "Scan our test receipt to see how it works" tooltip isn't displayed
Activity
melvin-bot commentedon Jul 9, 2025
Triggered auto assignment to @lschurr (
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.linhvovan29546 commentedon Jul 9, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Try it out-"Scan our test receipt" tooltip appears in the wrong place when entering recipient
What is the root cause of that problem?
The
IOURequestStartPageremains behind the choose receipt page. Since the tooltip display logic is inIOURequestStartPage, the tooltip continues to display even when the user is on the choose receipt page.App/src/pages/iou/request/IOURequestStartPage.tsx
Lines 155 to 157 in 15c2eb6
Since the
SCAN_TEST_TOOLTIPhas a lower priority thanSCAN_TEST_TOOLTIP_MANAGER, whenSCAN_TEST_TOOLTIP_MANAGERis not displayed when search,SCAN_TEST_TOOLTIPwill reappear.This happened after PR #61824, where we mistake removed the logic focused.
What changes do you think we should make in order to solve the problem?
We should only display the tooltip when the screen is focused.
App/src/pages/iou/request/IOURequestStartPage.tsx
Lines 155 to 157 in 15c2eb6
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.
nkdengineer commentedon Jul 9, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Scan our test receipt to see how it works" tooltip appears in the wrong place when typing a recipient email
What is the root cause of that problem?
We have the logic to hide the tooltip when the page is blurred here.
App/src/components/Tooltip/EducationalTooltip/BaseEducationalTooltip.tsx
Lines 143 to 147 in 58229fe
But when we open the participant page, the
SCAN_TEST_TOOLTIP_MANAGERtooltip is shown, and because this tooltip has higher priority,shouldRenderofSCAN_TEST_TOOLTIPis changed tofalse.App/src/pages/iou/request/IOURequestStartPage.tsx
Lines 155 to 157 in 15c2eb6
When the user enters a user, the MC test participant is removed, and
SCAN_TEST_TOOLTIP_MANAGERis hidden. It leadsshouldRenderofSCAN_TEST_TOOLTIPbeing changed totrue, and the tooltip is shown based on thisuseEffect.App/src/components/Tooltip/EducationalTooltip/BaseEducationalTooltip.tsx
Lines 122 to 135 in 58229fe
What changes do you think we should make in order to solve the problem?
Instead of fixing it case by case, we can prevent this bug from occurring on other pages by fixing it on
BaseEducationalTooltip. We can create a state to determine the focus stateApp/src/components/Tooltip/EducationalTooltip/BaseEducationalTooltip.tsx
Lines 143 to 147 in 58229fe
Then we will prevent showing the tooltip if
isFocusedisfalseApp/src/components/Tooltip/EducationalTooltip/BaseEducationalTooltip.tsx
Line 122 in 58229fe
App/src/components/Tooltip/EducationalTooltip/BaseEducationalTooltip.tsx
Line 34 in 58229fe
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)
Define a new config
shouldShowOnBlurwith the default value isfalseApp/src/components/ProductTrainingContext/index.tsx
Line 227 in 58229fe
And update the
shouldShowProductTrainingTooltipcondition hereApp/src/components/ProductTrainingContext/index.tsx
Line 258 in 58229fe
Then for all places that we use
shouldHideOnNavigate={false}we will passshouldShowOnBlurastruetouseProductTrainingContextReminder: 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.
[-]Try it out-"Scan our test receipt" tooltip appears in the wrong place when entering recipient[/-][+][$250] Try it out-"Scan our test receipt" tooltip appears in the wrong place when entering recipient[/+]melvin-bot commentedon Jul 9, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021942969193363705065
melvin-bot commentedon Jul 9, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)hoangzinh commentedon Jul 14, 2025
Thank you, everyone, for posting proposals. I will review them soon.
hoangzinh commentedon Jul 15, 2025
Hi @nkdengineer, I tried to test proposal and it seems it doesn't work as expected.
Screen.Recording.2025-07-15.at.20.39.59.mov
linhvovan29546 commentedon Jul 15, 2025
@hoangzinh any thoughts on my proposal?
I don’t think using
isFocusedinsideBaseEducationalTooltipis correct, because we have aprioritylogic in tooltip. With that approach, if the current screen’s tooltip has a lower priority than the previous screen’s, the tooltip will not be displayed.And if we use that logic inside
useProductTrainingContext, I have concerns about potential performance and regression issues, sinceuseProductTrainingContextis also used within many place.correct me if I'm wrong
44 remaining items
melvin-bot commentedon Aug 8, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.90-11 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 2025-08-15. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Aug 8, 2025
@hoangzinh @lschurr 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]
lschurr commentedon Aug 18, 2025
@hoangzinh Could you complete the checklist here?
lschurr commentedon Aug 18, 2025
Payment Summary
Contributor: @nkdengineer paid $250 via Upwork
Contributor+: @hoangzinh due $250 via NewDot
hoangzinh commentedon Aug 18, 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: No offending PR. It's a case we haven't covered yet.
[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: N/A
[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
Test:
Do we agree 👍 or 👎
hoangzinh commentedon Aug 18, 2025
Thanks @lschurr. I requested in ND
twisterdotcom commentedon Aug 19, 2025
@hoangzinh has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-139a-a64a-8425-77d89027c751