@@ -331,7 +331,8 @@ export function SessionDetail() {
331331 const { getForSession : getFormForSession , reply : replyToForm , cancel : cancelForm , syncForSession : syncFormsForSession } = useForms ( ) ;
332332 const currentForm = sessionId ? getFormForSession ( sessionId ) : null ;
333333 const minimizedForm = currentForm && currentForm . id === minimizedFormId ? currentForm : null ;
334- const isFormSheetOpen = isMobile && ! ! currentForm && ! minimizedForm ;
334+ const isFormOpen = ! ! currentForm && ! minimizedForm ;
335+ const isFormSheetOpen = isMobile && isFormOpen ;
335336
336337 const lastAssistantMessage = messages . filter ( m => m . type === 'assistant' ) . at ( - 1 ) ;
337338 const lastAssistantText = getAssistantText ( lastAssistantMessage ) ;
@@ -876,18 +877,20 @@ export function SessionDetail() {
876877 </ div >
877878 { sessionDirectory && ! isEditingMessage && (
878879 < div
879- ref = { promptOverlayRef }
880880 data-testid = "prompt-overlay"
881881 className = { cn (
882882 "absolute left-0 right-0 flex justify-center" ,
883- isFormSheetOpen && "top-0 flex-col items-center justify-start " ,
883+ isFormOpen && "top-0 flex-col items-center justify-end pointer-events-none md:pt-3 " ,
884884 ) }
885885 style = { { bottom : inputBottomOffset } }
886886 >
887887 < div
888+ ref = { promptOverlayRef }
888889 className = { cn (
889- "relative" ,
890- isFormSheetOpen ? "flex w-full flex-1 min-h-0 flex-col" : "w-[94%] md:max-w-4xl" ,
890+ "relative pointer-events-auto" ,
891+ isFormSheetOpen
892+ ? "flex w-full flex-1 min-h-0 flex-col"
893+ : cn ( "w-[94%] md:max-w-4xl" , isFormOpen && "flex max-h-full min-h-0 flex-col" ) ,
891894 ) }
892895 >
893896 { ! isFormSheetOpen && (
@@ -945,7 +948,7 @@ export function SessionDetail() {
945948 onAskSideQuestion = { ( ) => handleAskSideQuestion ( '' ) }
946949 />
947950 ) }
948- < div className = { cn ( isFormSheetOpen && "shrink-0 px-[3%]" ) } >
951+ < div className = { cn ( isFormSheetOpen && "shrink-0 bg-background px-[3%]" ) } >
949952 < SessionSendErrorBanner sessionId = { sessionId } isConnected = { streamConnected } isReconnecting = { streamReconnecting } />
950953 < SessionGoalBar sessionID = { sessionId } />
951954 < BackgroundWorkBar
0 commit comments