From 2bc71ab125599603656ba3e2acab7964375eecc4 Mon Sep 17 00:00:00 2001 From: thejesh23 Date: Mon, 13 Jul 2026 20:00:41 -0700 Subject: [PATCH] fix(ecc_dashboard): repopulate Rules and Commands trees on Refresh Data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `refresh_data` reloaded the four data lists and updated the tab labels plus status bar, but only called `populate_agents` and `populate_skills`. Rules were not repopulated (though `populate_rules` already existed) and Commands had no reusable populate helper at all — initial population was inlined in `create_commands_tab`. After clicking "Refresh Data" the tab counts changed but the Rules and Commands treeviews still showed pre- refresh rows, and the "Data refreshed successfully!" popup silently lied. Extract the commands-tree insertion into `populate_commands` mirroring `populate_agents`/`populate_rules`, then call both `populate_commands` and `populate_rules` from `refresh_data`. Fixes #2513 --- ecc_dashboard.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ecc_dashboard.py b/ecc_dashboard.py index ff9e932d9..b7e3f93f5 100644 --- a/ecc_dashboard.py +++ b/ecc_dashboard.py @@ -656,10 +656,17 @@ Usage: This skill is automatically activated when working with related technolog scrollbar.pack(side=tk.RIGHT, fill=tk.Y) # Populate - for i, cmd in enumerate(self.commands, 1): - self.command_tree.insert('', tk.END, text=str(i), + self.populate_commands(self.commands) + + def populate_commands(self, commands: List[Dict]): + """Populate commands list""" + for item in self.command_tree.get_children(): + self.command_tree.delete(item) + + for i, cmd in enumerate(commands, 1): + self.command_tree.insert('', tk.END, text=str(i), values=('/' + cmd['name'], cmd['description'])) - + # ========================================================================= # RULES TAB # ========================================================================= @@ -868,6 +875,8 @@ Project: github.com/affaan-m/ECC""" # Repopulate self.populate_agents(self.agents) self.populate_skills(self.skills) + self.populate_commands(self.commands) + self.populate_rules(self.rules) # Update status self.status_label.config(