Claude/curriculum sections refactor fien0t - #14
Merged
Conversation
Permite que un Course tenga cero, una o varias secciones curriculares que agrupan sus Units existentes (p. ej. "1.er semestre — Fundamentos de Desarrollo de Software"). Semester/CurriculumSection es organización, no identidad: no crea rutas, no tiene progreso ni XP propios, y Unit.order sigue siendo el único orden real de navegación. - IR (`prisma/content/types.ts`) y authoring (`defineCourse` acepta `units` XOR `curriculum`, aplanando secciones→unidades preservando orden) con validación semántica dedicada en `validate.ts`. - C++ desde cero se declara en 2 semestres (S1: 6 unidades, S2: 4), con el único cambio de contenido intencional: printf-scanf pasa antes de funciones. C# POO I se declara en 1 sección (S3), como segundo caso que prueba que la feature no está hardcodeada a C++. - Schema: modelo `CurriculumSection` + `Unit.curriculumSectionId` nullable (ON DELETE SET NULL), migración 100% aditiva. - Seed: upsert de secciones por (courseId, key), reasigna `Unit.curriculumSectionId` y purga secciones obsoletas — sin tocar ninguna identidad ni progreso existente. - UI: helpers de formato (`src/lib/curriculum.ts`), resumen curricular en selector/switcher de curso, y agrupación visual en el roadmap (mismo flujo vertical, sin reordenar). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EyRyQs465XEPZDSogooe3F
- tests/content/authoring.test.ts: camino `curriculum` de defineCourse (una/varias secciones, flatten, order/unitSlugs derivados, práctica colocalizada, no-mutación) y su validación (curriculum vacío, key vacía/duplicada, semester inválido, subjectName vacío, sección vacía, unidad repetida entre secciones, unitSlug inexistente); ajusta el oráculo legacy de C++ al nuevo orden canónico (printf-scanf antes de funciones). - tests/content/course-contract.test.ts: contrato exacto de curriculum para C++ (2 secciones, 6+4 unidades, 41/26 lecciones) y C# (1 sección, 8 unidades) sin tocar contenido ni totales existentes. - tests/lib/curriculum.test.ts: formatSemester / formatSemesterSummary. - tests/components/roadmap/curriculum-sections.test.tsx: roadmap plano sin curriculum, headers por sección con progreso derivado, y orden global preservado (printf-scanf antes que funciones). - Fixtures actualizados en course-switcher y course-navigation (curriculumSummary / curriculumSection) y un caso nuevo en practice-visibility confirmando que los grupos de práctica siguen Unit.order, no una noción de semestre. - tests/integration/curriculum-seed-navigation.integration.test.ts (Postgres real): identidad de Course/Unit/Lesson/LessonStep/ Exercise/PracticeExercise preservada, progreso/attempts/XP históricos intactos, swap de order por UPDATE, secciones y membership correctos, FK nullable en curso sin curriculum, sin ContentRevision nueva, y navegación S1→S2 vía findNextLesson. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EyRyQs465XEPZDSogooe3F
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
CesarManzoCode
deleted the
claude/curriculum-sections-refactor-fien0t
branch
September 5, 2026 00:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.