@@ -26,6 +26,8 @@ import type {
2626 UserInputQuestion ,
2727} from "@t3tools/contracts" ;
2828import * as Haptics from "expo-haptics" ;
29+ import { BlurTargetView } from "expo-blur" ;
30+ import { GlassBlurTargetContext } from "../../lib/glassBlurTarget" ;
2931import {
3032 memo ,
3133 useCallback ,
@@ -807,7 +809,7 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
807809 } , [ freeze , scrollMessageToEnd ] ) ;
808810
809811 const showScrollToEndButton = contentPresentationKind === "ready" && ! endFollowEnabled ;
810- const { themeAppearance } = useAppearancePreferences ( ) ;
812+ const { themeAppearance, materialYouStyleLayoutActive } = useAppearancePreferences ( ) ;
811813 const isDarkMode = themeAppearance === "dark" ;
812814
813815 const handleFeedTouchStart = useCallback ( ( event : GestureResponderEvent ) => {
@@ -839,17 +841,27 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
839841 const handleFeedTouchCancel = useCallback ( ( ) => {
840842 feedTouchStartRef . current = null ;
841843 } , [ ] ) ;
844+ const feedBlurTarget = useRef < View > ( null ) ;
842845
843846 return (
844847 < View className = "flex-1" >
845848 { showContent ? (
846- < View
847- className = "flex-1"
849+ < BlurTargetView
850+ ref = { feedBlurTarget }
851+ style = { { flex : 1 } }
848852 onTouchStart = { handleFeedTouchStart }
849853 onTouchMove = { handleFeedTouchMove }
850854 onTouchEnd = { handleFeedTouchEnd }
851855 onTouchCancel = { handleFeedTouchCancel }
852856 >
857+ < View
858+ pointerEvents = "none"
859+ className = {
860+ materialYouStyleLayoutActive
861+ ? "absolute inset-0 bg-thread-canvas"
862+ : "absolute inset-0 bg-screen"
863+ }
864+ />
853865 < ThreadFeed
854866 key = { selectedThreadKey }
855867 environmentId = { props . environmentId }
@@ -881,7 +893,7 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
881893 onUseArtifactTemplate = { handleUseArtifactTemplate }
882894 loadEarlier = { props . loadEarlier ?? null }
883895 />
884- </ View >
896+ </ BlurTargetView >
885897 ) : (
886898 < View className = "flex-1" />
887899 ) }
@@ -1003,41 +1015,43 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
10031015 : undefined
10041016 }
10051017 >
1006- < ThreadComposer
1007- editorRef = { composerEditorRef }
1008- draftMessage = { props . draftMessage }
1009- draftAttachments = { props . draftAttachments }
1010- placeholder = "Ask the repo agent, or run a command…"
1011- contentMaxWidth = { contentMaxWidth }
1012- connectionState = { props . connectionStateLabel }
1013- environmentLabel = { props . environmentLabel }
1014- selectedThread = { props . selectedThread }
1015- hasCompactableConversation = { hasCompactableConversation && ! props . isCompacting }
1016- serverConfig = { props . serverConfig }
1017- queueCount = { props . selectedThreadQueueCount }
1018- environmentId = { props . environmentId }
1019- projectCwd = { props . threadCwd ?? props . projectWorkspaceRoot }
1020- // Follow-ups typed during setup wait in the draft: queueing
1021- // them against a thread id the server may still reject
1022- // would strand them in the outbox.
1023- sendBlockedReason = {
1024- props . creationState ?. kind === "preparing" ? "Starting the task…" : null
1025- }
1026- bottomInset = { composerBottomInset }
1027- onChangeDraftMessage = { props . onChangeDraftMessage }
1028- onPickDraftMedia = { props . onPickDraftMedia }
1029- onPickDraftFiles = { props . onPickDraftFiles }
1030- onNativePasteImages = { props . onNativePasteImages }
1031- onRemoveDraftImage = { props . onRemoveDraftImage }
1032- onStopThread = { props . onStopThread }
1033- onSendMessage = { handleSendMessage }
1034- onShowUsageLimits = { showUsageLimits }
1035- onUpdateModelSelection = { props . onUpdateThreadModelSelection }
1036- onUpdateRuntimeMode = { props . onUpdateThreadRuntimeMode }
1037- onUpdateInteractionMode = { props . onUpdateThreadInteractionMode }
1038- onExpandedChange = { setComposerExpanded }
1039- onEditorFocusChange = { handleComposerFocusChange }
1040- />
1018+ < GlassBlurTargetContext value = { feedBlurTarget } >
1019+ < ThreadComposer
1020+ editorRef = { composerEditorRef }
1021+ draftMessage = { props . draftMessage }
1022+ draftAttachments = { props . draftAttachments }
1023+ placeholder = "Ask the repo agent, or run a command…"
1024+ contentMaxWidth = { contentMaxWidth }
1025+ connectionState = { props . connectionStateLabel }
1026+ environmentLabel = { props . environmentLabel }
1027+ selectedThread = { props . selectedThread }
1028+ hasCompactableConversation = { hasCompactableConversation && ! props . isCompacting }
1029+ serverConfig = { props . serverConfig }
1030+ queueCount = { props . selectedThreadQueueCount }
1031+ environmentId = { props . environmentId }
1032+ projectCwd = { props . threadCwd ?? props . projectWorkspaceRoot }
1033+ // Follow-ups typed during setup wait in the draft: queueing
1034+ // them against a thread id the server may still reject
1035+ // would strand them in the outbox.
1036+ sendBlockedReason = {
1037+ props . creationState ?. kind === "preparing" ? "Starting the task…" : null
1038+ }
1039+ bottomInset = { composerBottomInset }
1040+ onChangeDraftMessage = { props . onChangeDraftMessage }
1041+ onPickDraftMedia = { props . onPickDraftMedia }
1042+ onPickDraftFiles = { props . onPickDraftFiles }
1043+ onNativePasteImages = { props . onNativePasteImages }
1044+ onRemoveDraftImage = { props . onRemoveDraftImage }
1045+ onStopThread = { props . onStopThread }
1046+ onSendMessage = { handleSendMessage }
1047+ onShowUsageLimits = { showUsageLimits }
1048+ onUpdateModelSelection = { props . onUpdateThreadModelSelection }
1049+ onUpdateRuntimeMode = { props . onUpdateThreadRuntimeMode }
1050+ onUpdateInteractionMode = { props . onUpdateThreadInteractionMode }
1051+ onExpandedChange = { setComposerExpanded }
1052+ onEditorFocusChange = { handleComposerFocusChange }
1053+ />
1054+ </ GlassBlurTargetContext >
10411055 </ View >
10421056 </ View >
10431057 </ Animated . View >
0 commit comments