Add learning feed to the mobile app#16
Open
cjbpq wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a Learning Feed experience to the mobile app and expands supporting app infrastructure for API clients, admin navigation, refinement management, dashboard progress, and related documentation.
Changes:
- Adds Learning Feed services, screen, tab navigation, channel management, and backend channel-scoped feed listing.
- Refactors the API client to support separate Learning and Chat clients, adds unit-test scaffolding, and exposes app/environment info in settings.
- Fills out admin/refinement flows and updates dashboard/course detail progress display plus slice documentation.
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| NexoraLearning/frontend/index.html | Removes BOM/normalizes first line. |
| NexoraLearning/core/learning_feed.py | Adds channel filtering to feed item listing. |
| NexoraLearning/api/routes.py | Uses channel-aware feed listing in the frontend feed endpoint. |
| ChatApp/tsconfig.test.json | Adds TypeScript config for Node-based unit tests. |
| ChatApp/src/services/types.ts | Adds lecture progress/chapter fields. |
| ChatApp/src/services/refinementService.ts | Adds refinement settings/action APIs and types. |
| ChatApp/src/services/learningFeedService.ts | Adds Learning Feed service APIs and types. |
| ChatApp/src/services/frontendService.ts | Adds chapter completion API helper. |
| ChatApp/src/services/bookService.ts | Adds book info/detail save helpers. |
| ChatApp/src/services/apiClient.ts | Refactors API client into Learning/Chat client instances. |
| ChatApp/src/services/tests/apiClient.test.ts | Adds API client unit tests. |
| ChatApp/src/navigation/types.ts | Adds Feed/Admin routes and nested tab params. |
| ChatApp/src/navigation/RootNavigator.tsx | Registers admin stack screens. |
| ChatApp/src/navigation/MainTabs.tsx | Adds Feed tab and conditional Admin tab. |
| ChatApp/src/features/settings/screens/SettingsScreen.tsx | Displays package version and both API base URLs. |
| ChatApp/src/features/feed/screens/LearningFeedScreen.tsx | Implements Learning Feed UI and interactions. |
| ChatApp/src/features/dashboard/screens/DashboardScreen.tsx | Shows progress/chapter info and enables continue learning. |
| ChatApp/src/features/courses/screens/CourseDetailScreen.tsx | Shows progress and current/next chapter details. |
| ChatApp/src/features/admin/screens/RefinementQueueScreen.tsx | Implements refinement queue/status/action UI. |
| ChatApp/src/features/admin/screens/AdminHomeScreen.tsx | Adds admin navigation hub actions. |
| ChatApp/src/config/env.ts | Adds Chat API base URL config. |
| ChatApp/src/config/appInfo.ts | Exposes app version from package metadata. |
| ChatApp/package.json | Adds unit-test script and bumps package version. |
| ChatApp/docs/slices/11-learning-feed.md | Documents Learning Feed slice. |
| ChatApp/docs/slices/08-vectorize-monitoring.md | Adds vectorize monitoring slice doc. |
| ChatApp/docs/slices/07-admin-content-flow.md | Updates admin refinement flow documentation. |
| ChatApp/docs/slices/05-book-reading.md | Updates book reading/progress scope. |
| ChatApp/docs/slices/04-learning-dashboard.md | Updates dashboard progress behavior. |
| ChatApp/docs/roadmap.md | Adds Learning Feed roadmap entry. |
| ChatApp/docs/architecture.md | Adds feed feature to architecture docs. |
| ChatApp/app.json | Bumps Expo app version. |
| ChatApp/.gitignore | Ignores test build output. |
| ChatApp/.env.example | Documents Chat API base URL env var. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+187
to
+203
| const handleCreateFeed = useCallback(() => { | ||
| const content = composerText.trim(); | ||
| if (!content) { | ||
| return; | ||
| } | ||
| const channelIdAtStart = selectedChannelId; | ||
| void runOperation("create-feed", async () => { | ||
| const result = await createLearningFeed({ | ||
| content, | ||
| channel_id: channelIdAtStart, | ||
| }); | ||
| if (selectedChannelIdRef.current === channelIdAtStart) { | ||
| setItems((current) => [result.item, ...current]); | ||
| } | ||
| setComposerText(""); | ||
| }); | ||
| }, [composerText, runOperation, selectedChannelId]); |
Comment on lines
+211
to
+217
| const channelIdAtStart = selectedChannelIdRef.current; | ||
| void runOperation(`like:${feedId}`, async () => { | ||
| const result = await toggleLearningFeedLike(feedId); | ||
| if (selectedChannelIdRef.current === channelIdAtStart) { | ||
| setItems((current) => updateFeedItem(current, result.item)); | ||
| } | ||
| }); |
Comment on lines
+222
to
+239
| const handleAddComment = useCallback( | ||
| (item: LearningFeedItem) => { | ||
| const feedId = String(item.id || "").trim(); | ||
| const content = String(commentDrafts[feedId] || "").trim(); | ||
| if (!feedId || !content) { | ||
| return; | ||
| } | ||
| const channelIdAtStart = selectedChannelIdRef.current; | ||
| void runOperation(`comment:${feedId}`, async () => { | ||
| const result = await addLearningFeedComment(feedId, content); | ||
| if (selectedChannelIdRef.current === channelIdAtStart) { | ||
| setItems((current) => updateFeedItem(current, result.item)); | ||
| setCommentDrafts((current) => ({ ...current, [feedId]: "" })); | ||
| } | ||
| }); | ||
| }, | ||
| [commentDrafts, runOperation], | ||
| ); |
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.