From 8234bfed71c175bbdfd54388ffe89e1a70f5e03e Mon Sep 17 00:00:00 2001 From: Alan Trebugeais Date: Thu, 7 May 2026 11:36:12 +0200 Subject: [PATCH] SourceSelector aria copilot comment --- src/components/launch/SourceSelector.tsx | 65 ++++++++++++++---------- 1 file changed, 37 insertions(+), 28 deletions(-) diff --git a/src/components/launch/SourceSelector.tsx b/src/components/launch/SourceSelector.tsx index 73ea5a79..f642953b 100644 --- a/src/components/launch/SourceSelector.tsx +++ b/src/components/launch/SourceSelector.tsx @@ -314,36 +314,45 @@ export const SourceSelector = React.memo(function SourceSelector({ } }, [isAutonomous, internalOpen]); + const trigger = children ? ( + React.isValidElement(children) ? ( + React.cloneElement(children as React.ReactElement, { + onPointerEnter: prefetchSources, + onFocusCapture: prefetchSources, + }) + ) : ( + children + ) + ) : ( + + ); + return ( - -
- {children || ( - - )} -
-
+ {trigger}