Skip to content

[Due for payment 2026-06-25] Search selection: move write-side off onto provider/controller #93677

Closed

Description

@mountiny

Problem

The Search screen owned the entire selection write-path inline inside a ~800-line component (toggle row/group/all, reconcile stale keys, FlashList extraData, mobile selection mode). Every checkbox press re-rendered the whole screen subtree (SearchPage → Search → list), causing 8–15 row re-renders per toggle.

Solution

Moved selection write-side out of Search into single-responsibility units on dedicated contexts: pure selectionBuilders.ts, state-only SearchSelectionProvider with applySelection, new SearchWriteActionsProvider for toggle/reconcile effects, and self-subscribing SearchSelectionFooter. Rows and list pull actions from context; selectedTransactions removed from FlashList extraData. Checkbox presses now re-render only affected row(s) and the footer.

PR

#92809

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    ReviewingHas a PR in review
    InternalRequires API changes or must be handled by Expensify staff
    on Jun 16, 2026
  2. changed the title [-]Search selection: move write-side off onto provider/controller[/-] [+][Due for payment 2026-06-25] Search selection: move write-side off onto provider/controller[/+] on Jun 18, 2026
  3. melvin-bot commented on Jun 18, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jun 18, 2026

    @melvin-bot

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

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

  5. ZhenjaHorbach commented on Jun 23, 2026

    @ZhenjaHorbach
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    It's a refactoring issue

    • [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: NA

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

    Regression Test Proposal

    Test:

    1. Open Search (Reports / Expenses).
    2. Tap a single expense row's checkbox — verify it selects, the bulk-action footer appears with the correct count/total, and only that row + footer update (no full-list flicker).
    3. Tap a report/group checkbox — verify all of its transactions select together.
    4. Tap "Select all" — verify every selectable row selects and the footer reflects the matching-items total; untoggle one row and verify "select all" turns off.
    5. With a selection active, trigger a data change (e.g. let an Onyx update add/remove a row) — verify the selection reconciles and stale keys are dropped, with no console "Maximum update depth" errors.
    6. On narrow/mobile layout: long-press a row to enter selection mode, select/deselect down to zero — verify selection mode turns off automatically.
    7. Verify bulk actions (hold/unhold, approve, pay, change report, etc.) still operate on the selected set.

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-248b-a88e-3ffe-3740e4524844
  6. melvin-bot commented on Jun 23, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  7. melvin-bot commented on Jun 24, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  8. mallenexpensify commented on Jun 27, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @ZhenjaHorbach due $250 via NewDot

    ^ Test case created. Thx

  9. garrettmknight commented on Jun 29, 2026

    @garrettmknight
    Contributor

    $250 approved for @ZhenjaHorbach

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 productionInternalRequires API changes or must be handled by Expensify staffTaskWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions