You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ux): make audit instant + add progress indicators
Critical Bug Fixed:
- RENDER mode was executing full live audit before checking RENDER flag
- ThreadPoolExecutor ran for all 50+ tools even in fast snapshot mode
- Users saw no output and had to wait minutes with no feedback
Root Cause:
- RENDER check was at line 2312, AFTER ThreadPoolExecutor (line 2193)
- Logic flow: audit all tools → then check if should skip audit
- This made `make audit` take forever instead of <100ms
Solution:
- Move RENDER check to start of main() for immediate early return
- Extract render logic to _render_only_mode() function (fast path)
- Remove duplicate RENDER block that was unreachable
UX Improvements Added:
1. **Render Mode (make audit)**
- Shows friendly message: "Auditing 50 tools from snapshot (2h ago)..."
- Or: "No snapshot found - run 'make update' to collect fresh data"
- Instant output (<100ms) instead of minutes of silence
2. **Collection Mode (make update)**
- Shows: "Collecting fresh data for 50 tools..."
- Shows: "Estimated time: ~9s (timeout=3s per tool)"
- Completion: "✓ Snapshot saved: 50 tools audited"
- Helpful: "Run 'make audit' to view results"
Performance Impact:
- Before: `make audit` took 30-120s (full live audit)
- After: `make audit` takes <100ms (snapshot render)
- 300-1200x speedup for normal usage
Benefits:
- Users immediately know what's happening
- Clear guidance when snapshot is missing
- Progress indicators reduce perceived wait time
- Professional UX with estimated completion times
- Separates fast rendering from slow collection
Files Modified:
- cli_audit.py: Fixed control flow + added UX messages
Testing:
- Syntax: Validated with py_compile
- Render mode: Tested with/without snapshot - instant
- Messages: Verified helpful guidance displayed
🤖 Generated with Claude Code (https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments