fix(ecc_dashboard): repopulate Rules and Commands trees on Refresh Data#2516
Conversation
`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 affaan-m#2513
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🧰 Additional context used📓 Path-based instructions (7)**/*.{js,ts,jsx,tsx,py,java,cs,go,rb,php,scala,kt}📄 CodeRabbit inference engine (.cursor/rules/common-coding-style.md)
Files:
**/*.{js,ts,jsx,tsx,py,java,cs,rb,go,php,swift,kt,rs,c,cpp,h,hpp}📄 CodeRabbit inference engine (.cursor/rules/common-security.md)
Files:
**/*.{js,ts,jsx,tsx,py,java,cs,rb,go,php}📄 CodeRabbit inference engine (.cursor/rules/common-security.md)
Files:
**/*.{js,ts,jsx,tsx,py,java,cs,rb,go,php,sql}📄 CodeRabbit inference engine (.cursor/rules/common-security.md)
Files:
**/*.{js,ts,jsx,tsx,py,java,cs,rb,go,php,swift,kt,rs,c,cpp,h,hpp,properties,yml,yaml,json,env,config}📄 CodeRabbit inference engine (.cursor/rules/common-security.md)
Files:
**/*.{py,pyi}📄 CodeRabbit inference engine (.cursor/rules/python-coding-style.md)
Files:
**/*.py📄 CodeRabbit inference engine (.cursor/rules/python-coding-style.md)
Files:
🔇 Additional comments (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe Commands tab now uses a reusable population method, and ChangesDashboard refresh
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Warning |
|
| Filename | Overview |
|---|---|
| ecc_dashboard.py | Adds reusable Commands tree population and refreshes Commands and Rules trees with the existing dashboard refresh flow. |
Reviews (1): Last reviewed commit: "fix(ecc_dashboard): repopulate Rules and..." | Re-trigger Greptile
|
Local review from Codex automation: focused dashboard fix for #2513 looks good. |
|
Thank you for this! This is a focused fix for the dashboard refresh path, and it keeps the Rules and Commands views in sync with the freshly loaded data. The recorded checks are green, and the change also passes the full test suite when combined with current main, so I’m merging it now. We appreciate the contribution. |
What Changed
create_commands_tabinto a newpopulate_commands(commands)method, mirroring the existingpopulate_agents/populate_ruleshelpers.create_commands_tabnow callsself.populate_commands(self.commands)for its initial population.refresh_datanow calls bothself.populate_commands(self.commands)andself.populate_rules(self.rules)alongside the two existing repopulate calls.Why This Change
Clicking Refresh Data in the dashboard reloaded the four data lists, updated the four tab-count labels, and displayed "Data refreshed successfully!" — but only agents and skills were actually re-rendered. Rules and Commands trees kept their pre-refresh rows, so the tab count and the visible content diverged and the success popup silently lied.
populate_rulesalready existed and was just never called fromrefresh_data; Commands had no reusable populate helper at all.Testing Done
Refresh Datadoesn't repopulate Rules or Commands trees #2513: change files undercommands/andrules/, click Refresh Data, observed that both trees now refresh alongside Agents and Skills.python3 -c 'import ast; ast.parse(open(\"ecc_dashboard.py\").read())'OK; no unit tests exist for the Tk dashboard.create_commands_tab) still works because it now delegates to the samepopulate_commandshelper.Type of Change
fix:Bug fixSecurity & Quality Checklist
If you changed dependencies or
package.jsonNo dependency changes.
If you added a skill, command, agent, hook, or CLI tool
Not applicable — Tk dashboard code only.
Documentation
No documented behavior changed. The user-facing "Refresh Data" action now actually refreshes what it claims to.
Linked issue
Fixes #2513
Related independent PRs opened alongside this one (different files, no conflicts):
cache_controlpassed as top-level Messages API param #2512?makes everyyarn <anything>trigger the tmux reminder #2514