Slack thread: https://expensify.slack.com/archives/C05LX9D6E07/p1775170058986479
Bug 1: Cmd+K fails to show workspace members you haven't recently chatted with
Expected: When searching Cmd+K, workspace members should always appear in results immediately from locally cached personalDetails.
Actual: Sometimes searching for a workspace member you haven't chatted with recently returns other results instead. After ~300ms, the server search backfills and the person appears — but they should have been found locally.
Root cause analysis
Frontend — hard cap of 20 results starves personalDetails slots:
getValidOptions (src/libs/OptionsListUtils/index.ts) calculates:
maxPersonalDetailsElements = Math.max(20 - recentReportOptions.length - workspaceChats.length - ..., 0)
If the search term matches 20+ reports, zero personalDetails slots remain. A workspace member with no existing DM report only exists in the personalDetails list and becomes completely invisible. The server search then returns their DM report 300ms later, making them appear — exactly matching the reported behavior.
Additional contributing factors:
- Asymmetric search fields — report search checks
report.text + report.login, while personalDetail search also checks displayName and login-without-domain. A name match on personalDetails can be invisible if report search consumed all 20 slots.
- Over-aggressive deduplication —
filteredPersonalDetailsOfRecentReports removes personalDetails entries sharing a login with any recent report, even if that report didn't match the search query.
Backend — OpenApp personalDetails query can miss workspace members:
The OpenApp command builds personalDetails via a UNION query (Account::runPersonalDetailsQuery). This can miss members when:
disableAttendeeList filter — policies with this setting exclude ALL their members from the personalDetails response.
- Race condition with new members — if a member was just added and the
sharedNameValuePairs row hasn't propagated, they're missing.
- Parallel thread failures —
collectSearchTodosData runs in parallel threads merging into personalDetailsList, with catch blocks that silently swallow exceptions.
Bug 2: Cannot select a Cmd+K result until the loading spinner finishes
Expected: When a search result appears in Cmd+K, it should be immediately selectable.
Actual: After finding a chat in Cmd+K results, the user cannot select it until a loading spinner completes. This creates unnecessary friction — if the result is already displayed, it should be interactive.
Platforms
All platforms (Cmd+K / Ctrl+K search).
Issue Owner
Current Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022041502286489838422
- Upwork Job ID: 2041502286489838422
- Last Price Increase: 2026-04-07
Slack thread: https://expensify.slack.com/archives/C05LX9D6E07/p1775170058986479
Bug 1: Cmd+K fails to show workspace members you haven't recently chatted with
Expected: When searching Cmd+K, workspace members should always appear in results immediately from locally cached
personalDetails.Actual: Sometimes searching for a workspace member you haven't chatted with recently returns other results instead. After ~300ms, the server search backfills and the person appears — but they should have been found locally.
Root cause analysis
Frontend — hard cap of 20 results starves personalDetails slots:
getValidOptions(src/libs/OptionsListUtils/index.ts) calculates:If the search term matches 20+ reports, zero personalDetails slots remain. A workspace member with no existing DM report only exists in the personalDetails list and becomes completely invisible. The server search then returns their DM report 300ms later, making them appear — exactly matching the reported behavior.
Additional contributing factors:
report.text + report.login, while personalDetail search also checksdisplayNameandlogin-without-domain. A name match on personalDetails can be invisible if report search consumed all 20 slots.filteredPersonalDetailsOfRecentReportsremoves personalDetails entries sharing a login with any recent report, even if that report didn't match the search query.Backend — OpenApp personalDetails query can miss workspace members:
The
OpenAppcommand builds personalDetails via a UNION query (Account::runPersonalDetailsQuery). This can miss members when:disableAttendeeListfilter — policies with this setting exclude ALL their members from the personalDetails response.sharedNameValuePairsrow hasn't propagated, they're missing.collectSearchTodosDataruns in parallel threads merging intopersonalDetailsList, with catch blocks that silently swallow exceptions.Bug 2: Cannot select a Cmd+K result until the loading spinner finishes
Expected: When a search result appears in Cmd+K, it should be immediately selectable.
Actual: After finding a chat in Cmd+K results, the user cannot select it until a loading spinner completes. This creates unnecessary friction — if the result is already displayed, it should be interactive.
Platforms
All platforms (Cmd+K / Ctrl+K search).
Issue Owner
Current Issue Owner: @mallenexpensifyUpwork Automation - Do Not Edit