Skip to content

[Due for payment 2025-07-25] [$125] Report - After downloading expense tapping device back button doesn't trigger action #66027

Closed

Description

@jponikarchuk

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: V9.1.80-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/6482511
Email or phone of affected tester (no customers): Slottwo1 sm@gmail.com
Issue reported by: Applause Internal Team
Device used: Redminote 10s android 13
App Component: User Settings

Action Performed:

  1. Launch app
  2. Create a manual expense
  3. Go to reports
  4. Select the expense
  5. From dropdown, select download
  6. Tap device back button

Expected Result:

In reports page, after downloading expense tapping device back button must exit user from select mode.

Actual Result:

In reports page, after downloading expense tapping device back button doesn't trigger any action.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021944710713187286770
  • Upwork Job ID: 1944710713187286770
  • Last Price Increase: 2025-07-14
  • Automatic offers:
    • suneox | Contributor | 108033856
Issue OwnerCurrent Issue Owner: @adelekennedy

Activity

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

    @melvin-bot

    Triggered auto assignment to @adelekennedy (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. added
    DeployBlockerCashThis issue or pull request should block deployment
    and removed on Jul 14, 2025
  4. melvin-bot commented on Jul 14, 2025

    @melvin-bot

    Triggered auto assignment to @mountiny (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  5. github-actions commented on Jul 14, 2025

    @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.
  6. melvin-bot commented on Jul 14, 2025

    @melvin-bot

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

  7. rushatgabhane commented on Jul 14, 2025

    @rushatgabhane
    Member

    @BlameGPT please help us find the cause

  8. BlameGPT commented on Jul 14, 2025

    @BlameGPT
    Contributor

    Vibe check failed for these PRs 💅

    If not above, check these

  9. nabi-ebrahimi commented on Jul 14, 2025

    @nabi-ebrahimi

    Proposal

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

    Report - After downloading expense tapping device back button doesn't trigger action

    What is the root cause of that problem?

    It comes from this commit. We check if the selected reports' length is not more than 0, so we return early.

    if (searchContextData.selectedReports.length === 0 && isEmptyObject(searchContextData.selectedTransactions) && !searchContextData.shouldTurnOffSelectionMode) {

    So it doesn't turn off the selection mode. We only call clearSelectedTransactions in the back button handler.

    const handleBackButtonPress = useCallback(() => {
    if (!isMobileSelectionModeEnabled) {
    return false;
    }
    clearSelectedTransactions(undefined, true);
    return true;
    }, [isMobileSelectionModeEnabled, clearSelectedTransactions]);
    useHandleBackButton(handleBackButtonPress);

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

    We can turn off the selection mode as well, after calling clearSelectedTransactions on the back button handler like we do here.

    <HeaderWithBackButton
    title={translate('common.selectMultiple')}
    onBackButtonPress={() => {
    topBarOffset.set(StyleUtils.searchHeaderDefaultOffset);
    clearSelectedTransactions();
    turnOffMobileSelectionMode();
    }}
    />

      const handleBackButtonPress = useCallback(() => {
            if (!isMobileSelectionModeEnabled) {
                return false;
            }
            topBarOffset.set(StyleUtils.searchHeaderDefaultOffset);
            clearSelectedTransactions();
            turnOffMobileSelectionMode();
            return true;
        }, [isMobileSelectionModeEnabled, clearSelectedTransactions, StyleUtils.searchHeaderDefaultOffset, topBarOffset]);

    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)

    We can also include shouldTurnOffSelectionMode in the condition to prevent returning early when it's true.

          if (searchContextData.selectedReports.length === 0 && isEmptyObject(searchContextData.selectedTransactions) && !searchContextData.shouldTurnOffSelectionMode && !shouldTurnOffSelectionMode) {
                    return;
                }
  10. 38 remaining items

  11. melvin-bot commented on Jul 18, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.82-7 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-07-25. 🎊

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

  12. melvin-bot commented on Jul 18, 2025

    @melvin-bot

    @suneox @adelekennedy 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]

  13. suneox commented on Jul 26, 2025

    @suneox
    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/65421/files#r2232789566

    • [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.

      N/A: It isn't an impactful bug

  14. adelekennedy commented on Jul 28, 2025

    @adelekennedy
    Contributor

    Payment Summary

    Contributor: @nabi-ebrahimi paid $125 via Upwork (Pending Offer here)
    Contributor+: @suneox due $125 via NewDot

  15. suneox commented on Jul 29, 2025

    @suneox
    Contributor

    @adelekennedy Could you please help withdraw the Upwork offer?
    I’m in the process of setting up ND payment and will submit the request as soon as it’s ready.
    Thank you!

  16. nabi-ebrahimi commented on Jul 29, 2025

    @nabi-ebrahimi

    @adelekennedy Thanks, I accepted the offer.

  17. adelekennedy commented on Jul 29, 2025

    @adelekennedy
    Contributor

    Perfect @nabi-ebrahimi paid out, @suneox I just withdrew the offer and updated the summary above!

  18. suneox commented on Jul 30, 2025

    @suneox
    Contributor

    Perfect @nabi-ebrahimi paid out, @suneox I just withdrew the offer and updated the summary above!

    Thank you. I've requested in ND

  19. isabelastisser commented on Aug 8, 2025

    @isabelastisser
    Contributor

    $125 approved in ND for @suneox

  20. trjExpensify commented on Aug 13, 2025

    @trjExpensify
    Contributor

    $125 approved for @suneox in ND.

    (We changed approvers, so this has bounced to me!)

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.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions