Skip to content

Add v1 polish: LessonDetail, light theme, renderItem, OG images, prerequisite graph#16

Merged
raj-khan merged 2 commits into
mainfrom
feat/v1-lesson-detail-themes-og-prereqs
May 24, 2026
Merged

Add v1 polish: LessonDetail, light theme, renderItem, OG images, prerequisite graph#16
raj-khan merged 2 commits into
mainfrom
feat/v1-lesson-detail-themes-og-prereqs

Conversation

@raj-khan
Copy link
Copy Markdown
Contributor

Summary

  • <LessonDetail />: new React component — renders lesson body (2 paragraphs), exercises (prompt + expected output + reviewer note), and rubric (excellent / acceptable / needs work). Uses generateLessonContent() internally. Supports all 4 themes.
  • light theme: 4th theme variant for LearningPath, ProgressTracker, and LessonDetail — indigo/pink/emerald palette on white.
  • renderItem render-prop: added to both LearningPath and ProgressTracker. When provided, called per-lesson instead of <LessonCard> — enables fully custom lesson rendering without forking the components.
  • Lesson prerequisite graph: prerequisiteIds: string[] added to LessonSchema. generateLearningPath wires sequential prerequisites (each lesson depends on the previous). ProgressTracker uses isEffectiveDone to lock lessons whose prerequisites aren't effectively complete — including cascade-locking on un-complete.
  • OG images: dynamic ImageResponse for /roles/[slug] (warm paper background) and /tools/[slug] (dark brand background). Edge runtime.
  • Demo LessonPreview: now renders real lesson content (title, body, first exercise, rubric hint) from generateLessonContent() rather than static hardcoded text. Lesson shown reflects the user's role, tools, goal, and level choices.
  • DemoFlow: roles updated to include Sales, Customer Success, Finance; tools updated to include Windsurf, Replit, Linear, Figma AI, v0.

Test plan

  • All typechecks pass: schemas, core, react, cli, web
  • 33 core tests pass (3 new prerequisite tests)
  • 39 react tests pass (7 new LessonDetail, 3 new LearningPath, 3 new ProgressTracker)
  • CI green on all matrix nodes

🤖 Generated with Claude Code

raj-khan added 2 commits May 24, 2026 20:24
…equisite graph

LessonDetail: new React component renders lesson body + exercises + rubric
light theme: 4th theme variant for LearningPath and ProgressTracker (indigo/pink/emerald)
renderItem: render-prop on LearningPath and ProgressTracker for headless usage
Lesson prerequisite graph: sequential prerequisiteIds[] on every Lesson; ProgressTracker
  locks lessons whose prerequisites are not yet effectively complete
opengraph-image: dynamic ImageResponse for /roles/[slug] (warm) and /tools/[slug] (dark)
LessonPreview in demo now renders real lesson content from generateLessonContent()
DemoFlow updated with new roles (Sales, Customer Success, Finance) and tools (Windsurf, etc.)
33 core tests, 39 react tests — all passing
@raj-khan raj-khan merged commit f18eb8e into main May 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant