@@ -1018,6 +1018,8 @@ impl App {
10181018 } ;
10191019
10201020 if let Some ( resource) = resource_info {
1021+ use crate :: models:: FluxResourceKind ;
1022+
10211023 let key = crate :: watcher:: resource_key (
10221024 & resource. namespace ,
10231025 & resource. name ,
@@ -1026,13 +1028,17 @@ impl App {
10261028
10271029 // Check if resource object exists and has status.history
10281030 let objects = self . resource_objects . read ( ) . unwrap ( ) ;
1029- let has_history = objects
1030- . get ( & key )
1031+ let obj = objects. get ( & key ) ;
1032+ let has_history = obj
10311033 . and_then ( |obj| obj. get ( "status" ) )
10321034 . and_then ( |s| s. get ( "history" ) )
10331035 . and_then ( |h| h. as_array ( ) )
10341036 . map ( |arr| !arr. is_empty ( ) )
10351037 . unwrap_or ( false ) ;
1038+ let is_kustomization = matches ! (
1039+ FluxResourceKind :: parse_optional( & resource. resource_type) ,
1040+ Some ( FluxResourceKind :: Kustomization )
1041+ ) ;
10361042
10371043 drop ( objects) ; // Release lock before switching view
10381044
@@ -1044,20 +1050,24 @@ impl App {
10441050 self . history_scroll_offset = 0 ;
10451051 } else {
10461052 // Show error message immediately
1047- use crate :: models:: FluxResourceKind ;
1048- let supported_types: Vec < String > =
1049- FluxResourceKind :: history_supported_types ( )
1050- . iter ( )
1051- . map ( |k| k. as_str ( ) . to_string ( ) )
1052- . collect ( ) ;
1053- self . set_status_message ( (
1053+ let error_msg = if is_kustomization {
1054+ format ! (
1055+ "Reconciliation history is not supported for Kustomization '{}' in this version of Flux. History requires Flux v2.3.0 or later." ,
1056+ resource. name
1057+ )
1058+ } else {
1059+ let supported_types: Vec < String > =
1060+ FluxResourceKind :: history_supported_types ( )
1061+ . iter ( )
1062+ . map ( |k| k. as_str ( ) . to_string ( ) )
1063+ . collect ( ) ;
10541064 format ! (
10551065 "Resource '{}' does not have reconciliation history. History is only available for: {}" ,
10561066 resource. name,
10571067 supported_types. join( ", " )
1058- ) ,
1059- true ,
1060- ) ) ;
1068+ )
1069+ } ;
1070+ self . set_status_message ( ( error_msg , true ) ) ;
10611071 }
10621072 } else {
10631073 self . set_status_message ( ( "No resource selected" . to_string ( ) , true ) ) ;
0 commit comments