File tree Expand file tree Collapse file tree
crates/jackin-capsule/src/tui/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -539,7 +539,11 @@ impl Dialog {
539539 if * selected == UsageDialogTab :: Instance {
540540 return Some ( Self :: usage_instance_state ( view, scroll. clone ( ) ) ) ;
541541 }
542- let mut rows = vec ! [
542+ let mut rows = Vec :: new ( ) ;
543+ if let Some ( tabs) = Self :: usage_tabs_label ( view) {
544+ rows. push ( jackin_tui:: components:: ContainerInfoRow :: new ( "Tabs" , tabs) ) ;
545+ }
546+ rows. extend ( [
543547 jackin_tui:: components:: ContainerInfoRow :: new (
544548 "Focused" ,
545549 Self :: usage_focused_label ( view) ,
@@ -561,10 +565,7 @@ impl Dialog {
561565 Self :: usage_status_label ( view. status ) ,
562566 ) ,
563567 jackin_tui:: components:: ContainerInfoRow :: new ( "Updated" , view. updated_label . clone ( ) ) ,
564- ] ;
565- if let Some ( tabs) = Self :: usage_tabs_label ( view) {
566- rows. push ( jackin_tui:: components:: ContainerInfoRow :: new ( "Tabs" , tabs) ) ;
567- }
568+ ] ) ;
568569 if let Some ( plan) = & view. account . plan_label {
569570 rows. push ( jackin_tui:: components:: ContainerInfoRow :: new (
570571 "Plan" ,
Original file line number Diff line number Diff line change @@ -1012,6 +1012,7 @@ fn usage_dialog_rows_render_meters_spend_and_source() {
10121012 . map ( jackin_tui:: components:: ContainerInfoRow :: value)
10131013 . collect ( ) ;
10141014
1015+ assert_eq ! ( state. rows( ) [ 0 ] . label( ) , "Tabs" ) ;
10151016 assert ! ( values. contains( & "codex · OpenAI · alexey@example.com" ) ) ;
10161017 assert ! ( values. iter( ) . any( |value| {
10171018 value. starts_with( "████████████····" )
You can’t perform that action at this time.
0 commit comments