Skip to content

Add computeProgress to core and Storybook to @learnkit-ai/react#17

Merged
raj-khan merged 2 commits into
mainfrom
feat/v1-progress-storybook
May 24, 2026
Merged

Add computeProgress to core and Storybook to @learnkit-ai/react#17
raj-khan merged 2 commits into
mainfrom
feat/v1-progress-storybook

Conversation

@raj-khan
Copy link
Copy Markdown
Contributor

Summary

  • computeProgress(path, completedIds) — new function in @learnkit-ai/core that returns a LearningPathProgress with completedCount, totalCount, percentComplete, and updatedAt; filters out IDs that don't belong to the path
  • LearningPathProgressSchema extended with completedCount, totalCount, percentComplete fields
  • Storybook set up in packages/react with @storybook/react-vite; stories for all four components (LessonCard, LearningPath, LessonDetail, ProgressTracker) covering every status, theme, and headless render-prop mode — run with pnpm --filter @learnkit-ai/react storybook

Test plan

  • pnpm test passes (39 core + react + cli tests)
  • pnpm typecheck passes across all packages
  • pnpm --filter @learnkit-ai/react storybook starts and shows all four components with all theme variants
  • computeProgress with empty IDs returns completedCount: 0, percentComplete: 0
  • computeProgress with all lesson IDs returns percentComplete: 100
  • Fake IDs are filtered from completedLessonIds

@raj-khan raj-khan merged commit dcedf8b 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