Skip to content

[CP Staging] fix: always show the selection checkboxes in the add existing expense list - #102011

Merged
lakchote merged 3 commits into
Expensify:mainfrom
Krishna2323:krishna2323/fix-add-existing-expense-selection-102003
Sep 23, 2026
Merged

lakchote merged 3 commits into
Expensify:mainfrom
Krishna2323:krishna2323/fix-add-existing-expense-selection-102003

Conversation

@Krishna2323

@Krishna2323 Krishna2323 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Fixed Issues

$ #102003
PROPOSAL:

Tests

  1. Mobile (iOS + Android): FAB → Create new report → Add expense → Add existing expense. Verify checkboxes are visible immediately on every row, with no long press needed.
  2. Tap a row to select it, then tap again to deselect. Verify long press does not show a Select popup.
  3. Select 3 expenses, wait a few seconds, scroll, then confirm. Verify all 3 are added to the report and none silently deselect.
  4. Repeat step 1 on a report that already has 2+ expenses.
  5. Regression: Mobile → Workspace → Members and Workspace → Categories. Verify these still open without checkboxes and require long press → Select. Confirm Select multiple still appears in the header.
  6. Web/desktop: Add existing expense still shows checkboxes and selects on click, unchanged.
  • Verify that no errors appear in the JS console

Offline tests

  • Same as tests

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
    • MacOS: Desktop
  • 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 there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and 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)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • 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)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • 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 a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • 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_hybrid.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web_chrome.mp4

… list

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
...omponents/Tables/AddExistingExpenseTable/index.tsx 0.00% <ø> (ø)
src/components/Table/middlewares/selection.ts 85.71% <0.00%> (ø)
...xistingExpenseTable/AddExistingExpenseTableRow.tsx 0.00% <0.00%> (ø)
src/pages/AddExistingExpense.tsx 0.00% <0.00%> (ø)
src/components/Table/Table.tsx 91.17% <50.00%> (-1.31%) ⬇️
... and 24 files with indirect coverage changes

@Krishna2323

Copy link
Copy Markdown
Contributor Author

@Expensify/design @JS00001

Root cause of the issue: The old page used SelectionList with canSelectMultiple, so checkboxes were visible on every row from the start. After moving to Table, selection was hidden on small screens until the app-wide mobile selection mode flag was enabled. So the list opened with no checkboxes and tapping did nothing. Long press → Select was the only way in, and other screens could also clear that shared flag, which cleared the selection.

Fix: Added shouldAlwaysEnableSelection to Table. Tables that are only used for picking rows can keep selection enabled and won't read or write the shared selection mode flag, so nothing else can clear it. This restores the old behavior: checkboxes on arrival and single tap to select.

android_hybrid.mp4

@Krishna2323
Krishna2323 marked this pull request as ready for review September 23, 2026 09:03
@Krishna2323
Krishna2323 requested review from a team as code owners September 23, 2026 09:03
@melvin-bot
melvin-bot Bot requested review from heyjennahay and situchan and removed request for a team September 23, 2026 09:03
@melvin-bot

melvin-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

@situchan 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 September 23, 2026 09:03
@shawnborton

Copy link
Copy Markdown
Contributor

That looks good to me 👍

@lakchote lakchote changed the title fix: always show the selection checkboxes in the add existing expense list [CP Staging] fix: always show the selection checkboxes in the add existing expense list Sep 23, 2026
@situchan

Copy link
Copy Markdown
Contributor

From product perspective, on mobile, I think it's better to select rows directly on single tap, without need of long press to enter selection mode. (applicable only when single tap is no-op)

ok so this is what I reported here

@situchan

Copy link
Copy Markdown
Contributor

Side effect: android device back button not working at all. It just clears selection mode

Screen.Recording.2026-09-23.at.10.24.16.AM.mov

Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@situchan

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 proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and 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 that this PR follows the guidelines as stated in the Review Guidelines
  • 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 and each prop has a /** comment above it */
    • The file is named correctly
    • 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
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • 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 any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • 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.
  • 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

Android: HybridApp
Screen.Recording.2026-09-23.at.10.38.41.AM.mov
Android: mWeb Chrome
iOS: HybridApp
Screen.Recording.2026-09-23.at.10.41.51.AM.mov
iOS: mWeb Safari
MacOS: Chrome / Safari

@melvin-bot
melvin-bot Bot requested review from JS00001 and rlinoz September 23, 2026 09:46
@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Code review — the approach is sound and I found no correctness bug. The blast radius is limited to the one table that opts in, which is what you want on a [CP Staging] PR.

Locally on 1c71558: eslint on all 6 changed files reports only the 4 pre-existing no-unsafe-type-assertion errors in Table.tsx (lines 81/84/135/534 — untouched by this PR), npm run typecheck passes, and react-compiler-compliance-check passes. I could not verify in a browser — web prep failed in this run, so everything below is static analysis.

What I'd change

1. Add a unit test for the new prop. tests/ui/TableSelectionTest.tsx:113 already has a renderSelectableTable(shouldEnableSelectionInNarrowPaneModal) harness with small/wide screen cases for the sibling prop, so this is cheap: assert that a small screen + shouldAlwaysEnableSelection renders checkboxes, and that a long press does not render CONST.SELECTION_LIST_WITH_MODAL_TEST_ID. The author checklist has the unit-test box checked but the diff adds none.

2. The mobile header now grows a select-all checkbox, and the test plan doesn't cover it. TableHeader.tsx:88 derives isSelectionCheckboxVisible from the same isMobileSelectionEnabled, and this table passes a title, so the header survives the shouldUseNarrowTableLayout && !title early return. On mobile that is a new control that wasn't there before. Worth a mobile screenshot of the header and an explicit 👍 from Expensify/design — shouldEnableSelectionInNarrowPaneModal meant it was already visible on desktop RHP, so shawnborton's approval may not have covered the mobile case.

3. Minor: say why both selection props are set. index.tsx:121-123 — with shouldAlwaysEnableSelection, checkbox visibility no longer depends on selectionUsesNarrowLayout, so shouldEnableSelectionInNarrowPaneModal now only decides whether a wide-desktop RHP row press goes through onPress vs handleCheckboxPress, and both land on handleSingleRowSelection. Harmless, but the next reader will wonder if one is dead.

4. Minor: the eslint-disable at Table.tsx:475 looks like scope creep. setMobileSelectionModeEnabled(true) was already called in that effect before this PR, so the omission isn't something you introduced. Worth confirming it's actually required (lint ratchet) rather than defensive — if not, dropping it keeps the diff to the behavior change.

What I traced and confirmed
  • Checkboxes on arrival. isMobileSelectionEnabled = !!shouldAlwaysEnableSelection || isGlobalMobileSelectionEnabled (Table.tsx:290) feeds isSelectionCheckboxVisible in TableRow.tsx:111, so the short-circuit makes it true regardless of selectionUsesNarrowLayout. ✅

  • Long press no longer opens the Select sheet. TableRow.tsx:251 bails when isMobileSelectionEnabled, so setMobileSelectionModalRowKey is never called and the bottom-docked Modal at Table.tsx:547 stays hidden. Test step 2 holds.

  • Dropping the isSmallScreenWidth guard from the row's onPress is safe. TableRow.tsx:236-248 already routes the narrow-screen press to handleCheckboxPress and only calls onPress when !selectionUsesNarrowLayout. So the removed guard was dead once selection mode is always on, and both paths converge on handleSingleRowSelection.

  • Android back now falls through to navigation. selection.ts:114-122 returns false, and useAndroidBackButtonHandler/index.android.ts hands that straight to BackHandler.addEventListener, where false means unhandled. This fixes the side effect situchan reported. The selection isn't cleared first, but the unmount cleanup at selection.ts:163 handles that — and discarding on back matches what the header back button does, so it's consistent.

  • onBackButtonPress={Navigation.goBack} doesn't leak an event into goBack(backToRoute). HeaderWithBackButton/index.tsx:232 invokes it with no arguments and the prop is typed () => void. It also matches the two empty-state headers in the same file that already passed the reference directly.

  • No global-selection-mode leak, and no effect loop. setMobileSelectionModeEnabled early-returns (Table.tsx:292-296), so the table never writes RAM_ONLY_MOBILE_SELECTION_MODE — which is the actual fix for "another screen cleared my selection". The setSelectionModeEnabled(false) branches in the sync effect at selection.ts:127-140 become no-ops, and since isSelectionModeEnabled stays true the deps don't change, so it can't re-fire. The "clear on selection-mode-off" effect at selection.ts:144-150 also returns early forever, which is what makes test step 3 (no silent deselect) work. Note useMobileSelectionMode still clears the global flag once on mount, so nothing is left on for other screens either.

  • No regression risk for other tables. Both behavior changes in selection.ts and Table.tsx are gated on the new optional prop, and AddExistingExpenseTable is its only consumer — so test step 5 (Members / Categories keep long press → Select) should hold by construction.


Reply with @MelvinBot <feedback> if you want me to dig into any of these further.

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 No functional regression found. Every behavior change lands on small screens only, on the one table that opts in. Wide and medium layouts are behaviourally unchanged, and no other Table consumer is touched.

Caveats on method: I could not drive this in a browser (web prep failed in this run), and the Jest suites weren't runnable in this environment — so this is static analysis plus eslint / npm run typecheck / react-compiler-compliance-check, all of which pass on 1c71558.

The one thing I'd add to the test plan

Select-all with an active search wipes the selections that the search is hiding — and this PR makes it much easier to reach on mobile.

selection.ts:169-182 compares against selectableKeys (post-search/filter) but clears selectedKeys (everything). So with shouldPreserveSelectionOnSearchAndFilter on: select 3 → type in Find expense → tap the header select-all → isSelectionIndeterminate wins and onRowSelectionChange?.([]) drops all 3, including the hidden ones. It never selects the visible rows, which is what the tap looks like it should do.

This is pre-existing — it already happens on desktop RHP — so it isn't a regression from your diff. But before this PR the mobile header checkbox was behind a long press, and now it's on screen the moment the page opens, right next to the search field this table added. Worth one QA step, and worth deciding whether handleSelectAll should scope its clear to selectableKeys instead. Same reasoning applies to select-all + pagination: it only covers the loaded page, and the checkbox flips back to indeterminate as you scroll.

Two smaller items, both carried over from my earlier review since they're still open: there's no unit test for shouldAlwaysEnableSelection, and the new mobile header select-all isn't in the test plan or the screenshots.

One thing to confirm with situchan rather than a defect: Android back now leaves the page even with rows selected, discarding them with no confirmation. That matches the header back button and matches what was reported, but it is "back exits" rather than "back clears, second back exits".

Regression surfaces I checked and cleared

Wide screens — no behavior change at all. isMobileSelectionEnabled flips to true, but every wide-screen consumer already short-circuited on !selectionUsesNarrowLayout: checkbox visibility (TableRow.tsx:111, TableHeader.tsx:88) was already true, row press already routed to onPress (TableRow.tsx:236), and long press was already gated on isSmallScreenWidth (TableRow.tsx:251). Medium width behaves the same, since selectionUsesNarrowLayout keys off isSmallScreenWidth.

Other tables. Both edits in shared code are gated on the new optional prop, and AddExistingExpenseTable is its only consumer. Workspace Members / Categories keep long press → Select by construction.

Mobile header layout. The header does gain a select-all checkbox, and its padding flips ph4 → ph3 at TableHeader.tsx:130 while rows stay on ph4. Not a misalignment: the narrow header checkbox carries styles.pl1 (TableHeader.tsx:145-157) so 12 + 4 = 16 matches the row's ph4. This exact combination already renders today on any mobile table in selection mode.

No effect loop, no stale global flag. setMobileSelectionModeEnabled early-returns (Table.tsx:292-296), so the two setSelectionModeEnabled(false) branches in the sync effect (selection.ts:127-140) become no-ops; isSelectionModeEnabled never changes, so the deps never change and it can't re-fire. The "clear on selection-mode-off" effect at selection.ts:144-150 permanently early-returns, which is what makes test step 3 work. useMobileSelectionMode still clears the global flag on mount, so nothing leaks to other screens either.

Android back. selection.ts:115 returns false and index.android.ts hands that straight to BackHandler, where false means unhandled. The selection isn't cleared first, but the unmount cleanup at selection.ts:163 covers it.

No duplicate checkbox. TransactionItemRow doesn't consume useTableContext, and neither TableBody nor any TableFilterBar component reads isMobileSelectionEnabled — TableRow and TableHeader are the only two.

Route is always an RHP. ADD_EXISTING_EXPENSES_ROOT is only registered under RightModalNavigator (ModalStackNavigators/index.tsx:1371), so there's no central-pane variant with different selection semantics.

onBackButtonPress={Navigation.goBack} is safe — HeaderWithBackButton/index.tsx:232 calls it with no arguments, so no GestureResponderEvent reaches goBack(backToRoute).

Existing tests. tests/ui/TableSelectionTest.tsx only exercises shouldEnableSelectionInNarrowPaneModal and never passes the new prop; tests/unit/AddExistingExpenseTest.ts and AddExistingExpenseSearchTest.ts are pure util tests that don't render the page. None assert the removed behavior, so nothing should start failing — though I couldn't execute them here to confirm.


Reply with @MelvinBot <feedback> if you want me to dig into any of these further.

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

Left a small comment

Comment thread src/components/Table/Table.tsx Resolved
Signed-off-by: krishna2323 <belivethatkg@gmail.com>

@lakchote lakchote 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

@lakchote
lakchote merged commit be8c9e6 into Expensify:main Sep 23, 2026
34 of 35 checks passed
@OSBotify

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.

OSBotify pushed a commit that referenced this pull request Sep 23, 2026
…ing-expense-selection-102003

[CP Staging] fix: always show the selection checkboxes in the add existing expense list

(cherry picked from commit be8c9e6)

(cherry-picked to staging by lakchote)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Sep 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@os-botify

os-botify Bot commented Sep 23, 2026

Copy link
Copy Markdown

🔁 Filed a Staging retest request for deploy blockers #102003 after this PR was cherry-picked to staging.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/lakchote in version: 9.4.92-2 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Yes — one help site article needed an update. Draft PR: Docs updates for E/A#102011 Add existing expense mobile checkbox selection (HelpDot, assigned to Krishna2323).

Managing-Expenses-in-a-Report.md:32-37 is the only article that documents this flow, and its steps were written web-only ("Click one or more expenses"). Meanwhile sibling articles teach the app-wide mobile pattern — Duplicate-a-Report.md:52 and How-to-Duplicate-an-Expense.md:50 both say "Long-press an item, then tap Select to enter selection mode." This PR makes Add existing expense a deliberate exception to that pattern, so a mobile member who learned long-press elsewhere would try it here, get nothing, and assume the screen is broken.

The docs edit names the checkbox, covers click and tap, adds a Note flagging the exception, and fixes a pre-existing duplicated 3. in that numbered list.

What I checked, and what I deliberately left out

Scope of the search. Add existing expense appears in exactly one place across docs/articles — the line above. Create-and-Submit-Reports.md:17 mentions the entry point but no selection mechanics, so it needs nothing. The checkbox-selection articles for the Spend page, Expensify Card reconciliation, exports, Members, and Categories are all unaffected: shouldAlwaysEnableSelection has exactly one consumer, AddExistingExpenseTable/index.tsx:123.

Label verification. Every UI label in the edited block was checked against src/languages/en.ts for exact wording and capitalization — Add existing expense (iou.addExistingExpense:1782), Add to report (iou.addExistingExpenseConfirm:1786), Status (common.status:511), Unreported (common.unreported:504), Draft (common.draft:404), Select (common.select:105). I did not drive the UI in a browser — web prep failed in this run — so the labels are verified from source strings, not from a live screen.

Left out on purpose: the new mobile select-all checkbox. TableHeader.tsx:88 derives its checkbox visibility from the same isMobileSelectionEnabled, and this table passes a title, so the header survives its early return and a select-all checkbox now renders on small screens too. That's a real new control, but it's the same item I flagged for design confirmation in my code review, and I couldn't verify it visually — so I didn't document it. Worth a follow-up line in the article once it's confirmed.

Two judgment calls to check on the docs PR.

  • I left ### Fixed Issues as a bare $. A docs-only follow-up shouldn't be wired into the issue-linking automation for [$250] Android - Expense - Unable to select expense in Add existing expense list; the source PR and issue are linked in the Explanation instead. Add the $ link if HelpDot convention expects it.
  • I kept the edit surgical. The article predates parts of the current authoring spec — it uses bold pseudo-headings instead of ## sections — and restructuring it is a separate job.

Not run: npx cspell on the changed file (the command wasn't available to me in this run). The added text is plain English with no product-specific coinages, but CI will confirm.


@Krishna2323, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/lakchote in version: 9.4.92-8 🚀

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

Bundle Size Analysis (Sentry):

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/lakchote in version: 9.4.93-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

Yes — one help article needed an update. Draft PR: Docs updates for E/A#102011 Add existing expense selection on mobile

What changed and why

This PR makes the Add existing expense list always show its checkboxes. On mobile that list previously required a long press → Select to enter selection mode, and the header swapped to Select multiple. Now checkboxes appear as soon as the list opens and a tap selects or deselects.

Managing-Expenses-in-a-Report.md is the only article documenting this flow. Its Add existing unreported expenses steps were web-only ("Click one or more expenses") and said nothing about mobile — so a reader coming from How to Duplicate an Expense or Duplicate a Report, which both document long-press → Select, would expect the same pattern here. The docs weren't wrong before, but they left the mobile behavior undefined, and now there's a real platform difference worth stating.

What the docs PR does

  • States that checkboxes are visible as soon as the list opens on web and mobile, with no long press.
  • Expands the filter step to match the live UI: Filters → Status (Unreported / Draft) → Apply.
  • Fixes a duplicated step number in that list (it had two step 3s).
  • Adds an FAQ entry on why this list has no long-press selection mode, and notes other mobile lists still do.
  • Adds two keywords for retrieval.
UI verification and guidelines applied

Every label was checked against the live app rather than copied from the existing article:

  • Header: Add existing expense
  • Entry point sub-menu: Create expense, Track distance, Add existing expense
  • Filter panel: Filters with a Status section offering Unreported and Draft, plus Reset / Apply
  • Confirm button: Add to report — it does not change to an "N selected" label

Written against docs/HELPSITE_NAMING_CONVENTIONS.md, docs/HELP_AUTHORING_GUIDELINES.md, and docs/TEMPLATE.md: UI labels bold and UI-exact, the new FAQ heading starts with a question word, only ## headings added. npm run spell-changed passes.

No other article under docs/articles describes this flow — nothing else needs a change.

@Krishna2323, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/lakchote in version: 9.4.93-3 🚀

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

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants