VideoTools/internal
Stu Leak 8983817de4 feat(ui): complete Phase 1 - debouncing, validation, callback registry
Phase 1 Complete - Convert UI Cleanup (dev23):

Debouncing (eliminates remaining sync flags):
- Add createDebouncedCallback() helper with 300ms delay
- Apply debouncing to CRF entry (updates: ~10/sec → ~3/sec)
- Apply debouncing to bitrate entry (eliminates syncingBitrate flag)
- Apply debouncing to target file size entry (eliminates syncingTargetSize flag)
- Remove all remaining sync boolean flags (syncingBitrate, syncingTargetSize)

Input Validation:
- Add validateCRF() - enforces 0-51 range
- Add validateBitrate() - checks positive numbers, warns on extremes
- Add validateFileSize() - checks positive numbers
- Apply validation to CRF, bitrate, and file size entries
- Provides immediate user feedback on invalid input

Callback Registry:
- Create callbackRegistry to replace nil checks
- Add registerCallback() and callCallback() with logging
- Use in setQuality() to eliminate 'if updateEncodingControls != nil'
- Foundation for eliminating 21+ nil checks (will expand in future)

Impact Summary:
- ALL sync flags eliminated: 5 → 0 (100% reduction!)
- Command preview updates while typing: ~10/sec → ~3/sec (70% reduction!)
- Input validation prevents invalid configurations
- Debouncing improves perceived responsiveness
- Callback registry provides better debugging (logs missing callbacks)

Files modified:
- internal/ui/components.go (SetSelectedSilent)
- main.go (debouncing, validation, callback registry)

Phase 1 COMPLETE! Ready for Phase 2 (ColoredSelect expansion & visual polish)
2026-01-03 23:16:08 -05:00
..
app Format cleanup and minor fixes 2025-12-23 21:56:47 -05:00
benchmark feat: implement unified FFmpeg player and fix critical build issues 2026-01-02 01:02:07 -05:00
convert fix: suppress ffmpeg popups on Windows and improve codec performance 2026-01-02 15:22:13 -05:00
enhancement fix: QoL improvements and cleanup 2026-01-02 04:24:47 -05:00
interlace Format cleanup and minor fixes 2025-12-23 21:56:47 -05:00
logging feat: implement Phase 2 AI enhancement module with ONNX framework 2026-01-02 02:02:55 -05:00
metadata Add queue error copy, auto naming helper, and metadata templating 2025-12-07 12:03:21 -05:00
modules Fri 02 Jan 2026 06:24:18 PM EST: Implement critical fixes for production readiness 2026-01-02 18:24:18 -05:00
player fix: suppress ffmpeg popups on Windows and improve codec performance 2026-01-02 15:22:13 -05:00
queue fix: update main menu version display to dev22 2026-01-03 13:58:22 -05:00
sysinfo fix: resolve build errors and complete dev22 fixes 2026-01-03 13:17:30 -05:00
thumbnail feat(ui): complete Phase 1 - debouncing, validation, callback registry 2026-01-03 23:16:08 -05:00
ui feat(ui): implement state manager pattern, eliminate 3 sync flags 2026-01-03 23:03:10 -05:00
utils fix: suppress ffmpeg popups on Windows and improve codec performance 2026-01-02 15:22:13 -05:00