refactor: enhance inline mention editor and prompt picker UI with improved trigger handling and loading states

This commit is contained in:
Anish Sarkar 2026-04-14 00:10:57 +05:30
parent ec27807644
commit ae3d254a2c
3 changed files with 117 additions and 94 deletions

View file

@ -394,12 +394,6 @@ export const DocumentMentionPicker = forwardRef<
[selectableDocuments, highlightedIndex, handleSelectDocument, onDone]
);
// Hide popup when there are no documents to display (regardless of fetch state)
// Search continues in background; popup reappears when results arrive
if (!actualLoading && actualDocuments.length === 0) {
return null;
}
return (
<div
className="fixed shadow-2xl rounded-lg border border-border dark:border-white/5 overflow-hidden bg-popover dark:bg-neutral-900 flex flex-col w-[280px] sm:w-[320px] select-none"
@ -547,7 +541,11 @@ export const DocumentMentionPicker = forwardRef<
</div>
)}
</div>
) : null}
) : (
<div className="py-1 px-2">
<p className="px-3 py-2 text-xs text-muted-foreground">No matching documents</p>
</div>
)}
</div>
</div>
);