fix(ecc_dashboard): repopulate Rules and Commands trees on Refresh Data

`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
This commit is contained in:
thejesh23
2026-07-13 20:00:41 -07:00
parent ed38744605
commit 2bc71ab125
+12 -3
View File
@@ -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(