[LC-1468] Add Ed.link LMS integration for automatic credential issuance (POC)#975
[LC-1468] Add Ed.link LMS integration for automatic credential issuance (POC)#975AlexFicachi wants to merge 16 commits intomainfrom
Conversation
β¦ck, removing auto-fetch cascade
|
β Deploy Preview for staging-learncardapp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
β Deploy Preview for learncarddocs canceled.
|
|
π 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. |
β¦ions and add multi-completion coverage
β¦nd, env var for backend)
There was a problem hiding this comment.
β¨ PR Review
The PR implements a comprehensive Ed.link integration with good test coverage. However, there are two notable bugs: phantom connection creation on backend failures and silent data truncation in pagination logic.
2 issues detected:
π Bug - Creates phantom connection in UI when backend save fails, leading to inconsistent state and confusing UX. π οΈ
Details: When backend save fails, the connection is still added to local state. This creates an inconsistent state where the connection appears in the UI but doesn't exist in the database. Any operations on this connection will fail, and the connection will disappear on page refresh, creating a confusing user experience.
File:apps/learn-card-app/src/pages/schoolPortal/SchoolPortalDashboard.tsx (57-62)
π οΈ A suggested code correction is included in the review comments.π Bug - Silently truncates data after 10 pages without warning, causing missing credentials for completions beyond the limit.
Details: The fetchAllPages function has a hardcoded maxPages default of 10, and silently stops fetching when this limit is reached. This can cause incomplete data fetching for classes, people, and enrollments, potentially resulting in missing credentials for students. If an LMS has more than 10 pages of any resource, those beyond page 10 will be silently ignored without any warning or logging.
File:services/learn-card-network/brain-service/src/helpers/edlink.helpers.ts
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
| // Still update local state for UX | ||
| setConnections(prev => { | ||
| if (prev.some(c => c.id === connection.id)) return prev; | ||
| return [...prev, connection]; | ||
| }); | ||
| setSelectedConnection(connection); |
There was a problem hiding this comment.
π Bug - Phantom Connection: Remove the fallback local state update in the catch block (lines 58-62). Instead, show an error notification to the user when the backend save fails, so they know the connection was not created successfully.
| // Still update local state for UX | |
| setConnections(prev => { | |
| if (prev.some(c => c.id === connection.id)) return prev; | |
| return [...prev, connection]; | |
| }); | |
| setSelectedConnection(connection); | |
| // TODO: Show error notification to the user |
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
β Deploy Preview for app-store-1-basic-launchpad-app canceled.
|
|
π₯· Code experts: TaylorBeeston, rhen92 TaylorBeeston, rhen92 have 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: β¨ Comment |
Overview
https://www.loom.com/share/f7c1cd97e16642e78f887d45260ea1a4
π Relevant Jira Issues
LC-1468
π What is the context and goal of this PR?
Adds Ed.link LMS integration that automatically issues credentials to students when they complete assignments. Schools connect their LMS (Google Classroom, Canvas, etc.) via Ed.link, and the system polls for assignment completions every 5 minutes, issuing credentials to students via email (using the inbox claim flow).
π₯΄ TL;DR:
Connect LMS β Teacher returns graded assignment β Credential auto-issued to student
π‘ Feature Breakdown
Backend:
issueToInbox()Frontend:
/school-portalFeature Flags:
edLinkEnabledvia LaunchDarkly (hot toggle)EDLINK_ENABLEDenv var (requires restart)EDLINK_POLLING_ENABLEDsub-flagπ Important tradeoffs made:
openRouteused for all Ed.link endpoints. Sufficient for POC, needs auth before prod.π Types of Changes
π³ Does This Create Any New Technical Debt?
Testing
π¬ How Can Someone QA This?
Watch Here (Same loom video at the top of this post under "Overview")
EDLINK_ENABLED=trueandEDLINK_POLLING_ENABLED=truein brain serviceedLinkEnabledflag in LaunchDarkly/school-portalπ± π₯ Which devices?
Chromium, tested in Docker local environment
π§ͺ Code Coverage
brain-service/test/edlink.spec.tscovering:Documentation
π Documentation Checklist
User-Facing Docs
Internal/AI Docs
brain-service/docs/edlink-auto-issuance.mdcovers architecture, key files, feature flags, and POC limitationsπ Documentation Notes
β PR Checklist
π Ready to squash-and-merge?:
openRoute- acceptable for POC behind feature flag, needs auth before production⨠PR Description
Purpose: Add Ed.link LMS integration with automatic credential issuance for completed assignments using polling-based synchronization and system-level credential signing.
Main changes:
Generated 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