Skip to content

feat: seed learning resources and implement competency<>resource UI#29

Merged
MaximilianAnzinger merged 65 commits into
mainfrom
feature/session-learning-resources
Jan 13, 2026
Merged

feat: seed learning resources and implement competency<>resource UI#29
MaximilianAnzinger merged 65 commits into
mainfrom
feature/session-learning-resources

Conversation

@markstockhausen

Copy link
Copy Markdown
Contributor

Add initial seeding data and logic for learning resources to support development/demo workflows

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 Style/formatting changes (no functional changes)
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvements
  • 🔧 Configuration changes
  • 🧪 Test additions or modifications
  • 🚀 Deployment/DevOps changes

Related Issues

Related to feat: implement competency-resource mapping UI #24

Changes Made

Area Changes
Client Add resource mapping mode to session page; extract reusable components (TypeSelectionButton, SkeletonCard, MappingCard); add useHoverWithTimeout hook
Server Add getRandomLearningResourceAction for fetching random resources; add createCompetencyResourceLinkAction and deleteCompetencyResourceLinkAction
Database Add initial learning resource seed data
Other Refactor session page from ~1670 to ~900 lines

Testing

Test Cases

  • Existing functionality still works
  • New functionality works as expected
  • Edge cases handled appropriately

Manual Testing

  • Tested in development environment
  • Tested with different user roles/permissions (if applicable)

Screenshots/Videos

Before

Before

After

image

vtotalova and others added 30 commits November 25, 2025 12:50
- Add unique constraint on CompetencyRelationship to prevent duplicates
- Add database indexes on CompetencyResourceLink foreign keys for performance
- Make userId optional in CompetencyResourceLink with SetNull on delete
- Add error logging and visibility in migration system
- Move database docs to root as DATABASE.md
- Sync package-lock.json with package.json (TypeScript 5.9.3)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Maximilian Anzinger <44003963+MaximilianAnzinger@users.noreply.github.com>
Co-authored-by: Maximilian Anzinger <44003963+MaximilianAnzinger@users.noreply.github.com>
…om:ls1intum/memo into feature/setup-domain-core-db-communication

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a comprehensive competency-resource mapping UI to support issue #24, enabling contributors to align learning resources with competencies. The implementation includes database schema updates, seed data for learning resources, new UI components for dual-mode mapping (competency-to-competency and competency-to-resource), and significant refactoring of the session page.

Changes:

  • Added ResourceMatchType enum and matchType field to CompetencyResourceLink model for quality categorization
  • Created reusable mapping components (TypeSelectionButton, SkeletonCard, MappingCard) and a hover management hook
  • Refactored session page from ~1670 to ~900 lines with dual-mode support for mapping competencies and resources

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
prisma/schema.prisma Added ResourceMatchType enum, matchType field, UNRELATED relationship type, and replaced unique constraint with separate indexes
prisma/seed.js Added seed data for 5 learning resources with placeholder URLs
domain_core/model/domain_model.ts Exported ResourceMatchType enum and added matchType to link interfaces
domain_core/services/learning_resource.ts Added getRandomLearningResource method for fetching random resources
domain_core/repositories/dc_repo.ts Updated repository to handle matchType field in link creation
hooks/useHoverWithTimeout.ts New custom hook for debounced hover state management
components/session/session-constants.ts Centralized configuration for relationship types, resource match types, colors, and icons
components/session/TypeSelectionButton.tsx Reusable generic button component for type selection
components/session/SkeletonCard.tsx Loading skeleton for card placeholders
components/session/MappingCard.tsx Unified card component for displaying competencies and resources
components/ui/tooltip.tsx Refactored to use portals for absolute positioning with improved positioning logic
components/ui/badge.tsx Added missing React type import
components/navbar.tsx Fixed activeIndex calculation and restructured "Start Contributing" button
components/footer.tsx Converted anchor tags to Next.js Link components
app/session/page.tsx Major refactor to support dual-mode mapping with keyboard shortcuts and improved UX
app/page.tsx Fixed apostrophe encoding and simplified CSS class usage
app/layout.tsx Added flexbox layout structure for better content flow
app/globals.css Added custom scrollbar utility classes
docker/development/docker-compose.yml Removed deprecated version field
app/actions/learning_resources.ts Added getRandomLearningResourceAction server action
app/actions/competency_resource_links.ts Added matchType parameter with validation logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread prisma/seed.js
Comment thread components/ui/tooltip.tsx Outdated
Comment thread app/session/page.tsx
Comment thread app/session/page.tsx
Comment thread components/session/TypeSelectionButton.tsx Outdated
Comment thread components/ui/tooltip.tsx Outdated
Comment thread app/session/page.tsx
Comment thread prisma/schema.prisma
Comment thread app/session/page.tsx Outdated
Comment thread app/session/page.tsx Outdated
vtotalova
vtotalova previously approved these changes Jan 13, 2026
@vtotalova

Copy link
Copy Markdown
Contributor

you should merge main on this branch

@ls1intum ls1intum deleted a comment from Copilot AI Jan 13, 2026
@ls1intum ls1intum deleted a comment from Copilot AI Jan 13, 2026
@ls1intum ls1intum deleted a comment from Copilot AI Jan 13, 2026
@ls1intum ls1intum deleted a comment from Copilot AI Jan 13, 2026
@ls1intum ls1intum deleted a comment from Copilot AI Jan 13, 2026
@ls1intum ls1intum deleted a comment from Copilot AI Jan 13, 2026
@ls1intum ls1intum deleted a comment from Copilot AI Jan 13, 2026
@github-actions github-actions Bot removed the docker 🐳 Docker/deployment changes label Jan 13, 2026
@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

1 similar comment
@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@github-actions

Copy link
Copy Markdown

🔍 Code Quality Report

📊 Code Statistics

🚨 Potential Issues

✅ No console statements found
⚠️ Found 'any' or 'unknown' types - consider using more specific types

@MaximilianAnzinger MaximilianAnzinger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for resolving the minor conflict

@MaximilianAnzinger
MaximilianAnzinger merged commit 29c2d6c into main Jan 13, 2026
8 checks passed
@MaximilianAnzinger
MaximilianAnzinger deleted the feature/session-learning-resources branch January 13, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client-application 🎨 Client-side/UI changes database 🗃️ Database related changes enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants