Add startup connection validation to GUI

- Add validate_token() method to RegistryClient
  - Returns (is_valid, error_message) tuple
  - Catches 401/UNAUTHORIZED errors and connection issues
- Add startup validation in MainWindow
  - Runs 500ms after window shows (non-blocking)
  - Clears invalid tokens automatically
  - Shows status bar message explaining what happened
- Document cmdforge config disconnect command

This prevents confusing errors when trying to publish with stale or
revoked credentials - the GUI now auto-clears bad connections on restart.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
rob
2026-01-17 01:59:16 -04:00
co-authored by Claude Opus 4.5
parent 66fd121ee4
commit 85d1212c0d
3 changed files with 62 additions and 1 deletions
+7
View File
@@ -31,6 +31,13 @@ All notable changes to CmdForge will be documented in this file.
- Auto-fetch registry version when opening publish dialog
- Fork detection during publish workflow
- Always refresh tools page after publish dialog closes
- **Startup connection validation**: GUI validates registry token on startup
- Automatically clears invalid/revoked tokens
- Shows status bar message when connection is cleared
- Prevents confusing errors when trying to publish with stale credentials
#### CLI Features
- `cmdforge config disconnect` - Clear registry token from local configuration
#### Admin Features
- Maintenance section in admin dashboard