Skip to content

Migrate Table row long-press selection to the global modal stack - #106082

Merged
roryabraham merged 3 commits into
mainfrom
claude-tableGlobalSelectionMenu
Nov 6, 2026
Merged

roryabraham merged 3 commits into
mainfrom
claude-tableGlobalSelectionMenu

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Migrate Table row long-press selection to the global modal stack, following the Search migration and the report transaction migration.

  • Open the shared menu from the row key, and enable selection mode/select that row only on CONFIRM.
  • Remove the inline modal, submission effect, and modal row-key state from Table/selection middleware. Keep existing disabled-row, layout, and selection-mode guards.
  • Opt Table into the shared wrapper's existing iOS focus policy: delete focus restoration and suppress background input focus on Select, releasing suppression after hide or unmount. Search and report callers retain their defaults.
  • Preserve CONST.SELECTION_LIST_WITH_MODAL_TEST_ID, add the Table Sentry label, and ignore Select presses while the menu is hiding.
  • Add regression coverage for confirmation, dismissal, eligibility/layout guards, focus suppression cleanup, the test ID, and repeated Select presses. Update the agent-row context mock for the separate actions context.

Coding-standard exception: CONSISTENCY-1: the existing iOS platform check is intentionally relocated behind an opt-in, as explicitly requested, rather than changing other callers or duplicating the wrapper. Automated code/accessibility review found no must-fix violations.

AI Tests

  • Conflict-resolution follow-up (2026-11-06): merged main, retaining both the Table selection Sentry label and upstream filter/display labels. Passed changed-file lint, typecheck, changed-file spelling, all 103 targeted Jest tests in three suites, Storybook smoke tests, explicit-file React Compiler command, and coding-standard review. Full lint and full Jest each exceeded 10 minutes; no Jest failures were reported before timeout. prettier is not a repository script; the standalone Oxfmt check was denied by the runner. Compiler check-changed remains blocked by an empty base-ref setting. Web smoke verification was blocked by a blank application page, not a confirmed PR regression.
  • Check-failure follow-up (2026-11-05): applied Oxfmt to the three files flagged by CI; a second npm run fmt produced no diff. No behavior changes.
  • Follow-up validation passed: full lint, changed-file lint, typecheck, changed-file spelling, 103 targeted Jest tests in three suites, Storybook smoke tests, explicit-file React Compiler checks, and coding-standard review. Full Jest exceeded 10 minutes after 1,860 passing suites with no failures reported before timeout. prettier is not a repository script; Oxfmt is the current formatter. Compiler check-changed remains blocked by an empty base-ref setting; explicit-file checks passed.
  • Passed: npm run lint, npm run lint-changed, npm run typecheck, and npm run spell-changed.
  • Passed: 344 Jest tests in 28 related suites, including Table/selection, wrapper, Search/report long-press, and Table consumers.
  • Passed: React Compiler check on all six changed component/hook files, and Storybook --smoke-test --ci.
  • Incomplete: the full Jest run exceeded its 10-minute limit. check-changed could not resolve origin/ with an empty base-ref setting; explicit-file compiler checks passed instead. The repository has no prettier script, and the runner denied the separate formatter invocation.
  • Browser verification was blocked before interaction: the provided dev web session rendered a blank page. No Table behavior was verified in the browser; iOS behavior is covered by unit tests only.

Fixed Issues

$ #103510
PROPOSAL: #103510 (comment)

Tests

Manual test steps (use a workspace with multiple selectable Categories rows):

  1. On a narrow layout, open Workspaces > [workspace] > Categories, long-press Advertising, and verify the bottom-docked Select menu appears. Tap Select and verify selection mode starts with only Advertising checked and 1 selected displayed.
  2. Exit selection mode, long-press Advertising again, and dismiss the menu without choosing Select. Verify the table stays in browsing mode with no rows selected.
  3. Enter selection mode with Advertising selected, tap Benefits, and verify 2 selected. Tap Advertising again and verify only Benefits remains selected.
  4. Long-press a disabled or selection-disabled row and verify no Select menu opens. Repeat on a wide layout and verify the mobile selection menu does not open.
  5. Tap Select repeatedly while the menu is hiding and verify only one selection action occurs and no other modal is dismissed.
  6. On iOS, focus the table search input before selecting a row through the menu. Verify the background input does not regain focus during menu dismissal, and can be focused normally afterward. Also check Search and report selection menus retain their existing focus behavior.

Recorded results, not a claim of completed all-platform QA:

  • Android verification before the main-branch merge: steps 1–3 passed; the selection-disabled owner row did not open Select. A fully disabled-row fixture and rapid repeated-tap coverage were unavailable.

  • Post-merge validation: 103 targeted Jest tests in three suites, typecheck, changed-file lint/spelling, Storybook smoke tests, and the explicit-file React Compiler command passed. Full lint/Jest timed out; formatter validation was unavailable.

  • Post-merge Web manual verification was blocked by a blank application page. Wide-layout behavior, native iOS focus behavior, rapid repeated taps, offline behavior, and full accessibility checks remain outstanding. Unit tests cover the selection/dismissal guards, repeated Select handling, preserved test ID, and iOS focus-suppression cleanup; they do not replace device verification.

  • Verify that no errors appear in the JS console

Offline tests

Same as Tests. This flow makes no API calls, so it behaves the same offline.

QA Steps

  1. On mWeb or native, go to Workspace > Categories.
  2. Long-press a category and tap "Select".
  3. Verify selection mode turns on and that category is selected.
  4. Exit selection mode, long-press a category, then tap outside the menu.
  5. Verify the menu closes and selection mode stays off.
  6. iOS only: focus the category search input, long-press a category and tap "Select".
  7. Verify the keyboard does not reopen.
  • 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

Conflict-resolution follow-up: web smoke test could not reach the Table because the application remained blank.

Blank application page after waiting

Browser check blocked by a blank application page before interaction:

Blank application page preventing Table verification

Co-authored-by: daledah <daledah@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team November 5, 2026 09:33
@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 5, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I created this draft PR from an upstream branch because I don't have push access to daledah's fork.

To copy the branch to your fork:

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

You can then close this PR and open one from your fork if you prefer to manage updates there.

@MelvinBot

MelvinBot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

Verified only basic Table rendering/accessibility on dev NewDot web; acceptance checks were blocked because the web backend cannot perform timed long-press or inspect the JS console. Detailed PR manual steps remain TODO; setup included creating one workspace.

Wide Table accessibility spot-check state

Step Status
No errors appear in the JS console during tested flowsBlocked: console inspection is unavailable through the supported web backend; no console-clean claim can be made.
Rendered wide Table; not console evidence
⚠️
Narrow layout: long-press opens Select; selecting enters selection mode and selects that rowBlocked: at 390×844, timed long-press is unsupported by the web backend. An eligible selection-enabled fixture was not established.
Narrow workspace Table without a selection menu
⚠️
Dismissing the menu leaves row selection unchangedBlocked: the selection menu could not be opened, so dismissal and selection preservation were not exercised.
Narrow Table at the blocked prerequisite
⚠️
Wide layout: long-press does not open the mobile selection menuWide rendering was observed at 1440×900, but unavailable long-press prevents verifying menu suppression.
Wide Table with column headers and workspace row
⚠️
Disabled rows cannot trigger selection; existing selection behavior and accessibility remain unchangedBlocked: no disabled-row or selection-enabled fixture was established. Read-back confirmed a labeled button in narrow layout and a labeled row with column headers/cells in wide layout, not unchanged selection or full accessibility.
Narrow Table accessibility spot-check state
Wide Table accessibility spot-check state
⚠️

view run · view recording

@MelvinBot

MelvinBot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ⚠️ partial

Verified on standalone Android NewDot using genuine Workspace Categories and Members Tables. Completed onboarding and created a workspace as setup; console access, fully disabled-row fixtures, and rapid-tap timing limited coverage.

Members Table remains unchanged after long-pressing its selection-disabled owner

Step Status
No errors appear in the JS console during tested flowsBlocked: console logs could not be inspected with the tester's available permissions. Console errors are unknown, not confirmed absent.
⚠️
Long-pressing an eligible Table row opens Select; Select enters selection mode and selects that same rowLong-pressed Advertising in Workspace Categories. Read-back showed Select; after tapping it, read-back showed 1 selected, Advertising checked, and other visible rows unchecked.
Categories Table selection mode with Advertising selected
✅
Dismissing the menu leaves row selection unchangedOpened Advertising's Select menu and tapped Dismiss. Before/after snapshots showed normal browsing mode without selection checkboxes. Tested the initially unselected state only.
✅
Disabled rows cannot open the selection menu; existing selection behavior remains unchangedPartial: long-pressing the selection-disabled owner in Members did not open Select, confirmed by visibility read-back. Category taps selected Benefits (2 selected), then deselected Advertising (1 selected). A fully disabled row fixture was unavailable; the owner check is not equivalent.
Members Table remains unchanged after long-pressing its selection-disabled owner
⚠️
Repeated Select taps while hiding do not open or resolve another menuBlocked: read-back briefly showed Select disabled while hiding, followed by exactly one selected row. Repeated taps during that transient interval were not exercised, so the race-condition assertion remains unverified.
⚠️

view run · view recording

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

Copy link
Copy Markdown
Contributor Author

Pushed f4f69a9 to fix the Oxfmt failure. Only formatting changed in the three flagged files.

Validation passed: formatter, lint, typecheck, spelling, React Compiler checks, Storybook smoke tests, and all 103 targeted tests. Full Jest timed out after 1,860 passing suites, with no failures reported before timeout.

The independent-approval gate still requires human approval; it was not changed. Checks for the new commit have not yet been confirmed.


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

This comment has been minimized.

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

MelvinBot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ❌ fail

Resolved the conflict and pushed 050337d, preserving both the Table selection label and upstream filter/display labels; GitHub now reports the branch as mergeable. All 103 targeted tests, typecheck, changed-file lint/spelling, Storybook smoke tests, explicit-file React Compiler command, and code review passed; full lint/Jest timed out, formatter validation was unavailable, and web smoke testing was blocked because the handed-over session remained blank after a bounded wait—not a confirmed PR regression.

Blank application page after waiting

Step Status
Workspace Categories Table rendering and row navigation/selectionInitial and final snapshots returned zero nodes; the Workspaces landmark timed out. Target UI could not be reached, so behavior remains unverified.
Blank application page after waiting
❌
Table filter/display controls and long-press acceptanceUnverified because the application did not render. Long-press was not attempted; this does not establish a PR regression.
❌

view run · no recording available

@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 6, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot please open this PR and fill the Tests section on your checklist

@MelvinBot
MelvinBot marked this pull request as ready for review November 6, 2026 08:06
@MelvinBot
MelvinBot requested a review from a team as a code owner November 6, 2026 08:06
@melvin-bot
melvin-bot Bot requested review from daledah and removed request for a team November 6, 2026 08:06
@melvin-bot

melvin-bot Bot commented Nov 6, 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]

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Marked the PR ready for review and filled Tests with reproducible steps, recorded results, and outstanding coverage. Checked the local-test-steps and unit-tests checklist items; unverified testing items remain unchecked.


view run

@melvin-bot
melvin-bot Bot requested review from dylanexpensify and removed request for a team November 6, 2026 08:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 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-06T08:10:49.706791Z 050337d 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 050337dc1f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/components/Table/Table.tsx Resolved
@daledah

daledah commented Nov 6, 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

This comment has been minimized.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Added your exact text to Offline tests and QA Steps, and checked the two corresponding documentation checklist items. No tests were rerun.


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 6, 2026 08:53

@dylanexpensify dylanexpensify 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.

looks good from product pov

@roryabraham
roryabraham merged commit 326ddfb into main Nov 6, 2026
57 of 67 checks passed
@roryabraham
roryabraham deleted the claude-tableGlobalSelectionMenu branch November 6, 2026 10:20
@OSBotify

OSBotify commented Nov 6, 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 6, 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 6, 2026

Copy link
Copy Markdown
Contributor

@OSBotify OSBotify mentioned this pull request Nov 7, 2026
85 tasks done
@OSBotify

OSBotify commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

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

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No FullStory changes needed — this PR refactors the existing Table long-press selection menu into the global modal stack and preserves its behavior, without adding new user-facing features, screens, user properties, or sensitive content.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update needed — this PR preserves the existing long-press selection workflow while changing internal modal handling; it adds no new feature, removes no beta, and makes no existing article sentence incorrect.


view run

@OSBotify

OSBotify commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.5.34-1 🚀

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

Bundle Size Analysis (Sentry):

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.

5 participants