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-03-30] Chat Report View - Enlarge and plus buttons on receipt image persist without hover #84388
Version Number: v9.3.32-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:#83994 Email or phone of affected tester (no customers):dfghnhgfd@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Windows 11 / Chrome App Component: Chat Report View
Action Performed:
Preconditions:
Logged in to any account
Has expense with an attached receipt image
Steps:
Navigate to the workspace chat that has expense with an attached receipt image
Open the expense details
Observe the receipt image
Expected Result:
Enlarge and plus button should only appear if user hover on the receipt image and it should disappear if user move the mouse away from the receipt image
Actual Result:
Enlarge and plus buttons on receipt image persist without hover
👋 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: #83994 - "feat: allow multiple receipts to be attached to a single expense" by @TaduJR (High confidence) Related Issues: #81435
Recommendation: REVERT
PR #83994 introduced hover-based buttons (enlarge and add receipt) on receipt images. However, the hover logic fails on Windows devices with touchscreens because the canUseTouchScreen() detection treats these hybrid devices as pure touch devices, disabling hover functionality even when users interact with a mouse.
Labels: DeployBlockerCash label should be kept (this blocks the App deploy). DeployBlocker label should be removed (this is not a backend bug).
Please re-state the problem that we are trying to solve in this issue.
After PR #83994 merged, the enlarge and plus buttons overlaid on receipt images in the expense detail view are always visible on web (Chrome on Windows), instead of only appearing when the user hovers over the receipt image.
What is the root cause of that problem?
The button visibility in MoneyRequestReceiptView relies on canUseTouchScreen() to distinguish mobile (always-show) from desktop (show-on-hover). The relevant line is:
canUseTouchScreen() (at src/libs/DeviceCapabilities/canUseTouchScreen/index.ts) checks navigator.maxTouchPoints > 0. On Windows laptops with touchscreen capability (or certain Chrome configurations), maxTouchPoints is greater than 0 even when the user is using a mouse. This causes isTouchScreen to be true on desktop web, which means !isTouchScreen is false, so styles.opacity0 is never applied — the buttons remain permanently visible.
Additionally, the useHover hook (src/hooks/useHover.ts) gates its onMouseEnter handler behind !canUseTouchScreen, so even if the visibility condition were different, hovered would never become true on these affected machines because mouse events are silently ignored.
What changes do you think we should make in order to solve the problem?
Replace the canUseTouchScreen() check with a more reliable method to determine whether hover should be supported. Two options:
Option A (Recommended): Use the Hoverable component (the established pattern in the codebase, used by BaseVideoPlayer, TaskView, etc.) instead of the useHover hook. Hoverable delegates to ActiveHoverable on web which manages mouse enter/leave robustly, and on native (index.native.tsx) it always passes hovered=false. Use conditional rendering (like BaseVideoPlayer does) instead of opacity toggling:
Hoverable wrapping the receipt area →
isHovered provided via render-prop →
conditionally render buttons when (isHovered || isMobile)
This eliminates both the canUseTouchScreen() dependency and the need for pointerEventsBoxNone on the buttons container.
Option B: Replace canUseTouchScreen() with a platform/layout check. For example, use shouldUseNarrowLayout from useResponsiveLayout() (already imported in the component) to determine mobile vs desktop context, since it uses screen dimensions rather than touch capability detection.
In both options, the change is localized to src/components/ReportActionItem/MoneyRequestReceiptView.tsx.
What alternative solutions did you explore? (Optional)
Using CSS @media (hover: hover) media query to detect hover capability — this is the web-standards approach but would require platform-specific style handling that doesn't align with the existing React Native pattern.
Removing the canUseTouchScreen guard from the useHover hook itself — this would fix the immediate issue but could break other consumers of the hook that rely on the current behavior.
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.
changed the title [-]Chat Report View - Enlarge and plus buttons on receipt image persist without hover[/-][+][Due for payment 2026-03-30] Chat Report View - Enlarge and plus buttons on receipt image persist without hover[/+]on Mar 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.41-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
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]
If the regression penalty applies, comment on the issue linked to the PR that introduced the regression. Thx
Looks like this is part of a project though.
Activity
melvin-bot commentedon Mar 6, 2026
Triggered auto assignment to @RachCHopkins (
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.github-actions commentedon Mar 6, 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 Mar 6, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #83994 - "feat: allow multiple receipts to be attached to a single expense" by @TaduJR (High confidence)
Related Issues: #81435
Recommendation: REVERT
PR #83994 introduced hover-based buttons (enlarge and add receipt) on receipt images. However, the hover logic fails on Windows devices with touchscreens because the
canUseTouchScreen()detection treats these hybrid devices as pure touch devices, disabling hover functionality even when users interact with a mouse.Labels: DeployBlockerCash label should be kept (this blocks the App deploy). DeployBlocker label should be removed (this is not a backend bug).
Detailed Analysis
Evidence
Verification
PR #83994 modified:
src/components/ReportActionItem/MoneyRequestReceiptView.tsx- Added the hover buttons and hover logicsrc/styles/index.ts- Added styling for the button containersrc/CONST/index.ts- Added button constantsThese are the exact files and components affected by the reported bug.
Root Cause
The hover implementation uses this logic in MoneyRequestReceiptView.tsx:
The problem:
canUseTouchScreen()checksnavigator.maxTouchPoints > 0on webtrueeven when the user is using a mouseisTouchScreenistrue, the condition!hovered && !isTouchScreenis alwaysfalsestyles.opacity0is never applied, and the buttons remain visible at all timesuseHoverhook also disables hover tracking whencanUseTouchScreen()returnstrue, sohoverednever becomestruefrom mouse interactionsThis is a fundamental issue with treating hybrid devices (laptops with touchscreens) as pure touch devices in the hover detection logic.
MelvinBot commentedon Mar 6, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
After PR #83994 merged, the enlarge and plus buttons overlaid on receipt images in the expense detail view are always visible on web (Chrome on Windows), instead of only appearing when the user hovers over the receipt image.
What is the root cause of that problem?
The button visibility in
MoneyRequestReceiptViewrelies oncanUseTouchScreen()to distinguish mobile (always-show) from desktop (show-on-hover). The relevant line is:canUseTouchScreen()(atsrc/libs/DeviceCapabilities/canUseTouchScreen/index.ts) checksnavigator.maxTouchPoints > 0. On Windows laptops with touchscreen capability (or certain Chrome configurations),maxTouchPointsis greater than 0 even when the user is using a mouse. This causesisTouchScreento betrueon desktop web, which means!isTouchScreenisfalse, sostyles.opacity0is never applied — the buttons remain permanently visible.Additionally, the
useHoverhook (src/hooks/useHover.ts) gates itsonMouseEnterhandler behind!canUseTouchScreen, so even if the visibility condition were different,hoveredwould never becometrueon these affected machines because mouse events are silently ignored.What changes do you think we should make in order to solve the problem?
Replace the
canUseTouchScreen()check with a more reliable method to determine whether hover should be supported. Two options:Option A (Recommended): Use the
Hoverablecomponent (the established pattern in the codebase, used byBaseVideoPlayer,TaskView, etc.) instead of theuseHoverhook.Hoverabledelegates toActiveHoverableon web which manages mouse enter/leave robustly, and on native (index.native.tsx) it always passeshovered=false. Use conditional rendering (likeBaseVideoPlayerdoes) instead of opacity toggling:This eliminates both the
canUseTouchScreen()dependency and the need forpointerEventsBoxNoneon the buttons container.Option B: Replace
canUseTouchScreen()with a platform/layout check. For example, useshouldUseNarrowLayoutfromuseResponsiveLayout()(already imported in the component) to determine mobile vs desktop context, since it uses screen dimensions rather than touch capability detection.In both options, the change is localized to
src/components/ReportActionItem/MoneyRequestReceiptView.tsx.What alternative solutions did you explore? (Optional)
@media (hover: hover)media query to detect hover capability — this is the web-standards approach but would require platform-specific style handling that doesn't align with the existing React Native pattern.canUseTouchScreenguard from theuseHoverhook itself — this would fix the immediate issue but could break other consumers of the hook that rely on the current behavior.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.puneetlath commentedon Mar 6, 2026
Given that this is only a problem on touch screen desktops, I'm going to demote. Let's fix as a follow-up @TaduJR
13 remaining items
[-]Chat Report View - Enlarge and plus buttons on receipt image persist without hover[/-][+][Due for payment 2026-03-30] Chat Report View - Enlarge and plus buttons on receipt image persist without hover[/+]melvin-bot commentedon Mar 23, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.41-4 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-30. 🎊
melvin-bot commentedon Mar 23, 2026
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]
melvin-bot commentedon Mar 23, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)ahmedGaber93 commentedon Mar 24, 2026
Follow-up PR — no payment required.
mallenexpensify commentedon Mar 30, 2026
If the regression penalty applies, comment on the issue linked to the PR that introduced the regression. Thx
Looks like this is part of a project though.