-
Notifications
You must be signed in to change notification settings - Fork 8
feat: LC-1463 - AI Pathways MVP #932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
👋 Hey there! It looks like you modified code, but didn't update the documentation in If this PR introduces new features, changes APIs, or modifies behavior that users or developers need to know about, please consider updating the docs. 🏄 Windsurf TipYou can ask Windsurf to help:
Windsurf will review your changes and suggest appropriate documentation updates based on what was modified. 📚 Documentation Guide
This is an automated reminder. If no docs are needed, feel free to ignore this message. |
|
🥷 Code experts: TaylorBeeston TaylorBeeston has most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: ✨ Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨ PR Review
The PR introduces a comprehensive AI Pathways MVP feature with career exploration, course discovery, and content recommendations. However, there are critical production-readiness issues including hardcoded localhost URLs that will break in production, and a React hooks dependency bug that will cause stale data.
3 issues detected:
🐞 Bug - Production code contains hardcoded localhost URLs that will cause all API requests to fail in deployed environments. 🛠️
Details: Multiple API endpoints are hardcoded to 'http://localhost:3001' which will fail in production environments. All career pathway features (occupations, salaries, training programs, courses) will be completely non-functional outside of local development.
File:packages/learn-card-base/src/react-query/queries/careerOneStop.ts (7-10)
🛠️ A suggested code correction is included in the review comments.🐞 Bug - The useMemo dependency array is incomplete - missing 'fieldOfStudy' will prevent recalculation when this value changes, leading to stale data. 🛠️
Details: The useMemo hook for 'courses' depends on 'fieldOfStudy' for filtering but doesn't include it in the dependency array. When fieldOfStudy changes, the courses won't be recalculated, causing stale/incorrect data to be displayed to users.
File:apps/learn-card-app/src/pages/ai-pathways/AiPathways.tsx (78-78)
🛠️ A suggested code correction is included in the review comments.🐞 Bug - Default behavior changed from showing delete buttons to hiding them, which breaks existing functionality without explicit prop passing. 🛠️
Details: The component previously always showed delete buttons (hardcoded showDeleteButton prop), but now defaults to false. This is a breaking change that will hide delete buttons across the application wherever this component is used without explicitly passing showDeleteButton=true.
File:apps/learn-card-app/src/components/boost-endorsements/EndorsementMediaAttachments/EndorsementAttachmentsList.tsx (16-16)
🛠️ A suggested code correction is included in the review comments.
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how
| const fetchOccupationDetailsForKeyword = async ( | ||
| keyword: string | ||
| ): Promise<OccupationDetailsResponse[]> => { | ||
| const res = await fetch(`http://localhost:3001/insights/occupations`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐞 Bug - Hardcoded Localhost URLs: Replace hardcoded localhost URLs with environment variables or configuration constants. Create a base URL constant that can be configured per environment (e.g., process.env.REACT_APP_INSIGHTS_API_URL or a config file).
| const fetchOccupationDetailsForKeyword = async ( | |
| keyword: string | |
| ): Promise<OccupationDetailsResponse[]> => { | |
| const res = await fetch(`http://localhost:3001/insights/occupations`, { | |
| const API_BASE_URL = process.env.REACT_APP_INSIGHTS_API_URL || 'http://localhost:3001'; | |
| const fetchOccupationDetailsForKeyword = async ( | |
| keyword: string | |
| ): Promise<OccupationDetailsResponse[]> => { | |
| const res = await fetch(`${API_BASE_URL}/insights/occupations`, { |
Is this review accurate? Use 👍 or 👎 to rate it
If you want to tell us more, use /gs feedback e.g. /gs feedback this review doesn't make sense, I disagree, and it keeps repeating over and over
| return schoolPrograms?.length | ||
| ? filterCoursesByFieldOfStudy(schoolPrograms, fieldOfStudy) | ||
| : []; | ||
| }, [schoolPrograms]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐞 Bug - Missing Dependency in useMemo: Add 'fieldOfStudy' to the dependency array: }, [schoolPrograms, fieldOfStudy]);
| }, [schoolPrograms]); | |
| }, [schoolPrograms, fieldOfStudy]); |
Is this review accurate? Use 👍 or 👎 to rate it
If you want to tell us more, use /gs feedback e.g. /gs feedback this review doesn't make sense, I disagree, and it keeps repeating over and over
| setEndorsement: React.Dispatch<React.SetStateAction<EndorsementState>>; | ||
| }> = ({ endorsement, setEndorsement }) => { | ||
| showDeleteButton?: boolean; | ||
| }> = ({ endorsement, setEndorsement, showDeleteButton = false }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐞 Bug - Breaking Behavioral Change: Change the default value to true to maintain backward compatibility: showDeleteButton = true, or audit all usages to explicitly pass the prop before deploying.
| }> = ({ endorsement, setEndorsement, showDeleteButton = false }) => { | |
| }> = ({ endorsement, setEndorsement, showDeleteButton = true }) => { |
Is this review accurate? Use 👍 or 👎 to rate it
If you want to tell us more, use /gs feedback e.g. /gs feedback this review doesn't make sense, I disagree, and it keeps repeating over and over
Overview
USE THIS BACKEND PR
🎟 Relevant Jira Issues
📚 What is the context and goal of this PR?
This PR introduces AI Pathways MVP, a new feature that converts a learner’s credentials and AI insights into actionable career, course, and training pathways.
AI Pathways connects three layers:
• AI Insights (skills, occupations, careers, field of study)
• CareerOneStop (occupations, salaries, training programs)
• OpenSyllabus (granular, field-aligned coursework)
The result is a structured, explainable pathway from what the learner knows → what they should learn next → where that learning exists.
⸻
• Strongest Area
• Skill, job, occupation keywords
• A single, aligned fieldOfStudy (from OpenSyllabus taxonomy)
• Learning Pathways, when present, take precedence over Strongest Area insights.
• If no reliable keywords exist, downstream querying is skipped.
⸻
• Occupations
• Salary data
• Training programs (1–4 year programs)
• Career data provides the macro view of potential pathways.
⸻
• AI Pathways attempts to resolve granular courses first:
• If matching courses exist:
• Display OpenSyllabus courses
• If not:
• Fall back to CareerOneStop training programs
⸻
• Learning Pathways Strongest Area > AI Insights Strongest Area
• Courses > Training Programs (when available)
• No keywords → no downstream queries
⸻
/ai/pathways🥴 TL; RL:
💡 Feature Breakdown (screenshots & videos encouraged!)
Ai pathways
https://www.loom.com/share/2ed5f6803da94969b25fce444892aa97
Public Facing Route for pathways
https://www.loom.com/share/981a575033af48e69e8e0561a9abf149
Empty Placeholder
Suggested Courses
Suggested Sessions
Suggested Careers
Suggested Content
🛠 Important tradeoffs made:
🔍 Types of Changes
💳 Does This Create Any New Technical Debt? ( If yes, please describe and add JIRA TODOs )
Testing
🔬 How Can Someone QA This?
View the video for testing instructions
📱 🖥 Which devices would you like help testing on?
🧪 Code Coverage
Documentation
📝 Documentation Checklist
User-Facing Docs (
docs/→ docs.learncard.com)docs/tutorials/)docs/how-to-guides/)docs/sdks/)docs/core-concepts/)docs/apps/)Internal/AI Docs
Visual Documentation
💭 Documentation Notes
✅ PR Checklist
🚀 Ready to squash-and-merge?:
✨ PR Description
Purpose: Add AI Pathways MVP feature to enable personalized learning pathway recommendations by integrating CareerOneStop occupation data, OpenSyllabus courses, and AI insights with career exploration and content discovery capabilities.
Main changes:
/ai/pathwayswith components for displaying careers, courses, sessions, and learning content filtered by keywords and field of studyuseAiPathwayshook to extract pathway keywords from AI insights and resolve pathway credentials with familial boost lookup for topic associationsGenerated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how