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-06-18] [$250] Account-Tapping Preferences & quickly long press "Help" shows copy clipboard in Preferences #63231
Version Number: v9.1.54-6 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: N/a Email or phone of affected tester (no customers):applausetester@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Redminote 10s android 13 App Component: User Settings
🚨 Edited by proposal-police: This proposal was edited at 2025-06-02 06:55:05 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user taps on Preferences and quickly long-presses the Help button during the page transition, the "copy to clipboard" context menu incorrectly appears on the Preferences page instead of being blocked. This creates a confusing user experience where an unintended context menu from a different page shows up after navigation completes.
What is the root cause of that problem?
The root cause is an overly broad route check in the openPopover function that allows the context menu to appear on any settings page, not just the root settings page. The current code uses Navigation.getActiveRoute().includes(ROUTES.SETTINGS)
which matches both the initial settings page and nested pages like Preferences. When the user performs the quick tap-and-long-press gesture, the long press event from the Help button gets triggered while the route is transitioning from the initial settings page to the Preferences page. Since both routes contain "settings", the check passes and the context menu appears on the wrong page.
What changes do you think we should make in order to solve the problem?
We should replace the broad route check with an exact route match using the existing Navigation.isActiveRoute() method. Instead of Navigation.getActiveRoute().includes(ROUTES.SETTINGS) which matches any route containing "settings", we should use Navigation.isActiveRoute(ROUTES.SETTINGS) which performs an exact match only for the root settings page. The isActiveRoute method already handles route normalization and cleanup, ensuring the context menu only appears when the user is actually on the initial settings page, not on nested settings pages like Preferences.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Testing the specific gesture sequence of tapping Preferences and immediately long-pressing Help to ensure no context menu appears on the Preferences page.
What alternative solutions did you explore? (Optional)
We considered using component mounted state tracking but chose the route-based approach since it directly addresses the routing logic issue without adding unnecessary complexity.
Please re-state the problem that we are trying to solve in this issue.
Account-Tapping Preferences & quickly long press "Help" shows copy clipboard in Preferences
What is the root cause of that problem?
When navigating, there's a slight delay due to the animation transition. During this delay, the longPress event can still be triggered. In this case, the longPress event triggers openPopover to show the "Copy to clipboard" context menu, even though the page is navigating away.
We already have a condition to prevent this, but it’s wrong for this case since activeRoute is '/settings/preferences'
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
This might not be strictly necessary, but if we want to add a test, we could:
Render InitialSettingsPage.
Mock Navigation.getActiveRoute() to return a different route.
Trigger onSecondaryInteraction.
Assert that showContextMenu is not called.
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 [-]Account-Tapping Preferences & quickly long press "Help" shows copy clipboard in Preferences[/-][+][$250] Account-Tapping Preferences & quickly long press "Help" shows copy clipboard in Preferences[/+]on Jun 3, 2025
changed the title [-][$250] Account-Tapping Preferences & quickly long press "Help" shows copy clipboard in Preferences[/-][+][Due for payment 2025-06-18] [$250] Account-Tapping Preferences & quickly long press "Help" shows copy clipboard in Preferences[/+]on Jun 11, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.64-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@Ollyws@lydiabarclay@Ollyws 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:
[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.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
1. Navigate to Settings - Open the main Settings page and verify Help button context menu works correctly on this page
2. Quick Navigation Test - Tap "Preferences" and immediately long-press the Help button during page transition
3. Verify No Context Menu - Confirm that no "copy to clipboard" context menu appears on the Preferences page
Activity
melvin-bot commentedon Jun 2, 2025
Triggered auto assignment to @lydiabarclay (
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.MobileMage commentedon Jun 2, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-06-02 06:55:05 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user taps on Preferences and quickly long-presses the Help button during the page transition, the "copy to clipboard" context menu incorrectly appears on the Preferences page instead of being blocked. This creates a confusing user experience where an unintended context menu from a different page shows up after navigation completes.
What is the root cause of that problem?
The root cause is an overly broad route check in the
openPopoverfunction that allows the context menu to appear on any settings page, not just the root settings page. The current code usesNavigation.getActiveRoute().includes(ROUTES.SETTINGS)App/src/pages/settings/InitialSettingsPage.tsx
Lines 291 to 295 in e6e28de
which matches both the initial settings page and nested pages like Preferences. When the user performs the quick tap-and-long-press gesture, the long press event from the Help button gets triggered while the route is transitioning from the initial settings page to the Preferences page. Since both routes contain "settings", the check passes and the context menu appears on the wrong page.
What changes do you think we should make in order to solve the problem?
We should replace the broad route check with an exact route match using the existing
Navigation.isActiveRoute()method. Instead ofNavigation.getActiveRoute().includes(ROUTES.SETTINGS)which matches any route containing "settings", we should useNavigation.isActiveRoute(ROUTES.SETTINGS)which performs an exact match only for the root settings page. TheisActiveRoutemethod already handles route normalization and cleanup, ensuring the context menu only appears when the user is actually on the initial settings page, not on nested settings pages like Preferences.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Testing the specific gesture sequence of tapping Preferences and immediately long-pressing Help to ensure no context menu appears on the Preferences page.
What alternative solutions did you explore? (Optional)
We considered using component mounted state tracking but chose the route-based approach since it directly addresses the routing logic issue without adding unnecessary complexity.
linhvovan29546 commentedon Jun 2, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Account-Tapping Preferences & quickly long press "Help" shows copy clipboard in Preferences
What is the root cause of that problem?
When navigating, there's a slight delay due to the animation transition. During this delay, the longPress event can still be triggered. In this case, the
longPressevent triggersopenPopoverto show the "Copy to clipboard" context menu, even though the page is navigating away.We already have a condition to prevent this, but it’s wrong for this case since activeRoute is '/settings/preferences'
App/src/pages/settings/InitialSettingsPage.tsx
Lines 291 to 294 in e6e28de
What changes do you think we should make in order to solve the problem?
Update the conditional check to ensure the context menu doesn't show
App/src/pages/settings/InitialSettingsPage.tsx
Lines 291 to 294 in e6e28de
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
This might not be strictly necessary, but if we want to add a test, we could:
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.
melvin-bot commentedon Jun 3, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021929948650884448017
[-]Account-Tapping Preferences & quickly long press "Help" shows copy clipboard in Preferences[/-][+][$250] Account-Tapping Preferences & quickly long press "Help" shows copy clipboard in Preferences[/+]melvin-bot commentedon Jun 3, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (
External)Ollyws commentedon Jun 5, 2025
@JoshIri360's proposal LGTM.
🎀👀🎀 C+ reviewed
19 remaining items
[-][$250] Account-Tapping Preferences & quickly long press "Help" shows copy clipboard in Preferences[/-][+][Due for payment 2025-06-18] [$250] Account-Tapping Preferences & quickly long press "Help" shows copy clipboard in Preferences[/+]melvin-bot commentedon Jun 11, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 11, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.64-5 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-06-18. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 11, 2025
@Ollyws @lydiabarclay @Ollyws 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 Jun 18, 2025
Payment Summary
Upwork Job
BugZero Checklist (@lydiabarclay)
MobileMage commentedon Jun 18, 2025
Hi @lydiabarclay my Upwork link is https://www.upwork.com/freelancers/~018bc4a19179469daa
Ollyws commentedon Jun 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: https://github.com/Expensify/App/pull/61227/files#r2154321841
[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:
[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: https://github.com/Expensify/Expensify/issues/514913
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
lydiabarclay commentedon Jun 18, 2025
Payment Summary
Contributor: @MobileMage paid $250 via Upwork
Contributor+: @Ollyws due $250 via NewDot
✅ Regression test filed
Ollyws commentedon Jun 18, 2025
Requested on ND.
garrettmknight commentedon Jun 19, 2025
$250 approved for @Ollyws