git.lucas.co / cce-data-editor
structured data editor
git clone https://git.lucas.co/cce-data-editor.git

commit35260eea5be5eceb6edb0ea8549a285da170ee57
parentc23b7cedb2
authorLucas Galante <[email protected]>
date2026-07-01 18:29
Pass KDL type annotations to TreeList

 src/main.rs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/main.rs b/src/main.rs
index 3a292ea..c815b76 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -412,6 +412,12 @@ impl DataEditorApp {
 
     fn rebuild_tree(&mut self) {
         self.tree_list.selected_key_idx = self.selected_key_idx;
+        let mut annotations = Vec::new();
+        for (key_path, _) in &self.flat_keys {
+            let anno = cce_ui::config::get_kdl_type_annotation(&self.raw_json_editor.text, key_path);
+            annotations.push(anno);
+        }
+        self.tree_list.annotations = annotations;
         self.tree_list.set_flat_keys(self.flat_keys.clone());
     }