@@ -1934,6 +1934,8 @@ function ChatViewContent(props: ChatViewProps) {
19341934 items . push ( {
19351935 id : `environment-unavailable:${ activeEnvironmentUnavailableState . environmentId } ` ,
19361936 variant : "default" ,
1937+ // Live connection status: calm styling, but it must front the stack.
1938+ urgent : true ,
19371939 icon : (
19381940 < span
19391941 className = "size-1.5 animate-status-pulse rounded-full bg-foreground"
@@ -1988,6 +1990,9 @@ function ChatViewContent(props: ChatViewProps) {
19881990 items . push ( {
19891991 id : `server-version:${ serverUpdateEnvironmentId } ` ,
19901992 variant : updateFailed ? "error" : "default" ,
1993+ // A running update is live progress the user is waiting on; only the
1994+ // idle "update available" offer is calm enough to stack behind.
1995+ urgent : updateInProgress ,
19911996 // In-flight and failed states carry their own status dot inside
19921997 // ServerUpdateProgress; only the idle offer needs an icon.
19931998 icon :
@@ -4372,12 +4377,12 @@ function ChatViewContent(props: ChatViewProps) {
43724377 } ;
43734378 } , [ acknowledgeActiveThreadWoke , activeThread ?. id , activeThreadWokeVisible ] ) ;
43744379 // The stack renders items[0] front-most and tucks the rest behind hover, so
4375- // ordering is priority: urgent system banners (connection down, update
4376- // failed), then background liveness — its Stop button is the only stop
4377- // affordance for settled turns, so a calm "update available" notice must not
4378- // cover it — then calm system banners, the woke and branch-mismatch
4379- // notices, and the informational parked-thread banner last — it must never
4380- // cover another.
4380+ // ordering is priority: urgent system banners (error/warning variants plus
4381+ // calm-styled live states flagged `urgent`, like update progress), then
4382+ // background liveness — its Stop button is the only stop affordance for
4383+ // settled turns, so a passive "update available" notice must not cover it —
4384+ // then calm system banners, the woke and branch-mismatch notices, and the
4385+ // informational parked-thread banner last — it must never cover another.
43814386 const parkedThreadBannerItem = useMemo < ComposerBannerStackItem | null > ( ( ) => {
43824387 if ( ! activeThreadSnoozed && ! activeThreadSettled ) {
43834388 return null ;
@@ -4427,12 +4432,10 @@ function ChatViewContent(props: ChatViewProps) {
44274432 void handleSwitchCheckoutToThread ( ) ;
44284433 } , [ gitStatusQuery . data ?. hasWorkingTreeChanges , handleSwitchCheckoutToThread ] ) ;
44294434 const composerBannerItems = useMemo < ComposerBannerStackItem [ ] > ( ( ) => {
4430- const urgentSystemItems = systemComposerBannerItems . filter (
4431- ( item ) => item . variant === "error" || item . variant === "warning" ,
4432- ) ;
4433- const calmSystemItems = systemComposerBannerItems . filter (
4434- ( item ) => item . variant !== "error" && item . variant !== "warning" ,
4435- ) ;
4435+ const isUrgentSystemItem = ( item : ComposerBannerStackItem ) =>
4436+ item . urgent === true || item . variant === "error" || item . variant === "warning" ;
4437+ const urgentSystemItems = systemComposerBannerItems . filter ( isUrgentSystemItem ) ;
4438+ const calmSystemItems = systemComposerBannerItems . filter ( ( item ) => ! isUrgentSystemItem ( item ) ) ;
44364439 const backgroundLivenessItems =
44374440 backgroundLivenessBannerItem === null ? [ ] : [ backgroundLivenessBannerItem ] ;
44384441 const wokeThreadItems = wokeThreadBannerItem === null ? [ ] : [ wokeThreadBannerItem ] ;
0 commit comments