@@ -285,12 +285,6 @@ impl SessionBootSurface {
285285 budget,
286286 )
287287 }
288-
289- #[ must_use]
290- pub fn activity_chip ( & self , locale : Locale , budget : usize ) -> Option < String > {
291- self . activity_notice ( locale, budget)
292- . map ( |notice| notice. text )
293- }
294288}
295289
296290fn activity_notice_from_candidates (
@@ -414,7 +408,12 @@ mod tests {
414408 let surface =
415409 SessionBootSurface :: from_parts ( None , false , & [ ] , 0 , PluginBootSummary :: default ( ) ) ;
416410 assert_eq ! ( surface. phase, SessionBootPhase :: Hidden ) ;
417- assert ! ( surface. activity_chip( Locale :: En , 80 ) . is_none( ) ) ;
411+ assert ! (
412+ surface
413+ . activity_notice( Locale :: En , 80 )
414+ . map( |notice| notice. text)
415+ . is_none( )
416+ ) ;
418417 }
419418
420419 #[ test]
@@ -488,11 +487,17 @@ mod tests {
488487 } )
489488 ) ;
490489 assert_eq ! (
491- surface. activity_chip( Locale :: En , 22 ) . as_deref( ) ,
490+ surface
491+ . activity_notice( Locale :: En , 22 )
492+ . map( |notice| notice. text)
493+ . as_deref( ) ,
492494 Some ( "Plugins · Problems: 1" )
493495 ) ;
494496 assert_eq ! (
495- surface. activity_chip( Locale :: En , 12 ) . as_deref( ) ,
497+ surface
498+ . activity_notice( Locale :: En , 12 )
499+ . map( |notice| notice. text)
500+ . as_deref( ) ,
496501 Some ( "Plugins · 1" )
497502 ) ;
498503 }
@@ -532,7 +537,10 @@ mod tests {
532537 assert_eq ! ( surface. phase, SessionBootPhase :: Booting ) ;
533538 assert_eq ! ( surface. servers. len( ) , 1 ) ;
534539 assert_eq ! ( surface. servers[ 0 ] . state, McpServerBootState :: Connecting ) ;
535- let chip = surface. activity_chip ( Locale :: En , 80 ) . expect ( "chip" ) ;
540+ let chip = surface
541+ . activity_notice ( Locale :: En , 80 )
542+ . map ( |notice| notice. text )
543+ . expect ( "chip" ) ;
536544 assert ! ( chip. contains( "alpha" ) , "{chip}" ) ;
537545 assert ! ( !chip. to_ascii_lowercase( ) . contains( "slack" ) , "{chip}" ) ;
538546 }
@@ -557,7 +565,10 @@ mod tests {
557565 PluginBootSummary :: default ( ) ,
558566 ) ;
559567 assert_eq ! ( surface. phase, SessionBootPhase :: Booting ) ;
560- let chip = surface. activity_chip ( Locale :: En , 80 ) . expect ( "chip" ) ;
568+ let chip = surface
569+ . activity_notice ( Locale :: En , 80 )
570+ . map ( |notice| notice. text )
571+ . expect ( "chip" ) ;
561572 assert ! ( chip. contains( "4 connecting" ) , "{chip}" ) ;
562573 assert ! ( chip. contains( "alpha" ) , "{chip}" ) ;
563574 assert ! ( chip. contains( "docs" ) , "{chip}" ) ;
@@ -621,7 +632,10 @@ mod tests {
621632 3 ,
622633 PluginBootSummary :: default ( ) ,
623634 ) ;
624- let chip = surface. activity_chip ( Locale :: En , 22 ) . expect ( "chip" ) ;
635+ let chip = surface
636+ . activity_notice ( Locale :: En , 22 )
637+ . map ( |notice| notice. text )
638+ . expect ( "chip" ) ;
625639 assert_eq ! ( chip, "MCP · 3 connecting" ) ;
626640 }
627641
@@ -647,7 +661,10 @@ mod tests {
647661 . collect:: <Vec <_>>( ) ,
648662 vec![ "alpha" , "docs" , "gamma" ]
649663 ) ;
650- let chip = surface. activity_chip ( Locale :: En , 80 ) . expect ( "chip" ) ;
664+ let chip = surface
665+ . activity_notice ( Locale :: En , 80 )
666+ . map ( |notice| notice. text )
667+ . expect ( "chip" ) ;
651668 assert ! ( chip. contains( "3 connecting" ) , "{chip}" ) ;
652669 assert ! ( chip. contains( "alpha" ) , "{chip}" ) ;
653670 assert ! ( chip. contains( "gamma" ) , "{chip}" ) ;
@@ -661,7 +678,10 @@ mod tests {
661678 assert_eq ! ( surface. phase, SessionBootPhase :: Booting ) ;
662679 assert ! ( surface. servers. is_empty( ) ) ;
663680 assert_eq ! (
664- surface. activity_chip( Locale :: En , 80 ) . as_deref( ) ,
681+ surface
682+ . activity_notice( Locale :: En , 80 )
683+ . map( |notice| notice. text)
684+ . as_deref( ) ,
665685 Some ( "MCP · 4 connecting" )
666686 ) ;
667687 }
0 commit comments