Skip to content

[Due for payment 2025-03-13] iOS Reports - Selection mode persists in Reports after entering selection mode in Categories #57238

Closed

Description

@mitarachim

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.1.3-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): applausetester+sj9032@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: iPhone 15 Pro Max / iOS 18.3
App Component: Search

Action Performed:

Precondition:

  • Account has no expenses at all.
  1. Launch ND or hybrid app.
  2. Go to workspace settings > Categories.
  3. Long press on any category.
  4. Tap Select.
  5. Swipe to right to go back (not app back button).
  6. Tap Reports tab.

Expected Result:

Selection mode will not persist in Reports after entering selection mode in Categories.

Actual Result:

Selection mode persists in Reports after entering selection mode in Categories.

There is also blank space below the dropdown.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6749828_1740125902162.ScreenRecording_02-21-2025_16-17-33_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021894567607996127275
  • Upwork Job ID: 1894567607996127275
  • Last Price Increase: 2025-02-26
  • Automatic offers:
    • FitseTLT | Contributor | 106311099
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @strepanier03

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 21, 2025
  2. melvin-bot commented on Feb 21, 2025

    @melvin-bot

    Triggered auto assignment to @strepanier03 (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. daledah commented on Feb 21, 2025

    @daledah
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Selection mode persists in Reports after entering selection mode in Categories.

    What is the root cause of that problem?

    When swipe to leave Categories page, we don't have logics to turn off selection mode.

    The logics are only implemented with the back button:

    onBackButtonPress={() => {
    if (selectionMode?.isEnabled) {
    setSelectedCategories({});
    turnOffMobileSelectionMode();
    return;
    }

    What changes do you think we should make in order to solve the problem?

    Add an useEffect to use the above logic when unmount

    useEffect(
            () => () => {
                setSelectedCategories({});
                turnOffMobileSelectionMode();
            },
            [],
        );

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    NA

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. FitseTLT commented on Feb 21, 2025

    @FitseTLT
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-02-21 17:18:47 UTC.

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    iOS Reports - Selection mode persists in Reports after entering selection mode in Categories

    What is the root cause of that problem?

    We normally reset mobile selection on mount unless shouldAutoTurnOff is false

    useEffect(() => {
    if (!shouldAutoTurnOff) {
    return;
    }
    turnOffMobileSelectionMode();
    }, [shouldAutoTurnOff]);

    But for search we specifically turned off shouldAutoTurnOff in here to avoid flickering on search if the selection mode is on and user switches from Search -> other tab -> Search because previously the behaviour was that the selection mode and all the previous selection was persisted on switching away from search tab. But now if you make a selection in search and move away from search the selection is reset. So we don't need shouldAutoTurnOff set to false anymore

    What changes do you think we should make in order to solve the problem?

    We don't need shouldAutoTurnOff to be false so that it will reset selection mode when navigating into search page. So remove shouldAutoTurnOff prop in SelectionListWithModal as we are only using it for this case. and change

    const {selectionMode} = useMobileSelectionMode(false);

        const {selectionMode} = useMobileSelectionMode();
    
    

    we can additionally consider resetting selection mode in unmount instead of the current approach of resetting on mount

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N / A

    What alternative solutions did you explore? (Optional)

  5. melvin-bot commented on Feb 24, 2025

    @melvin-bot

    @strepanier03 Whoops! This issue is 2 days overdue. Let's get this updated quick!

  6. strepanier03 commented on Feb 26, 2025

    @strepanier03
    Contributor

    Testing on Android standalone and unable to repro. I'll try on hybrid app tomorrow.

  7. changed the title [-]iOS Reports - Selection mode persists in Reports after entering selection mode in Categories[/-] [+][Needs Repro] iOS Reports - Selection mode persists in Reports after entering selection mode in Categories[/+] on Feb 26, 2025
  8. MelvinBot commented on Feb 26, 2025

    @MelvinBot
    Contributor

    This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

  9. hungvu193 commented on Feb 26, 2025

    @hungvu193
    Contributor

    I can reproduce based on the OP steps

    trim.244317EA-8880-4FF3-B70F-2D6B92B7AF8D.MOV
    1. Launch ND or hybrid app, create new account
    2. Go to workspace settings > Categories.
    3. Long press on any category.
    4. Tap Select.
    5. Swipe to right to go back (not app back button).
    6. Tap Reports tab.

    @strepanier03 Can you assign me to this issue?
    Slack thread:
    https://expensify.slack.com/archives/C02NK2DQWUX/p1740534524543399

  10. 28 remaining items

  11. changed the title [-]iOS Reports - Selection mode persists in Reports after entering selection mode in Categories[/-] [+][Due for payment 2025-03-13] iOS Reports - Selection mode persists in Reports after entering selection mode in Categories[/+] on Mar 6, 2025
  12. melvin-bot commented on Mar 6, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Mar 6, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.9-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-03-13. 🎊

    For reference, here are some details about the assignees on this issue:

  14. melvin-bot commented on Mar 6, 2025

    @melvin-bot

    @hungvu193 @strepanier03 @hungvu193 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  15. hungvu193 commented on Mar 10, 2025

    @hungvu193
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: https://github.com/Expensify/App/pull/50705/files#r1986731525

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Test:

    1. Create a brand new account.
    2. Launch ND or hybrid app.
    3. Go to workspace settings > Categories.
    4. Long press on any category.
    5. Tap Select.
    6. Swipe to the right to go back (not app back button).
    7. Tap Reports tab.
    8. Verify that selection mode doesn't appear.

    Do we agree 👍 or 👎

  16. strepanier03 commented on Mar 13, 2025

    @strepanier03
    Contributor

    Payment Summary

  17. strepanier03 commented on Mar 13, 2025

    @strepanier03
    Contributor

    @hungvu193 - I've finished up the reg test and you can use the payment summary above to put in your manual payment request.

    @FitseTLT - I paid and closed your contract in Upwork.

    Thank you both for all your work on this one!

  18. garrettmknight commented on Mar 21, 2025

    @garrettmknight
    Contributor

    $250 approved for @hungvu193

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions