fix(home): restore folder search in @-mention and plus-menu dropdown (#4403)

This commit is contained in:
Waleed
2026-05-02 09:11:03 -07:00
committed by GitHub
parent db05297069
commit 7601fb4d8f
3 changed files with 6 additions and 7 deletions
@@ -80,13 +80,12 @@ export const PlusMenuDropdown = React.memo(
const q = rawQuery.toLowerCase().trim()
// In mention mode always render a flat filtered list — empty query = show everything.
if (!isMention && !q) return null
// Folders organize resources but aren't a valid mention/insertable target — drop them
// from the flat list (matches the nested rendering, which also excludes them).
const flatGroups = availableResources.filter(({ type }) => type !== 'folder')
if (isMention && !q) {
return flatGroups.flatMap(({ type, items }) => items.map((item) => ({ type, item })))
return availableResources.flatMap(({ type, items }) =>
items.map((item) => ({ type, item }))
)
}
return flatGroups.flatMap(({ type, items }) =>
return availableResources.flatMap(({ type, items }) =>
items.filter((item) => item.name.toLowerCase().includes(q)).map((item) => ({ type, item }))
)
}, [isMention, mentionQuery, search, availableResources])
@@ -554,7 +554,7 @@ export function FolderItem({
</span>
{folder.locked && (
<Lock
className='h-[12px] w-[12px] flex-shrink-0 pointer-events-none text-[var(--text-icon)]'
className='pointer-events-none h-[12px] w-[12px] flex-shrink-0 text-[var(--text-icon)]'
aria-label='Folder is locked'
/>
)}
@@ -470,7 +470,7 @@ export function WorkflowItem({
)}
{!isEditing && workflow.locked && (
<Lock
className='h-[12px] w-[12px] flex-shrink-0 pointer-events-none text-[var(--text-icon)]'
className='pointer-events-none h-[12px] w-[12px] flex-shrink-0 text-[var(--text-icon)]'
aria-label='Workflow is locked'
/>
)}