Skip to content

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

Merged
haelyra merged 1 commit into
affaan-m:mainfrom
thejesh23:fix/dashboard-refresh-rules-commands
Jul 24, 2026
Merged

fix(ecc_dashboard): repopulate Rules and Commands trees on Refresh Data#2516
haelyra merged 1 commit into
affaan-m:mainfrom
thejesh23:fix/dashboard-refresh-rules-commands

Conversation

@thejesh23

Copy link
Copy Markdown
Contributor

What Changed

  • Extracted the inline command-tree insertion from create_commands_tab into a new populate_commands(commands) method, mirroring the existing populate_agents / populate_rules helpers.
  • create_commands_tab now calls self.populate_commands(self.commands) for its initial population.
  • refresh_data now calls both self.populate_commands(self.commands) and self.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_rules already existed and was just never called from refresh_data; Commands had no reusable populate helper at all.

Testing Done

  • Manual testing completed — walked through the reproduction from bug(ecc_dashboard): Refresh Data doesn't repopulate Rules or Commands trees #2513: change files under commands/ and rules/, click Refresh Data, observed that both trees now refresh alongside Agents and Skills.
  • Automated tests pass locally — python3 -c 'import ast; ast.parse(open(\"ecc_dashboard.py\").read())' OK; no unit tests exist for the Tk dashboard.
  • Edge cases considered and tested — initial population path (via create_commands_tab) still works because it now delegates to the same populate_commands helper.

Type of Change

  • fix: Bug fix

Security & Quality Checklist

  • No secrets or API keys committed
  • No sensitive data exposed in logs or output
  • Follows conventional commits format

If you changed dependencies or package.json

No 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):

`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
@thejesh23
thejesh23 requested a review from affaan-m as a code owner July 14, 2026 03:02
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: afe6be98-b39e-4e05-ba0e-608c4c051089

📥 Commits

Reviewing files that changed from the base of the PR and between ed38744 and 2bc71ab.

📒 Files selected for processing (1)
  • ecc_dashboard.py
📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Greptile Review
🧰 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)

**/*.{js,ts,jsx,tsx,py,java,cs,go,rb,php,scala,kt}: Always create new objects, never mutate existing ones. Use immutable patterns to prevent hidden side effects and enable safe concurrency
Organize code into many small files (200-400 lines typical, 800 lines max) organized by feature/domain rather than by type
Always handle errors explicitly at every level and never silently swallow errors
Always validate all user input before processing at system boundaries
Use schema-based validation where available
Fail fast with clear error messages when validation fails
Never trust external data (API responses, user input, file content)
Ensure code is readable and well-named
Keep functions small (less than 50 lines)
Keep files focused (less than 800 lines)
Avoid deep nesting (more than 4 levels)
Do not use hardcoded values; use constants or configuration instead

Files:

  • ecc_dashboard.py
**/*.{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)

No hardcoded secrets (API keys, passwords, tokens) - validate before any commit

Files:

  • ecc_dashboard.py
**/*.{js,ts,jsx,tsx,py,java,cs,rb,go,php}

📄 CodeRabbit inference engine (.cursor/rules/common-security.md)

**/*.{js,ts,jsx,tsx,py,java,cs,rb,go,php}: All user inputs must be validated
Enable CSRF protection on all state-changing endpoints
Verify authentication and authorization for all protected endpoints
Implement rate limiting on all endpoints to prevent abuse
Ensure error messages do not leak sensitive data in responses

Files:

  • ecc_dashboard.py
**/*.{js,ts,jsx,tsx,py,java,cs,rb,go,php,sql}

📄 CodeRabbit inference engine (.cursor/rules/common-security.md)

Use parameterized queries to prevent SQL injection

Files:

  • ecc_dashboard.py
**/*.{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)

NEVER hardcode secrets in source code - ALWAYS use environment variables or a secret manager

Files:

  • ecc_dashboard.py
**/*.{py,pyi}

📄 CodeRabbit inference engine (.cursor/rules/python-coding-style.md)

**/*.{py,pyi}: Follow PEP 8 conventions in Python code
Use type annotations on all function signatures in Python
Prefer immutable data structures such as frozen dataclasses and NamedTuple in Python

**/*.{py,pyi}: Auto-format Python files using black/ruff after edit
Run type checking using mypy/pyright after editing Python files

**/*.{py,pyi}: Use Protocol from typing module for duck typing and defining object shapes in Python
Use dataclasses with @dataclass decorator for DTOs (Data Transfer Objects) in Python
Use context managers (with statement) for resource management in Python
Use generators for lazy evaluation and memory-efficient iteration in Python

Files:

  • ecc_dashboard.py
**/*.py

📄 CodeRabbit inference engine (.cursor/rules/python-coding-style.md)

**/*.py: Use black for code formatting in Python
Use isort for import sorting in Python
Use ruff for linting Python code

Avoid using print() statements in Python code; use the logging module instead

**/*.py: Retrieve secrets and API keys from environment variables using os.environ with error handling (raise KeyError if missing) rather than hardcoding credentials
Use bandit for static security analysis in Python projects

Files:

  • ecc_dashboard.py
🔇 Additional comments (1)
ecc_dashboard.py (1)

878-879: LGTM!


📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Command listings now refresh correctly when project data is reloaded.
    • Rules listings are also updated during data refreshes.
    • Command names consistently display with the / prefix in the Commands tab.

Walkthrough

The Commands tab now uses a reusable population method, and refresh_data repopulates both Commands and Rules trees after reloading dashboard data.

Changes

Dashboard refresh

Layer / File(s) Summary
Tree population and refresh wiring
ecc_dashboard.py
Command rows are populated through populate_commands, and refresh_data now refreshes the Commands and Rules trees alongside Agents and Skills.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: affaan-m

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed It clearly describes the main fix: repopulating the Rules and Commands trees on Refresh Data.
Description check ✅ Passed The description matches the ECC dashboard refresh fix and explains the helper extraction and repopulation changes.
Linked Issues check ✅ Passed The changes satisfy the relevant linked requirement in #2513 by refreshing Rules and Commands and adding populate_commands.
Out of Scope Changes check ✅ Passed No unrelated code changes are present; the diff stays focused on ECC dashboard refresh behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Warning

⚠️ This pull request shows signs of AI-generated slop (redundant_comments). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes Refresh Data so all dashboard trees are repopulated. The main changes are:

  • Added a reusable populate_commands helper.
  • Moved initial Commands tab rendering through that helper.
  • Re-rendered Commands and Rules during refresh_data.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

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

Copy link
Copy Markdown

Local review from Codex automation: focused dashboard fix for #2513 looks good. ecc_dashboard.py parses successfully, and the change reuses population helpers so Refresh Data repopulates Commands and Rules as claimed. I cannot merge from this integration (403 on merge permission). Recommendation: merge, with the caveat that the local check is syntax-level because this Tk dashboard has no existing automated GUI regression harness.

@haelyra

haelyra commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

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.

@haelyra
haelyra merged commit fee94fb into affaan-m:main Jul 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(ecc_dashboard): Refresh Data doesn't repopulate Rules or Commands trees

3 participants