-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewHas a PR in reviewWeeklyKSv2KSv2
Description
Description
Typing into the Inbox search (SearchRouter) freezes the JS thread on mobile. The native back gesture and native scrolling still work, but all JS-driven interactions (navigation buttons, virtualization recalculation) become unresponsive.
Steps to Reproduce
- Open the app on a mobile device (iOS or Android)
- Tap the search icon in the Inbox
- Start typing a search query
- Observe that the UI becomes unresponsive
Expected Behavior
Search input should remain responsive while filtering results, with no perceptible lag or JS thread blocking.
Actual Behavior
The JS thread freezes. Navigation buttons stop working, virtualization bounds don't recalculate. Only native gestures (back swipe, scroll) continue to work.
Root Cause
autocompleteQueryValue in SearchRouter.tsx updates immediately on every keystroke (only textInputValue is debounced). This triggers synchronous re-computation of:
getSearchOptions()-- filters all reports/personal detailsisSearchStringMatch()-- creates RegExp per word per itemcombineOrderingOfReportsAndPersonalDetails()-- sorts results- Multiple
.filter()chains on tags, categories, currencies, participants
Suggested Fixes
- Debounce
autocompleteQueryValue(or the prop passed toSearchAutocompleteList) so filtering doesn't run on every keystroke - Memoize
searchOptionsandrecentReportsOptionswith stable dependencies - Optimize
isSearchStringMatch-- reuse compiled RegExp objects instead of creating new ones per iteration - Consider moving heavy filtering off the JS thread (InteractionManager, web worker, or native module)
Platform
- iOS
- Android
- Web (likely affected but less severe)
Reporter
Chuck (Slack thread)
Issue Owner
Current Issue Owner: @rafaelafonsoUpwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022025920563596911295
- Upwork Job ID: 2025920563596911295
- Last Price Increase: 2026-03-02
- Automatic offers:
- aimane-chnaif | Reviewer | 110717229
Reactions are currently unavailable
Metadata
Metadata
Labels
BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewHas a PR in reviewWeeklyKSv2KSv2
Type
Projects
Status
LOW