refactor: code quality cleanup — remove any types, add logger, rename Kine to Tabata

- Phase 0: Rename all Kine references to Tabata (types, files, imports, i18n, analytics events)
- Phase 1: Add test coverage for tabataProgramStore, workoutProgramStore, and color utils (47 tests)
- Phase 2: Remove all `any` types from production code with proper typed replacements
- Phase 3: Replace ~60 raw console.* calls with __DEV__-gated logger utility
- Phase 4: Verify .DS_Store housekeeping (already clean)

0 TypeScript errors, 583/583 tests passing.
This commit is contained in:
Millian Lamiaux
2026-04-17 18:56:24 +02:00
parent e0e02c4550
commit 791f432334
176 changed files with 16508 additions and 2305 deletions

View File

@@ -150,6 +150,138 @@ export interface Database {
sort_order: number
}
}
workout_programs: {
Row: {
id: string
title: string
description: string
body_zone: 'upper-body' | 'lower-body' | 'full-body'
level: 'Beginner' | 'Intermediate' | 'Advanced'
is_free: boolean
estimated_duration: number
estimated_calories: number
icon: string | null
accent_color: string | null
sort_order: number
created_at: string
updated_at: string
}
Insert: {
id?: string
title: string
description?: string
body_zone: 'upper-body' | 'lower-body' | 'full-body'
level: 'Beginner' | 'Intermediate' | 'Advanced'
is_free?: boolean
estimated_duration?: number
estimated_calories?: number
icon?: string | null
accent_color?: string | null
sort_order?: number
}
Update: Partial<Omit<Database['public']['Tables']['workout_programs']['Insert'], 'id'>>
}
program_tabatas: {
Row: {
id: string
program_id: string
position: number
exercise_1_name: string
exercise_1_name_en: string | null
exercise_1_tip: string | null
exercise_1_tip_en: string | null
exercise_1_modification: string | null
exercise_1_modification_en: string | null
exercise_1_progression: string | null
exercise_1_progression_en: string | null
exercise_2_name: string
exercise_2_name_en: string | null
exercise_2_tip: string | null
exercise_2_tip_en: string | null
exercise_2_modification: string | null
exercise_2_modification_en: string | null
exercise_2_progression: string | null
exercise_2_progression_en: string | null
rounds: number
work_time: number
rest_time: number
}
Insert: {
id?: string
program_id: string
position: number
exercise_1_name: string
exercise_1_name_en?: string | null
exercise_1_tip?: string | null
exercise_1_tip_en?: string | null
exercise_1_modification?: string | null
exercise_1_modification_en?: string | null
exercise_1_progression?: string | null
exercise_1_progression_en?: string | null
exercise_2_name: string
exercise_2_name_en?: string | null
exercise_2_tip?: string | null
exercise_2_tip_en?: string | null
exercise_2_modification?: string | null
exercise_2_modification_en?: string | null
exercise_2_progression?: string | null
exercise_2_progression_en?: string | null
rounds?: number
work_time?: number
rest_time?: number
}
Update: Partial<Omit<Database['public']['Tables']['program_tabatas']['Insert'], 'id' | 'program_id'>>
}
workout_videos: {
Row: {
id: string
workout_id: string
trainer_id: string
video_url: string
video_path: string
created_at: string
}
Insert: {
id?: string
workout_id: string
trainer_id: string
video_url: string
video_path: string
}
Update: {
video_url?: string
video_path?: string
}
}
exercise_videos: {
Row: {
id: string
workout_id: string
trainer_id: string
exercise_name: string
video_url: string
video_path: string
video_type: 'exercise' | 'rest'
duration_seconds: number | null
created_at: string
}
Insert: {
id?: string
workout_id: string
trainer_id: string
exercise_name: string
video_url: string
video_path: string
video_type?: 'exercise' | 'rest'
duration_seconds?: number | null
}
Update: {
video_url?: string
video_path?: string
video_type?: 'exercise' | 'rest'
duration_seconds?: number | null
}
}
admin_users: {
Row: {
id: string