Fix Cmd+K search missing workspace members and blocking selection during loading#87367
Conversation
…ing loading Bug 1: Guarantee a minimum of 5 personalDetails slots in getValidOptions so workspace members without an existing DM report remain visible even when report results consume most of the selection list budget. Bug 2: When options aren't fully initialized but a search query has available results, render them immediately instead of silently omitting the section, so users can select results without waiting for full initialization. Co-authored-by: Yauheni Horbach <ZhenjaHorbach@users.noreply.github.com>
|
@MelvinBot |
|
This PR is already open. Is there something else you'd like me to do with it? |
|
@MelvinBot |
|
@ZhenjaHorbach Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Done — this PR is now marked as ready for review. ✅ |
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari2026-04-10.18.03.17.mov |
|
LGTM! |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #87035 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
🚧 @blimpich has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/blimpich in version: 9.3.59-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. The changes are purely bug fixes to existing Cmd+K search behavior:
Neither change introduces new features, modifies UI labels/settings, or alters any documented user-facing workflow. The existing help articles that mention search reference it only incidentally (e.g., searching for reports, invoices) and are unaffected by these internal fixes. |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.3.59-4 🚀
|
Explanation of Change
Bug 1 — Cmd+K misses workspace members:
getValidOptionscalculates personalDetails slots asmaxElements - reports - workspaceChats, which drops to 0 when reports consume the full budget (50). Workspace members without an existing DM report only exist in the personalDetails list and become invisible. This fix guarantees a minimum of 5 personalDetails slots regardless of how many reports match, so workspace members always have a chance to appear.Bug 2 — Cannot select results during loading: When
areOptionsInitializedis false and the user has typed a search query,SearchAutocompleteListsilently omits the recent chats section — even if results are already available from server search. This fix renders available results immediately when a search query is active, so users can select them without waiting for full initialization.Fixed Issues
$ #87035
PROPOSAL: #87035 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari