Some checks are pending
CI Pipeline / changes (push) Waiting to run
CI Pipeline / core (push) Blocked by required conditions
CI Pipeline / trading-backend (push) Blocked by required conditions
CI Pipeline / trading-data-service (push) Blocked by required conditions
CI Pipeline / trading-frontend (push) Blocked by required conditions
CI Pipeline / erp-core (push) Blocked by required conditions
CI Pipeline / erp-mecanicas (push) Blocked by required conditions
CI Pipeline / gamilit-backend (push) Blocked by required conditions
CI Pipeline / gamilit-frontend (push) Blocked by required conditions
Gamilit: - Backend: Teacher services, assignments, gamification, exercise submissions - Frontend: Admin/Teacher/Student portals, module 4-5 mechanics, monitoring - Database: DDL functions, seeds for dev/prod, auth/gamification schemas - Docs: Architecture, features, guides cleanup and reorganization Core/Orchestration: - New workspace directives index - Documentation directive Trading-platform: - Database seeds and inventory updates - Tech leader validation report 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4.1 KiB
4.1 KiB
GAPS IDENTIFICADOS - Teacher Portal
Fecha: 2025-12-14 Agente: Architecture-Analyst Proyecto: GAMILIT
GAP CRITICO: snake_case vs camelCase Mismatch
Descripcion
El apiClient tiene un interceptor de respuesta que transforma automaticamente las propiedades de snake_case a camelCase:
// apiClient.ts lineas 110-113
if (response.data && typeof response.data === 'object') {
response.data = snakeToCamel(response.data);
}
Problema:
- Backend retorna:
{ full_name: "Juan", score_average: 85, last_activity: "2025-12-14" } - apiClient transforma a:
{ fullName: "Juan", scoreAverage: 85, lastActivity: "2025-12-14" } - Frontend espera:
student.full_name,student.score_average,student.last_activity - Resultado: undefined en todas las propiedades
Archivos Afectados
Teacher Portal (18 archivos):
pages/TeacherStudents.tsxpages/TeacherProgressPage.tsxpages/TeacherReportsPage.tsxpages/TeacherMonitoringPage.tsxpages/TeacherClasses.tsxcomponents/assignments/AssignmentCreator.tsxcomponents/assignments/AssignmentWizard.tsxcomponents/collaboration/ParentCommunicationHub.tsxcomponents/communication/AnnouncementForm.tsxcomponents/communication/FeedbackForm.tsxcomponents/monitoring/StudentDetailModal.tsxcomponents/monitoring/StudentMonitoringPanel.tsxcomponents/monitoring/StudentStatusCard.tsxcomponents/analytics/PerformanceInsightsPanel.tsxcomponents/progress/ClassProgressDashboard.tsxcomponents/progress/StudentProgressList.tsxcomponents/reports/ReportGenerator.tsxtypes/index.ts
Admin Portal (8 archivos):
pages/AdminUsersPage.tsxtypes/index.tshooks/useUserManagement.tscomponents/users/UserDetailModal.tsxcomponents/users/UserDetailModal.example.tsxcomponents/dashboard/UserManagementTable.tsxcomponents/progress/ClassroomsView.tsxcomponents/progress/StudentDetailView.tsx
Student Portal (2 archivos):
hooks/useGamificationData.tscomponents/gamification/GamificationHero.tsx
Solucion Recomendada
Opcion elegida: Remover la transformacion snake_case -> camelCase en apiClient
Razon:
- Todos los tipos TypeScript del frontend estan definidos en snake_case
- Todos los componentes acceden a propiedades en snake_case
- El backend retorna snake_case (convencion de PostgreSQL/NestJS)
- Cambiar +28 archivos seria mas riesgoso que modificar un solo archivo (apiClient)
Cambio Requerido
Archivo: src/services/api/apiClient.ts
Lineas a modificar: 110-113 y 55-62
// ANTES:
if (response.data && typeof response.data === 'object') {
response.data = snakeToCamel(response.data);
}
// DESPUES:
// Mantener snake_case del backend (frontend types ya usan snake_case)
// response.data = snakeToCamel(response.data); // REMOVIDO
GAPS MENORES
GAP-T-001: Debug console.log en TeacherExerciseResponsesPage
Archivo: pages/TeacherExerciseResponsesPage.tsx:136
console.log('[TeacherExerciseResponsesPage] Hook data:', { data, isLoading, error: error?.message });
Severidad: Baja Accion: Remover o condicionar a DEBUG mode
ESTADO DE ENDPOINTS
| Endpoint | Frontend | Backend | Estado |
|---|---|---|---|
/teacher/classrooms |
OK | OK | Funcional |
/teacher/classrooms/:id/students |
OK | OK | Funcional |
/teacher/assignments |
OK | OK | Funcional |
/teacher/attempts |
OK | OK | Funcional |
/teacher/submissions/:id/feedback |
OK | OK | Funcional |
Nota: Todos los endpoints existen y estan correctamente definidos. El problema es la transformacion de datos en el cliente.
PLAN DE CORRECCION
-
Fase 1 - Correccion Critica (Inmediata)
- Modificar
apiClient.tspara NO transformar response data - Mantener transformacion de request data (camelCase -> snake_case)
- Modificar
-
Fase 2 - Validacion
- Ejecutar build
- Probar Teacher portal
- Verificar Student y Admin portals
-
Fase 3 - Limpieza
- Remover console.log de debug
Ultima actualizacion: 2025-12-14