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) |
||
|---|---|---|
| .. | ||
| app | ||
| benchmark | ||
| convert | ||
| enhancement | ||
| interlace | ||
| logging | ||
| metadata | ||
| modules | ||
| player | ||
| queue | ||
| sysinfo | ||
| thumbnail | ||
| ui | ||
| utils | ||