quintodrome/ui/src/reducers
Deluan Quintão 6880cffd16
feat(ui): add scan progress and error reporting to UI (#4094)
* feat(scanner): add LastScanError tracking to scanner status

- Introduced LastScanErrorKey constant for error tracking.
- Updated StatusInfo struct to include LastError field.
- Modified scanner logic to store and retrieve last scan error.
- Enhanced ScanStatus response to include error information.
- Updated UI components to display last scan error when applicable.
- Added tests to verify last scan error functionality.

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(scanner): enhance scan status with type and elapsed time tracking

- Added LastScanTypeKey and LastScanStartTimeKey constants for tracking scan type and start time.
- Updated StatusInfo struct to include ScanType and ElapsedTime fields.
- Implemented getScanInfo method to retrieve scan type, elapsed time, and last error.
- Modified scanner logic to store scan type and start time during scans.
- Enhanced ScanStatus response and UI components to display scan type and elapsed time.
- Added formatShortDuration utility for better elapsed time representation.
- Updated activity reducer to handle new scan status fields.

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor(tests): consolidate controller status tests into a single file

- Removed the old controller_status_test.go file.
- Merged relevant tests into the new controller_test.go file for better organization and maintainability.
- Ensured all existing test cases for controller status are preserved and functional.

Signed-off-by: Deluan <deluan@navidrome.org>

* Fix formatting issues

* refactor(scanner): update getScanInfo method documentation

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2025-05-21 09:30:23 -04:00
..
activityReducer.js feat(ui): add scan progress and error reporting to UI (#4094) 2025-05-21 09:30:23 -04:00
activityReducer.test.js feat(ui): add scan progress and error reporting to UI (#4094) 2025-05-21 09:30:23 -04:00
albumView.js Reformat code with Prettier's new rules. 2023-12-18 15:12:24 -05:00
dialogReducer.js feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
index.js ReplayGain support + audio normalization (web player) (#1988) 2023-01-17 15:57:19 -05:00
playerReducer.js fix(ui): save play mode for player (#3315) 2024-09-27 13:13:22 -04:00
replayGainReducer.js Use same key for replaygain's preAmp (#3184) 2024-08-03 21:18:41 -04:00
settingsReducer.js Option to toggle fields in songs, albums & artists (#923) 2021-05-24 11:09:06 -04:00
themeReducer.js Reformat code with Prettier's new rules. 2023-12-18 15:12:24 -05:00