e0cfd5d512
Introduce a `Badge` enum and a `badge_for` function to consolidate case status logic. This replaces multiple boolean flags (`analyzing`, `has_failed_recording`, `analysis_required`) with a single, more expressive `badge` field. The HTML template has been updated to use this new badge system, removing old status classes and logic. The `scan_user_cases` function no longer needs the `worker_busy` argument as the analysis state is now derived directly from the `auto_trigger` state. This change improves code clarity and maintainability by centralizing status determination and reducing redundant boolean flags.