@@ -76,7 +76,6 @@ pub fn draw(frame: &mut Frame<'_>, app: &mut App, images: &mut ImageRuntime) {
7676 let show_start = frame. area ( ) . width >= 20
7777 && available_start_prompt_rows >= START_MIN_PROMPT_ROWS
7878 && app. blocks . is_empty ( )
79- && !app. show_agents ( )
8079 && app. pending_steers . is_empty ( )
8180 && !app. show_logs ;
8281
@@ -486,12 +485,9 @@ fn draw_start(frame: &mut Frame<'_>, app: &App, width: u16, prompt_rows: u16) {
486485}
487486
488487fn body_layout ( area : Rect , show_agents : bool , transcript_empty : bool ) -> ( Rect , Option < Rect > ) {
489- if !show_agents {
488+ if !show_agents || transcript_empty {
490489 return ( area, None ) ;
491490 }
492- if transcript_empty {
493- return ( Rect :: new ( area. x , area. y , area. width , 0 ) , Some ( area) ) ;
494- }
495491 let [ transcript, agents] = if area. width >= SIDE_BY_SIDE_WIDTH {
496492 Layout :: horizontal ( [ Constraint :: Min ( 40 ) , Constraint :: Length ( AGENTS_WIDTH ) ] ) . areas ( area)
497493 } else {
@@ -1974,6 +1970,7 @@ mod tests {
19741970 fn agents_layout_obeys_hidden_and_107_108_boundaries ( ) {
19751971 let area_107 = ratatui:: layout:: Rect :: new ( 2 , 3 , 107 , 20 ) ;
19761972 assert_eq ! ( body_layout( area_107, false , false ) , ( area_107, None ) ) ;
1973+ assert_eq ! ( body_layout( area_107, true , true ) , ( area_107, None ) ) ;
19771974 assert_eq ! (
19781975 body_layout( area_107, true , false ) ,
19791976 (
@@ -2246,15 +2243,16 @@ mod tests {
22462243 }
22472244
22482245 #[ test]
2249- fn agents_panel_is_visible_before_the_first_transcript_block ( ) {
2246+ fn agents_panel_is_hidden_before_the_first_transcript_block ( ) {
22502247 let mut app = panel_app ( 1 ) ;
22512248 assert ! ( app. blocks. is_empty( ) ) ;
22522249 app. handle_key ( KeyEvent :: new ( KeyCode :: Char ( 'r' ) , KeyModifiers :: CONTROL ) ) ;
22532250
22542251 for ( width, height) in [ ( 120 , 30 ) , ( 80 , 12 ) ] {
22552252 let screen = render ( & mut app, width, height) ;
2256- assert ! ( screen. contains( "agent roster" ) , "{screen}" ) ;
2257- assert ! ( screen. contains( "Scout 0" ) , "{screen}" ) ;
2253+ assert ! ( screen. contains( "█▀▄ █ █▄" ) , "{screen}" ) ;
2254+ assert ! ( !screen. contains( "agent roster" ) , "{screen}" ) ;
2255+ assert ! ( !screen. contains( "Scout 0" ) , "{screen}" ) ;
22582256 }
22592257 }
22602258
0 commit comments