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-05-14] [$250] Expense - Context menu does not open when long pressing on expense preview in self DM #60808
Version Number: 9.1.32-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only If this was caught during regression testing, add the test name, ID and link from TestRail: Exp Email or phone of affected tester (no customers):applausetester+240413kh@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Samsung Galaxy Z Fold 4 / Android 14 App Component: Money Requests
Action Performed:
Precondition:
Log in with Expensifail account.
Launch Expensify app.
Go to self DM.
Submit a manual expense in self DM.
Long press on the expense preview.
Long press outside the expense preview on the same message row.
Expected Result:
When long pressing on the expense preview (Step 4), context menu will open.
Actual Result:
When long pressing on the expense preview (Step 4), context menu does not open.
When long pressing outside the expense preview on the same message row (Step 5), context menu opens.
🚨 Edited by proposal-police: This proposal was edited at 2025-04-30 14:18:20 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Context menu doesn't show when long press self DM track expense.
What is the root cause of that problem?
It's a common problem on native where a nested pressable onLongPress is not propagated properly. That's why we attach the long-press callback to the preview.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
When creating the test for this, I found that it behaves differently when running on the test environment. The issue we have here is basically if we have nested pressable, then only the inner pressable will receive the press/long-press event (which was observed first in this #12987).
But when I recreate this on the test environment as simple as this:
)
fireEvent(await screen.findByTestId('test'), 'longPress');
the outer pressable long press is triggered just fine. So, the unit test can't cover this case.
changed the title [-]Expense - Context menu does not open when long pressing on expense preview in self DM[/-][+][$250] Expense - Context menu does not open when long pressing on expense preview in self DM[/+]on Apr 29, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.40-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@hoangzinh@miljakljajic@hoangzinh 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]
[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.
Activity
melvin-bot commentedon Apr 24, 2025
Triggered auto assignment to @stephanieelliott (
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.bernhardoj commentedon Apr 24, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-30 14:18:20 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Context menu doesn't show when long press self DM track expense.
What is the root cause of that problem?
It's a common problem on native where a nested pressable onLongPress is not propagated properly. That's why we attach the long-press callback to the preview.
App/src/components/ReportActionItem/TransactionPreview/index.tsx
Line 110 in d629de0
However,
shouldDisplayContextMenuis undefined, so the context menu never shows.App/src/components/ReportActionItem/TransactionPreview/index.tsx
Lines 82 to 87 in d629de0
What changes do you think we should make in order to solve the problem?
Pass the
shouldDisplayContextMenuprops.App/src/pages/home/report/PureReportActionItem.tsx
Lines 810 to 832 in d629de0
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
When creating the test for this, I found that it behaves differently when running on the test environment. The issue we have here is basically if we have nested pressable, then only the inner pressable will receive the press/long-press event (which was observed first in this #12987).
But when I recreate this on the test environment as simple as this:
render(
<Pressable onLongPress={() => console.log('outer')}>
)
fireEvent(await screen.findByTestId('test'), 'longPress');
the outer pressable long press is triggered just fine. So, the unit test can't cover this case.
melvin-bot commentedon Apr 28, 2025
@stephanieelliott Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Apr 29, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021917072697446104109
[-]Expense - Context menu does not open when long pressing on expense preview in self DM[/-][+][$250] Expense - Context menu does not open when long pressing on expense preview in self DM[/+]melvin-bot commentedon Apr 29, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)hoangzinh commentedon Apr 30, 2025
@bernhardoj, your proposal looks good. Btw, can you update the automation test section please? Please avoid "N/A"
26 remaining items
melvin-bot commentedon May 7, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 7, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.40-7 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-05-14. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 7, 2025
@hoangzinh @miljakljajic @hoangzinh 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 May 14, 2025
Payment Summary
Upwork Job
BugZero Checklist (@miljakljajic)
hoangzinh commentedon May 14, 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: https://github.com/Expensify/App/pull/59811/files#r2089757312
[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
Precondition:
Test:
Do we agree 👍 or 👎
hoangzinh commentedon May 14, 2025
Requested payment in ND
bernhardoj commentedon May 15, 2025
Requested in ND.
garrettmknight commentedon May 19, 2025
$250 approved for @hoangzinh
JmillsExpensify commentedon May 29, 2025
$250 approved for @bernhardoj