feat: add scheduling service for learning resources - #49
Open
markstockhausen wants to merge 63 commits into
Open
feat: add scheduling service for learning resources#49markstockhausen wants to merge 63 commits into
markstockhausen wants to merge 63 commits into
Conversation
…sable component to use it on main page and while onboarding
… accounts aborting onboarding
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
Contributor
|
please have a look at the merge conflicts |
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
Contributor
Author
Done! ✔️ |
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
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.
Description
Replaces the simple
competency_resource_linkstable with a full scheduling pipeline for competency↔resource mapping, mirroring the existing competency-relationship pipeline. Users are now shown resource-matching rounds (50 % probability per round) interleaved with competency-relationship rounds. Votes are aggregated per pair, entropy is tracked for consensus scheduling, and the UI is updated to support both modes seamlessly.Type of Change
Changes Made
Client:
competency-resource-links.ts; replaced withresource-scheduling.tswrapping the new/api/resource-schedulingendpointssession-helpers.tsandtypes.tsto support the dual-mode session (competency relationship + resource matching)SessionPage.tsx: mode is now chosen randomly at 50/50 each round (no user toggle); added stableloadMappingPaircallback,mappingModeRefto avoid stale closures, and single-fire initial load guard to eliminate blank-flash on mode switchMappingCard.tsx: resource card URL now wraps (break-all) instead of truncatingsession-constants.ts: addedRESOURCE_MATCH_TYPES,RESOURCE_*color/icon maps, reversed match-type order (Perfect Match → Unrelated), sharedTHEME_COLORS.resourceServer:
CompetencyResourceLinkService+CompetencyResourceLinkControllerwithResourceSchedulingServiceandResourceSchedulingControllerimplementing the same coverage+consensus dual-pipeline asSchedulingServiceCompetencyResourceMapping(one row per unique competency↔resource pair with denormalised vote counters + entropy) and vote-log entityCompetencyResourceMappingVoteCompetencyResourceMappingRepository(scheduling queries: coverage pool, consensus candidates, entropy index) andCompetencyResourceMappingVoteRepositorySchedulingConstantsutility class —COVERAGE_WEIGHT,LOW_DEGREE_POOL_SIZE,CONSENSUS_*— shared by both scheduling services; eliminated duplicationSchedulingService: simplified null guards (Objects.requireNonNullElse), fixedfindOrCreateRelationshiprace condition withDataIntegrityViolationExceptioncatch-and-retryCompetency+LearningResourceentities: addedresourceLinkDegreefieldCompetencyRepository+LearningResourceRepository: addedincrementResourceLinkDegreebulk-update queriesCompetencyResourceLinkRepositoryTest; updated existing repository tests for V11 schemaDatabase:
V11__create_resource_mapping_tables.sql: createscompetency_resource_mappingsandcompetency_resource_mapping_votestables with all indexes and foreign keys; addsresource_link_degreecolumns tocompetenciesandlearning_resources; drops the oldcompetency_resource_linkstableTesting
Test Cases
Manual Testing
Screenshots