Skip to content

[Due for payment 2026-08-19] Android - Company card - Selection mode persists after changing card feed #97412

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.46-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #94678
Email or phone of affected tester (no customers): sdsjodijnsdojsosjio@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Samsung Galaxy S25 FE / Android 16
App Component: Workspace Settings

Action Performed:

Precondition:

  • Workspace has two direct feed with cards.
  1. Launch Expensify app.
  2. Go to workspace settings > Company cards.
  3. Long tap on any card > Select.
  4. Open feed selector.
  5. Select another feed.

Expected Result:

Selection mode will exit. Checkbox will not appear on the card.

Actual Result:

Selection mode persists after changing card feed. Checkbox is shown on the card.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

To be added by Applause Leads

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7221301

Issue OwnerCurrent Issue Owner: @ChavdaSachin

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 30, 2026
  2. applause-bot commented on Jul 30, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/56bebdabadcb459c68146488b27d09e54ba0060cf5fd34b0af1575481105307e

  3. melvin-bot commented on Jul 30, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #94678

  4. melvin-bot commented on Jul 30, 2026

    @melvin-bot

    @JS00001 @ChavdaSachin you have been assigned to this deploy blocker because you reviewed the offending PR: #94678

  5. melvin-bot commented on Jul 30, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  6. github-actions commented on Jul 30, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  7. MelvinBot commented on Jul 30, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Offending PR: Expensify/App#94678 — "Add bulk actions for company cards" (by KJ21-ENG). It introduced the entire Company Cards multi-select / selection-mode feature, so this is a new-feature bug (matches "doesn't exist in prod"). Confirmed present in the current StagingDeployCash checklist.

    Root cause: Mobile selection mode is driven by two independent pieces of state — the local selectedCardKeys array and the global MobileSelectionMode Onyx flag. Fully exiting requires clearing both. The feed-change reset path only clears the keys and never turns the flag off, so after switching feeds the checkboxes stay visible with nothing selected.

    Android-specific because on wide layouts selection is surfaced via the selected-count dropdown (which reads selectedCardKeys and does reset correctly), so desktop testing passed. The generic Table selection.ts middleware doesn't rescue it either — it only auto-disables mobile selection mode when there are no selectable rows, and only clears on search/filter changes (a feed switch is neither).

    Recommended fix (roll forward, not revert): A revert is disproportionate — #94678 is a 25-file feature PR that also ships the shared Table.FilterBar control now used by many other tables. In WorkspaceCompanyCardsTable/index.tsx, also call turnOffMobileSelectionMode() when the feed changes while mobile selection mode is enabled (via an effect, since it's an Onyx write):

    const isMobileSelectionModeEnabled = useMobileSelectionMode();
    const previousFeedName = usePrevious(feedName);
    useEffect(() => {
        if (previousFeedName === feedName || !isMobileSelectionModeEnabled) {
            return;
        }
        turnOffMobileSelectionMode();
    }, [feedName, previousFeedName, isMobileSelectionModeEnabled]);

    The existing derived-state block already zeroes selectedCardKeys on feed change, so only the turnOffMobileSelectionMode() call needs adding. Best owner: PR author KJ21-ENG (reviewers JS00001 / ChavdaSachin already assigned here).


    Next Steps: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  8. KJ21-ENG commented on Jul 30, 2026

    @KJ21-ENG
    Contributor

    After looking into this, my take is that this behavior is not unique to #94678 either. I reproduced the same flow in Expensify Cards on a checkout that does not contain #94678: select a card in feed Alpha, switch to Beta, and the old selection is cleared while selection mode stays active with 0 selected and visible checkboxes.

    This points to the existing shared selection-mode lifecycle, which #94678 followed in Company Cards. No stale or cross-feed card stays selected.

    97412-physical-android-reproduction-final.mp4
  9. ChavdaSachin commented on Jul 30, 2026

    @ChavdaSachin
    Contributor

    @Expensify/design, please clarify if this needs improvement.

  10. 2 remaining items

  11. dubielzyk-expensify commented on Jul 31, 2026

    @dubielzyk-expensify
    Contributor

    Yeah, I'd like this fixed though. I think when you swap the feed we should exit select mode. That being said, if the selection isn't actually still selected, but it resets from X selected to 0, then that's probably still not horrible. This is also an edge case that's not super common

  12. JS00001 commented on Jul 31, 2026

    @JS00001
    Contributor

    I agree, @KJ21-ENG lets make sure this one is included in the follow up

  13. KJ21-ENG commented on Jul 31, 2026

    @KJ21-ENG
    Contributor
  14. dannymcclain commented on Jul 31, 2026

    @dannymcclain
    Contributor

    Yeah, I'd like this fixed though.

    Same, but my take is that once you enter select mode, you shouldn't even see the feed selector or anything except the select mode header, action button, search, and the selectable table.

    Image

    When you're in select mode, the primary purpose is selecting & acting on that selection. :my-2-cents:

  15. KJ21-ENG commented on Aug 1, 2026

    @KJ21-ENG
    Contributor

    I’ve implemented Danny’s suggested focused selection-mode layout. While selection mode is active on narrow layouts, the feed selector, Settings, and unrelated content are hidden. Only the selection header, action button, search, and selectable table remain, as shown in the recording below.

    With this layout, the original user flow reported here is no longer directly possible because the user cannot open the feed selector while selection mode is active, and pressing Back exits selection mode.

    I have currently retained Jon’s requested feed-change cleanup as a defensive safeguard. It would exit selection mode if the feed changes indirectly, for example because the selected feed becomes unavailable or the layout changes. However, it is no longer needed for the normal user interaction described in this issue.

    Would you prefer that we keep this defensive safeguard, or remove it and rely only on the focused selection-mode layout?

    cc: @JS00001 @dubielzyk-expensify @dannymcclain

    97412-native-android-smooth-transition.mp4
  16. dubielzyk-expensify commented on Aug 3, 2026

    @dubielzyk-expensify
    Contributor

    There's no way to see which feed you're in when you're in select mode now which was why I suggested just clearing the state and exiting select mode when changing feeds. I don't think it's perhaps a big deal though. Fine with it if Danny is 👍

  17. dannymcclain commented on Aug 4, 2026

    @dannymcclain
    Contributor

    There's no way to see which feed you're in when you're in select mode now which was why I suggested just clearing the state and exiting select mode when changing feeds.

    Ah that's a good point that I hadn't considered. I'm down to do it that way as well. No strong feelings here as long as we exit select mode when trying to do something that's not selecting. @shawnborton any thoughts here?

  18. shawnborton commented on Aug 4, 2026

    @shawnborton
    Contributor

    Yeah, this resonates with me here:

    No strong feelings here as long as we exit select mode when trying to do something that's not selecting.

  19. changed the title [-]Android - Company card - Selection mode persists after changing card feed[/-] [+][Due for payment 2026-08-19] Android - Company card - Selection mode persists after changing card feed[/+] on Aug 12, 2026
  20. melvin-bot commented on Aug 12, 2026

    @melvin-bot

    @ChavdaSachin

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.52-11 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 2026-08-19. 🎊

    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]. If no checklist is needed for this issue, you can click: [no checklist button]

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions