@@ -76,6 +76,8 @@ fn format_file_compact(
7676 if include_details {
7777 if let Some ( size) = file. size {
7878 parts. push ( format_size ( size) ) ;
79+ } else if let Some ( recursive_size) = file. recursive_size {
80+ parts. push ( format_size ( recursive_size) ) ;
7981 }
8082 if let Some ( ref modified) = file. modified {
8183 parts. push ( modified. clone ( ) ) ;
@@ -158,6 +160,8 @@ fn build_pane_yaml(state: &PaneState, indent: &str) -> String {
158160 lines. push ( format ! ( "{} name: {}" , indent, cursor_file. name) ) ;
159161 if let Some ( size) = cursor_file. size {
160162 lines. push ( format ! ( "{} size: {}" , indent, format_size( size) ) ) ;
163+ } else if let Some ( recursive_size) = cursor_file. recursive_size {
164+ lines. push ( format ! ( "{} size: {}" , indent, format_size( recursive_size) ) ) ;
161165 }
162166 if let Some ( ref modified) = cursor_file. modified {
163167 lines. push ( format ! ( "{} modified: {}" , indent, modified) ) ;
@@ -542,6 +546,7 @@ mod tests {
542546 path : "/tmp/test.txt" . to_string ( ) ,
543547 is_directory : false ,
544548 size : Some ( 1024 ) ,
549+ recursive_size : None ,
545550 modified : Some ( "2024-01-15" . to_string ( ) ) ,
546551 } ;
547552
@@ -567,10 +572,23 @@ mod tests {
567572 path : "/tmp/docs" . to_string ( ) ,
568573 is_directory : true ,
569574 size : None ,
575+ recursive_size : None ,
570576 modified : None ,
571577 } ;
572578 let formatted = format_file_compact ( & dir, 1 , false , false , false ) ;
573579 assert_eq ! ( formatted, "i:1 d docs" ) ;
580+
581+ // Directory with recursive size
582+ let dir_with_size = FileEntry {
583+ name : "src" . to_string ( ) ,
584+ path : "/tmp/src" . to_string ( ) ,
585+ is_directory : true ,
586+ size : None ,
587+ recursive_size : Some ( 169 ) ,
588+ modified : Some ( "2026-03-19T17:33:53.000Z" . to_string ( ) ) ,
589+ } ;
590+ let formatted = format_file_compact ( & dir_with_size, 5 , false , false , true ) ;
591+ assert_eq ! ( formatted, "i:5 d src 169B 2026-03-19T17:33:53.000Z" ) ;
574592 }
575593
576594 #[ test]
@@ -585,13 +603,15 @@ mod tests {
585603 path: "/Users/test/file1.txt" . to_string( ) ,
586604 is_directory: false ,
587605 size: Some ( 100 ) ,
606+ recursive_size: None ,
588607 modified: Some ( "2024-01-15" . to_string( ) ) ,
589608 } ,
590609 FileEntry {
591610 name: "folder" . to_string( ) ,
592611 path: "/Users/test/folder" . to_string( ) ,
593612 is_directory: true ,
594613 size: None ,
614+ recursive_size: None ,
595615 modified: None ,
596616 } ,
597617 ] ,
0 commit comments