handleUseSelected only searched groupedItems (root library), so picks made
while browsing inside a folder — which live in folderGroupedItems — resolved
to nothing and an empty array was passed to onUseSelected. Search both
sources, deduping by id, so folder selections attach correctly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QHuXphfFqpLsrMHrSy8GAF