Skip to content

Open the report transaction long-press menu from the global modal stack - #105788

Merged
roryabraham merged 2 commits into
mainfrom
claude-migrateReportTransactionLongPressModal
Nov 4, 2026
Merged

roryabraham merged 2 commits into
mainfrom
claude-migrateReportTransactionLongPressModal

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Long-pressing an expense in a report on narrow layouts opened MoneyRequestReportTransactionLongPressModal, an inline modal driven by an imperative ref plus local visibility and transaction-ID state. This PR moves that menu onto the global modal stack, reusing useMobileSelectionMenuModal from #105112 (the Search migration).

  • MoneyRequestReportTransactionList: handleLongPress now calls showMobileSelectionMenuModal({sentryLabel}). On CONFIRM it runs turnOnMobileSelectionMode() and toggleRowTransaction(transactionID). The isSmallScreenWidth guard and the "already in selection mode → toggle directly" branch are unchanged.
  • Deleted MoneyRequestReportTransactionLongPressModal.tsx, and removed longPressModalRef and the inline modal mount (which also drops the now-single-child fragment).
  • Added CONST.SENTRY_LABEL.REPORT.SELECTION_MODE_MENU_ITEM: 'Report-SelectionModeMenuItem', because the old "Select" menu item had no Sentry label.
  • Added tests/ui/MoneyRequestReportTransactionListLongPressTest.tsx, which covers: the menu opens with the Report label and selects the pressed expense on "Select", dismissing leaves selection untouched, long press in selection mode toggles without a menu, and wide layouts don't open the menu.

AI tests run locally: npm run typecheck ✅, npm run lint on the changed TSX files ✅, npm run fmt (no diff beyond this change) ✅, npm run spell-changed ✅, react-compiler-compliance-check check on the changed component ✅, Jest for the new test plus MoneyRequestReportTransactionsNavigationTest and useRowLongPressMenuTest ✅ (21/21). npm run lint-changed timed out after 10 minutes in the CI sandbox, so the linter was run directly on the changed TSX files instead. A browser check by the automated web tester could not run because the dev web page rendered blank before any interaction, so this change has not been verified in a browser yet.

AI Tests

After merging main on 2026-11-04: typecheck, lint, lint-changed, spell-changed, React Compiler check for the report transaction list, Storybook smoke test, and 51 targeted Jest tests passed. The targeted suites cover report transaction long-press selection, transaction navigation, and the row long-press menu. The full Jest suite was not run. The current repository has no prettier script; a separate formatter check could not run under the runner's command permissions. No browser test was run for this constants-only conflict resolution.

Fixed Issues

$ #103511
PROPOSAL: #103511 (comment)

Tests

  1. On a narrow layout (mWeb or native), open an expense report with at least 2 expenses.
  2. Long-press an expense.
  3. Verify the "Select" menu appears.
  4. Tap "Select".
  5. Verify selection mode turns on and the long-pressed expense is selected.
  6. Long-press another expense.
  7. Verify it is selected right away, without the menu.
  8. Exit selection mode, long-press an expense, then tap outside the menu (or press Back on Android).
  9. Verify the menu closes and selection mode stays off.
  • Verify that no errors appear in the JS console

Offline tests

  1. Go offline.
  2. Repeat the steps in Tests.
  3. Verify the behavior is the same as online.

QA Steps

Same as Tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Co-authored-by: daledah <daledah@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team November 3, 2026 16:24
@melvin-bot melvin-bot Bot added Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web labels Nov 3, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I created this PR from an upstream branch since I don't have push access to your fork.

To take ownership of this branch and be able to push updates, run:

git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-migrateReportTransactionLongPressModal
git checkout -b claude-migrateReportTransactionLongPressModal upstream/claude-migrateReportTransactionLongPressModal
git push -u origin claude-migrateReportTransactionLongPressModal

Then you can close this PR and open a new one from your fork.

@MelvinBot

MelvinBot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ✅ pass

On standalone Android NewDot, the long-press Select menu on report expense rows works through the global modal stack: it opens Select, enters selection mode for the long-pressed row only, toggles checkboxes directly during selection mode, dismisses cleanly, and a plain tap still opens expense details. The PR's Tests section has no steps yet, so these checks come from the acceptance criteria in Migrate the report transaction long-press selection menu to the global modal stack.
Normal tap opens expense details page

Step Status
Long-pressing an expense row opens a bottom menu with a Select optionLong-pressing the "Test Merchant 1" row showed a modal with Dismiss and Select, over the dimmed report content.
Bottom menu with Select option after long-pressing an expense row
✅
Tapping Select closes the menu, turns on selection mode, and only the long-pressed expense is checkedThe menu closed and the header showed "1 selected". Test Merchant 1 was checked; Test Merchant 2 was not.
Selection mode on with only the long-pressed expense checked
✅
While in selection mode, long-pressing a different expense toggles its checkbox directly with no menuLong-pressing Test Merchant 2 checked it right away ("2 selected"). No Dismiss/Select menu appeared.
Second expense checkbox toggled directly during selection mode, no menu shown
✅
After exiting selection mode, dismissing the reopened menu leaves no selection and selection mode offBack exited selection mode. Long-press reopened the Select menu; Dismiss closed it and the report returned to the normal view with no checkboxes.
Menu dismissed; report view back to normal with no selection
✅
A normal tap (selection mode off) still opens expense detailsTapping Test Merchant 1 opened its details page, "$25.00 for Test Merchant 1", with Amount, Merchant, Date, and Category fields.
Normal tap opens expense details page
✅

view run · view recording

@MelvinBot

MelvinBot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

A normal click still opens expense details, but the long-press checks could not run: the web test browser has no press-and-hold action, so the Select menu could not be opened. This is a test-tool limit, not an app failure. The same long-press checks all passed on Android in the earlier Android run.
Taxi Ride expense details screen opened via a normal click

Step Status
On a narrow viewport, long-pressing an expense row opens a bottom menu with SelectNot run. The web test browser rejects every long-press and hold action (longpress, press/click with hold, pan/drag gestures) with "not supported on web."
⚠️
Tapping Select turns on selection mode with only the long-pressed expense checkedNot run. It needs the long press from step 1.
⚠️
In selection mode, long-pressing a different expense toggles its checkbox directly with no menuNot run. It needs a long press.
⚠️
Dismissing the long-press menu leaves selection mode off and nothing selectedNot run. It needs a long press.
⚠️
A normal click (selection mode off) still opens expense detailsAt 390x844, clicking the "Taxi Ride" row opened "$15.00 for Taxi Ride" with merchant, date, and category fields. The "Coffee Shop" row behaved the same way.
Taxi Ride expense details screen opened via a normal click
✅
On a wide desktop viewport, long-pressing an expense row does not open the Select menuNot run. It needs a long press.
⚠️

view run · view recording

@daledah

daledah commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot please resolve conflict

Co-authored-by: daledah <daledah@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Resolved the conflict and pushed f17c805. Both sets of Sentry labels are preserved. GitHub now reports no merge conflicts.

Typecheck, lint, 51 targeted tests, and the Storybook smoke test passed.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

⚠️ Something went wrong. This may be a transient issue. Try again. If it persists, check status.openai.com.

Run details

@daledah

daledah commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot please update the Tests section:

Tests

  1. On a narrow layout (mWeb or native), open an expense report with at least 2 expenses.
  2. Long-press an expense.
  3. Verify the "Select" menu appears.
  4. Tap "Select".
  5. Verify selection mode turns on and the long-pressed expense is selected.
  6. Long-press another expense.
  7. Verify it is selected right away, without the menu.
  8. Exit selection mode, long-press an expense, then tap outside the menu (or press Back on Android).
  9. Verify the menu closes and selection mode stays off.

Offline tests

  1. Go offline.
  2. Repeat the steps in Tests.
  3. Verify the behavior is the same as online.

QA Steps

Same as Tests.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Updated the Tests, Offline tests, and QA Steps sections with your wording. Left all checklist boxes unchanged.


view run

@daledah

daledah commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

iOS: HybridApp
ios.mov
MacOS: Chrome / Safari
web.mov

@daledah

daledah commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot i've completed my checklist, please complete the author checklist and open this PR

@MelvinBot
MelvinBot marked this pull request as ready for review November 4, 2026 07:49
@MelvinBot
MelvinBot requested a review from a team as a code owner November 4, 2026 07:49
@melvin-bot
melvin-bot Bot requested review from daledah and trjExpensify and removed request for a team November 4, 2026 07:49
@melvin-bot

melvin-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

@daledah Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot removed the request for review from a team November 4, 2026 07:49
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T07:52:57.165353Z f17c805 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Marked the PR ready for review and checked the verified author items. Human-only confirmations and unverified items remain unchecked for you to complete directly.


view run

@daledah daledah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@melvin-bot
melvin-bot Bot requested a review from roryabraham November 4, 2026 08:08
@roryabraham
roryabraham merged commit 52fbb76 into main Nov 4, 2026
54 of 56 checks passed
@roryabraham
roryabraham deleted the claude-migrateReportTransactionLongPressModal branch November 4, 2026 17:51
@OSBotify

OSBotify commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@OSBotify OSBotify mentioned this pull request Nov 4, 2026
88 tasks done
@OSBotify

OSBotify commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.32-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update needed — this PR changes how the existing expense-selection menu is implemented, without changing the user workflow or making existing instructions incorrect.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No FullStory changes needed — this PR only refactors the existing expense-selection menu to use the global modal stack, without adding a new user workflow or exposing new private content.

@OSBotify

OSBotify commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/lakchote in version: 9.5.32-7 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants