Fix publish state tracking and add sync status feature

- Track moderation status (pending/approved/rejected) in local tool config
- Add new "pending" state indicator (◐ yellow) distinct from "published" (✓ green)
- Add "Sync Status" button to check registry for updated moderation status
- Add /me/tools/<name>/status API endpoint for checking tool status
- Improve admin panel error handling with better error messages

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
rob
2026-01-16 07:52:42 -04:00
co-authored by Claude Opus 4.5
parent 3fccf854be
commit f1c462146b
5 changed files with 151 additions and 11 deletions
+3 -1
View File
@@ -183,14 +183,16 @@ class PublishDialog(QDialog):
self.status_label.setText("Published successfully!")
self.status_label.setStyleSheet("color: #38a169; font-weight: 600;")
# Save registry_hash to local config for publish state tracking
# Save registry_hash and moderation status to local config for publish state tracking
config_hash = result.get("config_hash")
moderation_status = result.get("status", "pending")
if config_hash and hasattr(self._tool, 'path') and self._tool.path:
try:
config_path = self._tool.path
if config_path.exists():
config_data = yaml.safe_load(config_path.read_text()) or {}
config_data["registry_hash"] = config_hash
config_data["registry_status"] = moderation_status
config_path.write_text(yaml.dump(config_data, default_flow_style=False, sort_keys=False))
except Exception:
pass # Non-critical - just won't show publish state