@@ -137,6 +137,7 @@ type ChatFixtureOptions = {
137137 sessionRailDocked ?: boolean ;
138138 singleAgent ?: boolean ;
139139 slashMenu ?: boolean ;
140+ typingIndicator ?: boolean ;
140141} ;
141142
142143function expectFiniteRect ( rect : Pick < ControlRect , "x" | "y" | "width" | "height" > ) {
@@ -424,6 +425,18 @@ function chatHtml(opts: ChatFixtureOptions = {}, mobileNavLayout = false) {
424425 </openclaw-chat-session-rail>`
425426 : ""
426427 }
428+ ${
429+ opts . crowdedComposerFooter || opts . typingIndicator
430+ ? `<div class="agent-chat__typing-indicator agent-chat__typing-indicator--outside" role="status">
431+ <span class="agent-chat__typing-avatars" aria-hidden="true">
432+ <span class="chat-author-avatar">A</span>
433+ <span class="chat-author-avatar">B</span>
434+ <span class="chat-author-avatar">C</span>
435+ </span>
436+ <span class="agent-chat__typing-text">Alexandria, Bartholomew, and Cassandra are typing</span>
437+ </div>`
438+ : ""
439+ }
427440 <div class="agent-chat__composer-shell">
428441 <div class="agent-chat__input">
429442 ${
@@ -482,18 +495,6 @@ function chatHtml(opts: ChatFixtureOptions = {}, mobileNavLayout = false) {
482495 </div>
483496 <div class="agent-chat__composer-footer">
484497 ${ composerControlsHtml ( opts . crowdedComposerFooter ) }
485- ${
486- opts . crowdedComposerFooter
487- ? `<div class="agent-chat__typing-indicator" role="status">
488- <span class="agent-chat__typing-avatars" aria-hidden="true">
489- <span class="chat-author-avatar">A</span>
490- <span class="chat-author-avatar">B</span>
491- <span class="chat-author-avatar">C</span>
492- </span>
493- <span class="agent-chat__typing-text">Alexandria, Bartholomew, and Cassandra are typing</span>
494- </div>`
495- : ""
496- }
497498 <div class="agent-chat__composer-meta">
498499 <div class="context-usage">
499500 <details>
@@ -2403,7 +2404,7 @@ describeBrowserLayout.concurrent("chat responsive browser layout", () => {
24032404 modelLabel : rectFor ( ".chat-controls__model-trigger .chat-controls__inline-select-label" ) ,
24042405 overrides : rectFor ( ".agent-chat__session-overrides-pill" ) ,
24052406 status : rectFor ( ".agent-chat__composer-run-status" ) ,
2406- typing : rectFor ( ".agent-chat__typing-indicator" ) ,
2407+ typing : rectFor ( ".agent-chat__typing-indicator--outside " ) ,
24072408 } ;
24082409 } ) ;
24092410
@@ -2429,16 +2430,29 @@ describeBrowserLayout.concurrent("chat responsive browser layout", () => {
24292430 [ layout . status , layout . overrides ] ,
24302431 [ layout . overrides , layout . model ] ,
24312432 [ layout . model , layout . effort ] ,
2432- [ layout . effort , layout . typing ] ,
2433- [ layout . typing , layout . meta ] ,
2433+ [ layout . effort , layout . meta ] ,
24342434 ] as const ) {
24352435 expect ( rectsOverlap ( left , right ) ) . toBe ( false ) ;
24362436 }
2437+ expect ( rectsOverlap ( layout . typing , layout . footer ) ) . toBe ( false ) ;
24372438 } finally {
24382439 await closeBrowserPage ( page ) ;
24392440 }
24402441 } ) ;
24412442
2443+ it ( "keeps the desktop model picker fixed when another user starts typing" , async ( ) => {
2444+ const idlePage = await openFixture ( 1366 , 900 ) ;
2445+ const typingPage = await openFixture ( 1366 , 900 , { typingIndicator : true } ) ;
2446+ try {
2447+ const idleModel = await getBoundingBox ( idlePage , ".chat-controls__model-trigger" ) ;
2448+ const typingModel = await getBoundingBox ( typingPage , ".chat-controls__model-trigger" ) ;
2449+
2450+ expect ( typingModel . x ) . toBeCloseTo ( idleModel . x , 0 ) ;
2451+ } finally {
2452+ await Promise . all ( [ closeBrowserPage ( idlePage ) , closeBrowserPage ( typingPage ) ] ) ;
2453+ }
2454+ } ) ;
2455+
24422456 it . each ( [
24432457 [ 320 , 568 ] ,
24442458 [ 393 , 852 ] ,
0 commit comments