Skip to content

[Due for payment 2025-05-08] Reports - App freezes after tapping Select option #60977

Closed

Description

@nlemma

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.33-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers): sdsjdonisnjoj@gmail.com
Issue reported by: Applause Internal Team
Device used: iPhone 15 Pro Max / iOS 18.4
App Component: Search

Action Performed:

Precondition:

  • Account has at least an expense.
  1. Launch Expensify app.
  2. Go to Reports.
  3. Long press on any expense.
  4. Tap Select.

Expected Result:

The expense will be selected.

Actual Result:

The expense is not selected. App freezes.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6815622_1745871852000.ScreenRecording_04-29-2025_04-23-05_1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @OfstadC

Activity

  1. added
    Bug
    Daily
    DeployBlockerCash
    on Apr 28, 2025
  2. melvin-bot commented on Apr 28, 2025

    @melvin-bot

    Triggered auto assignment to @OfstadC (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. melvin-bot commented on Apr 28, 2025

    @melvin-bot

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

  4. melvin-bot commented on Apr 28, 2025

    @melvin-bot

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

  5. github-actions commented on Apr 28, 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. nlemma commented on Apr 28, 2025

    @nlemma
    Author

    @OfstadC FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

  7. cead22 commented on Apr 28, 2025

    @cead22
    Contributor
  8. nkdengineer commented on Apr 29, 2025

    @nkdengineer
    Contributor

    Proposal

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

    The expense is not selected. App freezes.

    What is the root cause of that problem?

    It comes from #59672, canSelectMultiple is updated wrongly then it's only true on the large screen

    const canSelectMultiple = !isChat && !isTask && isLargeScreenWidth;

    Which causes isSelected of the transaction item to be false on the small screen

    function mapToTransactionItemWithSelectionInfo(item: TransactionListItemType, selectedTransactions: SelectedTransactions, canSelectMultiple: boolean, shouldAnimateInHighlight: boolean) {
    return {...item, shouldAnimateInHighlight, isSelected: selectedTransactions[item.keyForList]?.isSelected && canSelectMultiple};
    }

    then the app freezes because SearchList is re-rendered infinity (selectionMode?.isEnabled is changed from false --> true --> false ....)

    useEffect(() => {
    selectionRef.current = selectedItemsLength;
    if (!isSmallScreenWidth) {
    if (selectedItemsLength === 0) {
    turnOffMobileSelectionMode();
    }
    return;
    }
    if (!isFocused) {
    return;
    }
    if (!wasSelectionOnRef.current && selectedItemsLength > 0) {
    wasSelectionOnRef.current = true;
    }
    if (selectedItemsLength > 0 && !selectionMode?.isEnabled) {
    turnOnMobileSelectionMode();
    } else if (selectedItemsLength === 0 && selectionMode?.isEnabled && !wasSelectionOnRef.current) {
    turnOffMobileSelectionMode();
    }
    }, [selectionMode, isSmallScreenWidth, isFocused, selectedItemsLength]);
    useEffect(

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

    We should remove isLargeScreenWidth condition here.

    const canSelectMultiple = !isChat && !isTask && isLargeScreenWidth;

    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.

  9. 4 remaining items

  10. removed
    DeployBlockerCash
    on Apr 29, 2025
  11. mountiny commented on Apr 29, 2025

    @mountiny
    Contributor

    PR Cped

  12. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on May 1, 2025
  13. changed the title [-]Reports - App freezes after tapping Select option[/-] [+][Due for payment 2025-05-08] Reports - App freezes after tapping Select option[/+] on May 1, 2025
  14. melvin-bot commented on May 1, 2025

    @melvin-bot

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

  15. removed
    Reviewing
    on May 1, 2025
  16. melvin-bot commented on May 1, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.38-4 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-05-08. 🎊

  17. melvin-bot commented on May 1, 2025

    @melvin-bot

    @cead22 @OfstadC @cead22 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]

  18. OfstadC commented on May 7, 2025

    @OfstadC
    Contributor

    Looking at this comment, looks like payment is being handled here - so I don't think any payment is needed here. Please let me know if i'm wrong @mountiny @cead22 😃

  19. added
    Daily
    and removed
    Weekly
    on May 8, 2025
  20. melvin-bot commented on May 8, 2025

    @melvin-bot

    Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

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

Metadata

Metadata

Assignees

Labels

Awaiting PaymentBugDailyEngineering

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions