@@ -228,66 +228,70 @@ const ComposerPendingUserInputCard = memo(function ComposerPendingUserInputCard(
228228 </ ComposerBanner . Actions >
229229 </ CollapsibleTrigger >
230230 < CollapsiblePanel >
231- < ComposerBanner . Body className = "pe-1 pb-1" >
232- < p className = "text-sm text-foreground/85" > { activeQuestion . question } </ p >
233- { activeQuestion . multiSelect ? (
234- < p className = "mt-1 text-secondary-label text-xs" > Select one or more options.</ p >
235- ) : null }
236- < div className = "mt-2 space-y-0.5" >
237- { activeQuestion . options . map ( ( option , index ) => {
238- const optionValue = option . value ?? option . label ;
239- const isOptimisticallySelected =
240- optimisticSingleSelect ?. questionId === activeQuestion . id &&
241- optimisticSingleSelect . optionValue === optionValue ;
242- const isSelected =
243- isOptimisticallySelected ||
244- ( ! customAnswerActive && progress . selectedOptionValues . includes ( optionValue ) ) ;
245- const shortcutKey = index < 9 ? index + 1 : null ;
246- const className = cn (
247- "group flex w-full items-center gap-2 rounded-md px-2.5 py-2 text-left outline-none transition-colors duration-150 focus-visible:ring-1 focus-visible:ring-primary/25" ,
248- isSelected
249- ? "bg-muted/55 text-foreground"
250- : "bg-transparent text-foreground/85 hover:bg-muted/30" ,
251- isResponding && "opacity-50 cursor-not-allowed" ,
252- ! isResponding && "cursor-pointer" ,
253- ) ;
254- const content = (
255- < >
256- < div className = "min-w-0 flex-1 flex flex-col gap-0.5" >
257- < span className = "text-sm font-medium" > { option . label } </ span >
258- { option . description && option . description !== option . label ? (
259- < span className = "text-secondary-label text-[11px]" > { option . description } </ span >
231+ < ComposerBanner . Scroll >
232+ < ComposerBanner . Body className = "pe-1 pb-1 wrap-anywhere" >
233+ < p className = "text-sm text-foreground/85" > { activeQuestion . question } </ p >
234+ { activeQuestion . multiSelect ? (
235+ < p className = "mt-1 text-secondary-label text-xs" > Select one or more options.</ p >
236+ ) : null }
237+ < div className = "mt-2 space-y-0.5" >
238+ { activeQuestion . options . map ( ( option , index ) => {
239+ const optionValue = option . value ?? option . label ;
240+ const isOptimisticallySelected =
241+ optimisticSingleSelect ?. questionId === activeQuestion . id &&
242+ optimisticSingleSelect . optionValue === optionValue ;
243+ const isSelected =
244+ isOptimisticallySelected ||
245+ ( ! customAnswerActive && progress . selectedOptionValues . includes ( optionValue ) ) ;
246+ const shortcutKey = index < 9 ? index + 1 : null ;
247+ const className = cn (
248+ "group flex w-full items-center gap-2 rounded-md px-2.5 py-2 text-left outline-none transition-colors duration-150 focus-visible:ring-1 focus-visible:ring-primary/25" ,
249+ isSelected
250+ ? "bg-muted/55 text-foreground"
251+ : "bg-transparent text-foreground/85 hover:bg-muted/30" ,
252+ isResponding && "opacity-50 cursor-not-allowed" ,
253+ ! isResponding && "cursor-pointer" ,
254+ ) ;
255+ const content = (
256+ < >
257+ < div className = "min-w-0 flex-1 flex flex-col gap-0.5" >
258+ < span className = "text-sm font-medium" > { option . label } </ span >
259+ { option . description && option . description !== option . label ? (
260+ < span className = "text-secondary-label text-[11px]" >
261+ { option . description }
262+ </ span >
263+ ) : null }
264+ </ div >
265+ { isSelected ? (
266+ < CheckIcon className = "size-3.5 shrink-0 text-primary" />
267+ ) : shortcutKey !== null ? (
268+ < kbd
269+ className = { cn (
270+ "flex size-5 shrink-0 items-center justify-center text-[10px] font-medium text-muted-foreground tabular-nums" ,
271+ ) }
272+ >
273+ { shortcutKey }
274+ </ kbd >
260275 ) : null }
261- </ div >
262- { isSelected ? (
263- < CheckIcon className = "size-3.5 shrink-0 text-primary" />
264- ) : shortcutKey !== null ? (
265- < kbd
266- className = { cn (
267- "flex size-5 shrink-0 items-center justify-center text-[10px] font-medium text-muted-foreground tabular-nums" ,
268- ) }
269- >
270- { shortcutKey }
271- </ kbd >
272- ) : null }
273- </ >
274- ) ;
275- return (
276- < button
277- key = { `${ activeQuestion . id } :${ optionValue } ` }
278- type = "button"
279- disabled = { isResponding }
280- onClick = { ( ) => {
281- handleOptionSelection ( activeQuestion . id , optionValue ) ;
282- } }
283- className = { className }
284- >
285- { content }
286- </ button >
287- ) ;
288- } ) }
289- </ div >
290- </ ComposerBanner . Body >
276+ </ >
277+ ) ;
278+ return (
279+ < button
280+ key = { `${ activeQuestion . id } :${ optionValue } ` }
281+ type = "button"
282+ disabled = { isResponding }
283+ onClick = { ( ) => {
284+ handleOptionSelection ( activeQuestion . id , optionValue ) ;
285+ } }
286+ className = { className }
287+ >
288+ { content }
289+ </ button >
290+ ) ;
291+ } ) }
292+ </ div >
293+ </ ComposerBanner . Body >
294+ </ ComposerBanner . Scroll >
291295 </ CollapsiblePanel >
292296 </ Collapsible >
293297 ) ;
0 commit comments