feat(ai): implement AI-powered learning assistant components (#305)#337
Merged
RUKAYAT-CODER merged 2 commits intorinafcode:mainfrom Apr 28, 2026
Merged
Conversation
- LearningAssistant: chat UI with typing indicator, aria-live, keyboard nav - PersonalizedRecommendations: fetches GET /api/ai/recommendations with skeleton loader - IntelligentProgress: fetches GET /api/user/progress, progress bar + insights - SmartNotifications: fetches GET /api/ai/reminders, dismiss via DELETE /api/ai/reminders/:id - NaturalLanguageQuery: POST /api/ai/search with empty/error states - Tests: 25 tests covering loading, success, error, and interaction states Placeholder API endpoints documented in each component: POST /api/ai/chat, GET /api/ai/recommendations, GET /api/ai/reminders, DELETE /api/ai/reminders/:id, POST /api/ai/search Closes rinafcode#305
- Keep our AI component implementations (ApiResponse<T> envelope, better accessibility, error states, Skeleton loader) - Switch SmartNotifications to useNotification hook (project standard) - Remove duplicate upstream test file (aiComponents.test.tsx) in favour of our ai-components.test.tsx which matches our component API shapes - All 25 AI component tests passing
|
@JoesWalker Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #305
Placeholder API endpoints documented in each component:
POST /api/ai/chat, GET /api/ai/recommendations,
GET /api/ai/reminders, DELETE /api/ai/reminders/:id, POST /api/ai/search
Closes #305
Description
Brief description of changes
Related Issue
Type of Change
Checklist
Summary
Implements the AI-powered learning assistant frontend as described in issue #305.
Changes
Five new components under
src/components/ai/:aria-livefor screen readers. Sends messages toPOST /api/ai/chat.GET /api/ai/recommendationsand displays a list of courses/resources with title, reason, and CTA link.Skeleton loader while fetching.
GET /api/user/progressendpoint and renders a progress bar with AI-generated insights (streak, timespent, daily goal).
GET /api/ai/reminders, supports dismissing viaDELETE /api/ai/reminders/:id, uses the existing toast pattern forconfirmations.
POST /api/ai/searchwith results list, empty state, and loading/error states.Placeholder API Endpoints
The following backend endpoints need to be implemented to match:
POST/api/ai/chat{ message, context }{ data: { reply } }GET/api/ai/recommendations{ data: Recommendation[] }GET/api/ai/reminders{ data: Reminder[] }DELETE/api/ai/reminders/:id{ success: true }POST/api/ai/search{ query }{ data: SearchResult[] }Tests
25 tests in
src/components/ai/__tests__/ai-components.test.tsxcovering:All API calls are mocked — no real AI calls in tests.
Checklist