Commit Graph

407 Commits

Author SHA1 Message Date
Claude
5a84be83d6 Fix multiple critical bugs in onboarding training step
This commit addresses all identified bugs and issues in the training code path:

## Critical Fixes:
- Add get_start_time() method to TrainingLogRepository and fix non-existent method call
- Remove duplicate training.started event from API endpoint (trainer publishes the accurate one)
- Add missing progress events for 80-100% range (85%, 92%, 94%) to eliminate progress "dead zone"

## High Priority Fixes:
- Fix division by zero risk in time estimation with double-check and max() safety
- Remove unreachable exception handler in training_operations.py
- Simplify WebSocket token refresh logic to only reconnect on actual user session changes

## Medium Priority Fixes:
- Fix auto-start training effect with useRef to prevent duplicate starts
- Add HTTP polling debounce delay (5s) to prevent race conditions with WebSocket
- Extract all magic numbers to centralized constants files:
  - Backend: services/training/app/core/training_constants.py
  - Frontend: frontend/src/constants/training.ts
- Standardize error logging with exc_info=True on critical errors

## Code Quality Improvements:
- All progress percentages now use named constants
- All timeouts and intervals now use named constants
- Improved code maintainability and readability
- Better separation of concerns

## Files Changed:
- Backend: training_service.py, trainer.py, training_events.py, progress_tracker.py
- Backend: training_operations.py, training_log_repository.py, training_constants.py (new)
- Frontend: training.ts (hooks), MLTrainingStep.tsx, training.ts (constants, new)

All training progress events now properly flow from 0% to 100% with no gaps.
2025-11-05 13:02:39 +00:00
Urtzi Alfaro
394ad3aea4 Improve AI logic 2025-11-05 13:34:56 +01:00
Urtzi Alfaro
5adb0e39c0 Improve the frontend 5 2025-11-02 20:24:44 +01:00
Urtzi Alfaro
0220da1725 Improve the frontend 4 2025-11-01 21:35:03 +01:00
Urtzi Alfaro
f44d235c6d Add user delete process 2 2025-10-31 18:57:58 +01:00
Urtzi Alfaro
269d3b5032 Add user delete process 2025-10-31 11:54:19 +01:00
Urtzi Alfaro
63f5c6d512 Improve the frontend 3 2025-10-30 21:08:07 +01:00
Urtzi Alfaro
36217a2729 Improve the frontend 2 2025-10-29 06:58:05 +01:00
Urtzi Alfaro
858d985c92 Improve the frontend modals 2025-10-27 16:33:26 +01:00
Urtzi Alfaro
61376b7a9f Improve the frontend and fix TODOs 2025-10-24 13:05:04 +02:00
Urtzi Alfaro
07c33fa578 Improve the frontend and repository layer 2025-10-23 07:44:54 +02:00
Urtzi Alfaro
8d30172483 Improve the frontend 2025-10-21 19:50:07 +02:00
Urtzi Alfaro
05da20357d Improve teh securty of teh DB 2025-10-19 19:22:37 +02:00
Urtzi Alfaro
62971c07d7 Update landing page 2025-10-18 16:03:23 +02:00
Urtzi Alfaro
312e36c893 Update requirements and insfra versions 2025-10-17 23:09:40 +02:00
Urtzi Alfaro
7e089b80cf Improve public pages 2025-10-17 18:14:28 +02:00
Urtzi Alfaro
d4060962e4 Improve demo seed 2025-10-17 07:31:14 +02:00
Urtzi Alfaro
b6cb800758 Improve GDPR implementation 2025-10-16 07:28:04 +02:00
Urtzi Alfaro
dbb48d8e2c Improve the sales import 2025-10-15 21:09:42 +02:00
Urtzi Alfaro
8f9e9a7edc Add role-based filtering and imporve code 2025-10-15 16:12:49 +02:00
Urtzi Alfaro
7556a00db7 Improve the demo feature of the project 2025-10-12 18:47:33 +02:00
Urtzi Alfaro
3c689b4f98 REFACTOR external service and improve websocket training 2025-10-09 14:11:02 +02:00
Urtzi Alfaro
7c72f83c51 REFACTOR ALL APIs fix 1 2025-10-07 07:15:07 +02:00
Urtzi Alfaro
38fb98bc27 REFACTOR ALL APIs 2025-10-06 15:27:01 +02:00
Urtzi Alfaro
dc8221bd2f Add DEMO feature to the project 2025-10-03 14:09:34 +02:00
Urtzi Alfaro
1243c2ca6d Add fixes to procurement logic and fix rel-time connections 2025-10-02 13:20:30 +02:00
Urtzi Alfaro
c9d8d1d071 Fix onboarding process not getting the subcription plan 2025-10-01 21:56:38 +02:00
Urtzi Alfaro
b93fb850c3 Add tilt support 2025-10-01 18:58:30 +02:00
Urtzi Alfaro
36b44c41f1 Fix issues 2025-10-01 14:39:10 +02:00
Urtzi Alfaro
4777e59e7a Add base kubernetes support final fix 4 2025-09-29 07:54:25 +02:00
Urtzi Alfaro
b95ecf1c53 Add base kubernetes support 5 2025-09-27 22:55:42 +02:00
Urtzi Alfaro
f246381d34 Add base kubernetes support 4 2025-09-27 17:19:00 +02:00
Urtzi Alfaro
b2c988b416 Add base kubernetes support 3 2025-09-27 14:51:06 +02:00
Urtzi Alfaro
222f945466 Add base kubernetes support 2 2025-09-27 12:10:43 +02:00
Urtzi Alfaro
63a3f9c77a Add base kubernetes support 2025-09-27 11:18:13 +02:00
Urtzi Alfaro
a27f159e24 Fix few issues 2025-09-26 12:12:17 +02:00
Urtzi Alfaro
d573c38621 Refactor components and modals 2025-09-26 07:46:25 +02:00
Urtzi Alfaro
7cd0476812 Fix modals 2025-09-25 19:52:55 +02:00
Urtzi Alfaro
89b75bd7af Support subcription payments 2025-09-25 14:30:47 +02:00
Urtzi Alfaro
f02a980c87 Support multiple languages 2025-09-25 12:14:46 +02:00
Urtzi Alfaro
6d4090f825 Reorganize teh menus 2025-09-24 22:22:01 +02:00
Urtzi Alfaro
dc6c6f213f Fix some UI issues 2 2025-09-24 21:54:49 +02:00
Urtzi Alfaro
d59b92a1b4 Fix some UI issues 2025-09-24 20:14:49 +02:00
Urtzi Alfaro
e978d04800 Move the serach box to teh sidebar 2025-09-24 19:40:51 +02:00
Urtzi Alfaro
be1fec17c4 Fix some UI issues 2025-09-24 19:15:29 +02:00
Urtzi Alfaro
2de1e6ce40 Add quality template logic 2025-09-24 16:42:23 +02:00
Urtzi Alfaro
474d7176bf Add modal to add equipment 2025-09-24 15:58:18 +02:00
Urtzi Alfaro
c17efb001c fix supplier list 2025-09-24 15:40:32 +02:00
Urtzi Alfaro
6cf8d5b935 Add a new analitycs page for production 2025-09-24 11:43:25 +02:00
Urtzi Alfaro
87310ced5f Add improved production UI 4 2025-09-23 22:11:34 +02:00