@@ -79,7 +79,7 @@ import {
7979 type ComposerTaskStep ,
8080 type ComposerTasksProgress ,
8181} from "./ComposerTasksBadge" ;
82- import { ComposerActivityRow , type ComposerActivityStatus } from "./ComposerActivityStatus " ;
82+ import { ThreadSyncStatusPill } from "./ThreadSyncStatusPill " ;
8383import type { ThreadSyncPhase } from "../../threadSync" ;
8484import { ComposerBanner } from "./ComposerBanner" ;
8585import { ComposerSurface } from "./ComposerSurface" ;
@@ -768,6 +768,8 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
768768 respondingRequestIds,
769769 showPlanFollowUpPrompt,
770770 activeProposedPlan,
771+ activeTasksProgress,
772+ activeTaskSteps,
771773 runtimeMode,
772774 interactionMode,
773775 lockedProvider,
@@ -808,8 +810,6 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
808810 onFileOpen,
809811 openingVideoAttachmentId,
810812 } = props ;
811- const activeTasksProgress = props . threadSyncPhase === null ? props . activeTasksProgress : null ;
812- const activeTaskSteps = props . threadSyncPhase === null ? props . activeTaskSteps : null ;
813813 // ------------------------------------------------------------------
814814 // Store subscriptions (prompt / images / terminal contexts)
815815 // ------------------------------------------------------------------
@@ -2855,17 +2855,14 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
28552855 const toggleTasksDrawer = useCallback ( ( ) => {
28562856 setIsTasksDrawerOpen ( ( open ) => ! open ) ;
28572857 } , [ ] ) ;
2858- const activityStatus = useMemo < ComposerActivityStatus | undefined > (
2859- ( ) => ( props . threadSyncPhase ? { kind : "sync" , phase : props . threadSyncPhase } : undefined ) ,
2860- [ props . threadSyncPhase ] ,
2861- ) ;
28622858 const hasBannerItems = props . bannerItems . length > 0 ;
2859+ const hasAttachedNotice = hasBannerItems || props . threadSyncPhase !== null ;
28632860 const hasBlockingComposerTopDrawer =
28642861 activePendingApproval !== null || pendingUserInputs . length > 0 ;
28652862 const showInlineStashBadge =
28662863 stashQueue . length > 0 &&
28672864 ! isComposerApprovalState &&
2868- ( hasBannerItems || showComposerTopDrawer || isTasksDrawerOpen || isMobileViewport ) ;
2865+ ( hasAttachedNotice || showComposerTopDrawer || isTasksDrawerOpen || isMobileViewport ) ;
28692866 const inlineStashBadge = showInlineStashBadge ? (
28702867 < ComposerStashBadge
28712868 count = { stashQueue . length }
@@ -2881,56 +2878,46 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
28812878 activeTaskSteps !== null &&
28822879 ! isTasksDrawerOpen &&
28832880 ! hasBlockingComposerTopDrawer &&
2884- ( hasBannerItems || showComposerTopDrawer || isComposerCollapsedMobile ) ;
2881+ ( hasAttachedNotice || showComposerTopDrawer || isComposerCollapsedMobile ) ;
28852882 const inlineTasksBadge = showInlineTasksBadge ? (
28862883 < ComposerTasksBadge
28872884 expanded = { false }
28882885 onToggle = { toggleTasksDrawer }
28892886 placement = "inline"
28902887 progress = { activeTasksProgress }
28912888 steps = { activeTaskSteps }
2892- activityStatus = { activityStatus }
28932889 />
28942890 ) : null ;
28952891 const showShoulderTabs =
2896- ! hasBannerItems && ! showComposerTopDrawer && ! isTasksDrawerOpen && ! isComposerCollapsedMobile ;
2892+ ! hasAttachedNotice &&
2893+ ! showComposerTopDrawer &&
2894+ ! isTasksDrawerOpen &&
2895+ ! isComposerCollapsedMobile ;
28972896 const hasShoulderTab =
28982897 showShoulderTabs &&
2899- ( activityStatus !== undefined ||
2900- ( stashQueue . length > 0 && ! showInlineStashBadge ) ||
2898+ ( ( stashQueue . length > 0 && ! showInlineStashBadge ) ||
29012899 ( activeTasksProgress !== null &&
29022900 activeTaskSteps !== null &&
29032901 activeTasksProgress . totalSteps > 0 ) ) ;
2904- const tasksHostActivityStatus =
2905- activeTasksProgress !== null &&
2906- activeTasksProgress . totalSteps > 0 &&
2907- activeTaskSteps !== null &&
2908- ! hasBlockingComposerTopDrawer &&
2909- ( showShoulderTabs || showInlineTasksBadge || isTasksDrawerOpen ) ;
2910- const standaloneActivityStatus = ! tasksHostActivityStatus ? activityStatus : undefined ;
2911- const activityStackContent = hasBannerItems ? (
2912- ! hasBlockingComposerTopDrawer && activeTasksProgress && activeTaskSteps ? (
2902+ const tasksStackContent =
2903+ hasBannerItems && ! hasBlockingComposerTopDrawer && activeTasksProgress && activeTaskSteps ? (
29132904 < ComposerTasksContent
29142905 expanded = { isTasksDrawerOpen }
29152906 onToggle = { toggleTasksDrawer }
29162907 progress = { activeTasksProgress }
29172908 steps = { activeTaskSteps }
2918- activityStatus = { activityStatus }
29192909 />
2920- ) : activityStatus ? (
2921- < ComposerActivityRow status = { activityStatus } />
2922- ) : null
2923- ) : null ;
2924- const activityStackItem : ComposerBannerStackContent | null = activityStackContent
2910+ ) : null ;
2911+ const tasksStackItem : ComposerBannerStackContent | null = tasksStackContent
29252912 ? {
29262913 id : "composer-activity" ,
29272914 variant : "default" ,
29282915 priority : "activity" ,
2929- content : activityStackContent ,
2916+ content : tasksStackContent ,
29302917 }
29312918 : null ;
2932- const bannerStackItems = activityStackItem
2933- ? [ ...props . bannerItems , activityStackItem ]
2919+ const bannerStackItems = tasksStackItem
2920+ ? [ ...props . bannerItems , tasksStackItem ]
29342921 : props . bannerItems ;
29352922 useEffect ( ( ) => {
29362923 if ( activeTasksProgress === null || activeTaskSteps === null ) {
@@ -3463,14 +3450,11 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
34633450 data-chat-composer-form = "true"
34643451 >
34653452 < ComposerBannerStack key = { activeThreadId } className = "relative z-0" items = { bannerStackItems } />
3466- { ! activityStackItem &&
3467- ( inlineTasksBadge || ( standaloneActivityStatus && ! showShoulderTabs ) ) ? (
3453+ { props . threadSyncPhase ? < ThreadSyncStatusPill phase = { props . threadSyncPhase } /> : null }
3454+ { ! tasksStackItem && inlineTasksBadge ? (
34683455 < ComposerBanner . Attachment >
34693456 < ComposerBanner . Root data-chat-composer-activity-strip = "true" >
3470- { inlineTasksBadge ??
3471- ( standaloneActivityStatus ? (
3472- < ComposerActivityRow status = { standaloneActivityStatus } />
3473- ) : null ) }
3457+ { inlineTasksBadge }
34743458 </ ComposerBanner . Root >
34753459 </ ComposerBanner . Attachment >
34763460 ) : null }
@@ -3579,7 +3563,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
35793563 </ ComposerBanner . Root >
35803564 </ ComposerBanner . Attachment >
35813565 ) : null }
3582- { ! activityStackItem &&
3566+ { ! tasksStackItem &&
35833567 isTasksDrawerOpen &&
35843568 ! hasBlockingComposerTopDrawer &&
35853569 activeTasksProgress &&
@@ -3588,23 +3572,16 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
35883572 onCollapse = { toggleTasksDrawer }
35893573 progress = { activeTasksProgress }
35903574 steps = { activeTaskSteps }
3591- activityStatus = { activityStatus }
35923575 />
35933576 ) : null }
35943577 { hasShoulderTab ? (
35953578 < ComposerBanner . Dock >
3596- { standaloneActivityStatus ? (
3597- < ComposerBanner . Root width = "content" data-composer-shoulder-tab >
3598- < ComposerActivityRow status = { standaloneActivityStatus } />
3599- </ ComposerBanner . Root >
3600- ) : null }
36013579 { activeTasksProgress && activeTaskSteps ? (
36023580 < ComposerTasksBadge
36033581 expanded = { false }
36043582 onToggle = { toggleTasksDrawer }
36053583 progress = { activeTasksProgress }
36063584 steps = { activeTaskSteps }
3607- activityStatus = { activityStatus }
36083585 />
36093586 ) : null }
36103587 { ! showInlineStashBadge ? (
0 commit comments