Skip to content

feat: add personal dashboard#35

Merged
MaximilianAnzinger merged 30 commits into
mainfrom
feature/personal-dashboard
Mar 4, 2026
Merged

feat: add personal dashboard#35
MaximilianAnzinger merged 30 commits into
mainfrom
feature/personal-dashboard

Conversation

@markstockhausen

@markstockhausen markstockhausen commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces a comprehensive Dashboard for users to track their progress, view contribution activity, and earn milestone badges. It also includes backend support for aggregating user statistics and a new Session Summary modal that appears after completing a mapping session.

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

Changes Made

  • Client:

    • Added DashboardPage with two key stat cards (Total Mappings, Streak) and a Contribution Heatmap.
    • Implemented ContributionHeatmap with a Monday-first layout, scrollable view for 1 year of history, and shared color logic.
    • Added SessionSummary modal to display session results (completed/skipped) and navigation options.
    • Updated BadgeCard with enhanced styling (glassmorphism, improved borders/shadows for earned state).
    • Added heatmapColor utility to unify color logic between the heatmap and legend.
    • Removed unused imports and dead code (e.g., emoji field in badges).
  • Server:

    • Created ContributorStatsController, ContributorStatsService, and ContributorStatsResponse DTO to serve aggregated user data.
    • Implemented logic to calculate current and longest streaks based on daily activity.
  • Database:

    • Added V8__seed_additional_competencies.sql which combines previous migrations:
      • Seeds 15 new competencies (Algorithms, Concurrency, Security, etc.).
      • Hydrates the database with 38 initial competency relationships and backdated votes to simulate ~8 weeks of activity for the guest user (including a 6-day streak).

Testing

Manual Testing

  • Verified Dashboard loads correctly with valid data from the backend.
  • Confirmed Contribution Heatmap renders correctly with Monday as the start of the week and appropriate data points.
  • Verified Session Summary modal appears after finishing a session and navigation buttons work.
  • Checked Badge styling and verify earned/unearned states visual distinction.
  • Validated Streak calculation logic with the seeded data (confirmed 6-day streak).
  • Server Health: Verified server starts up cleanly with the combined V8 migration and standard endpoints return 200 OK.

Screenshots/Videos

Before:
No existing dashboard

After:
AfterDashboard

@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 github-actions Bot added enhancement New feature or request client-application 🎨 Client-side/UI changes dependencies 📦 Dependency updates labels Feb 17, 2026

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

Adds a user-facing dashboard and a new scheduling/voting pipeline to power mapping sessions, including backend aggregation for contribution stats (streaks, heatmap) and a session summary modal.

Changes:

  • Introduce /dashboard UI with stat cards, contribution heatmap, and milestone badges.
  • Replace “create relationship” flow with scheduling-based “next task + submit vote” endpoints and client integration.
  • Add DB migrations + backend services to support relationship scheduling, vote logging, and contributor stats aggregation.

Reviewed changes

Copilot reviewed 35 out of 36 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/pages/SessionPage.tsx Switches competency mode to scheduled “next task + vote”, adds all-done state and session summary overlay.
src/pages/DashboardPage.tsx New dashboard page that fetches contributor stats and renders badges + heatmap.
src/lib/heatmap-helpers.ts Shared heatmap color utility for legend and grid.
src/lib/api/session-helpers.ts Adds helpers for fetching next relationship task and submitting votes via scheduling API.
src/lib/api/scheduling.ts New client API wrapper for scheduling endpoints (next task + vote) using X-User-Id.
src/lib/api/contributor-stats.ts New client API wrapper + types for contributor stats endpoint.
src/lib/api/competency-relationships.ts Removes client-side create call; keeps retrieval/deletion utilities.
src/index.css Adds Geist font CSS variables.
src/components/session/SessionSummary.tsx New session summary modal (dashboard link + continue session).
src/components/navbar.tsx Updates nav CTA to “Dashboard” and tweaks theme-toggle styling.
src/components/dashboard/ContributionHeatmap.tsx New heatmap component rendering ~1 year of daily activity.
src/App.tsx Adds /dashboard route.
server/src/main/resources/db/migration/V8__seed_additional_competencies.sql Seeds additional competencies, relationships, and backdated votes for demo activity.
server/src/main/resources/db/migration/V7__add_competency_degree.sql Adds degree column + index and backfills degrees.
server/src/main/resources/db/migration/V6__create_scheduling_tables.sql Introduces scheduling tables for relationships + vote log.
server/src/main/resources/db/migration/V5__drop_old_relationships.sql Drops legacy relationships table.
server/src/main/resources/db/migration/V2__seed_sample_data.sql Removes legacy relationship seed data.
server/src/main/java/de/tum/cit/memo/service/SchedulingService.java Implements coverage/consensus task selection and vote submission (including symmetric mirroring).
server/src/main/java/de/tum/cit/memo/service/ContributorStatsService.java Computes total votes, daily counts, streaks, and earned badges from vote timestamps.
server/src/main/java/de/tum/cit/memo/service/CompetencyRelationshipService.java Refactors relationship CRUD and updates competency degrees on create/delete.
server/src/main/java/de/tum/cit/memo/repository/CompetencyRepository.java Adds degree-based selection and degree increment/decrement methods.
server/src/main/java/de/tum/cit/memo/repository/CompetencyRelationshipVoteRepository.java New repository for vote existence checks and daily aggregation query.
server/src/main/java/de/tum/cit/memo/repository/CompetencyRelationshipRepository.java Adds scheduling queries (entropy candidates, unvoted-by-user, intra-pool).
server/src/main/java/de/tum/cit/memo/entity/CompetencyRelationshipVote.java New vote entity mapped to competency_relationships_votes.
server/src/main/java/de/tum/cit/memo/entity/CompetencyRelationship.java Refactors relationship entity to aggregated counters/entropy and adds recalculateEntropy.
server/src/main/java/de/tum/cit/memo/entity/Competency.java Adds degree field.
server/src/main/java/de/tum/cit/memo/dto/VoteResponse.java DTO for scheduling vote result (counts + entropy).
server/src/main/java/de/tum/cit/memo/dto/VoteRequest.java DTO for scheduling vote submission (relationshipId or origin+destination).
server/src/main/java/de/tum/cit/memo/dto/VoteCounts.java DTO for vote counters.
server/src/main/java/de/tum/cit/memo/dto/RelationshipTaskResponse.java DTO for next relationship task payload.
server/src/main/java/de/tum/cit/memo/dto/CreateCompetencyRelationshipRequest.java Removes legacy relationship-create DTO.
server/src/main/java/de/tum/cit/memo/dto/ContributorStatsResponse.java DTO for contributor stats payload (votes, streaks, daily counts, badges).
server/src/main/java/de/tum/cit/memo/controller/SchedulingController.java New scheduling endpoints: next task (204 when none) and vote submission.
server/src/main/java/de/tum/cit/memo/controller/ContributorStatsController.java New contributor stats endpoint.
server/src/main/java/de/tum/cit/memo/controller/CompetencyRelationshipController.java Removes legacy create endpoint; keeps CRUD endpoints.
package-lock.json Bumps axios and related transitive dependencies.

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

Comment thread src/pages/SessionPage.tsx
Comment thread src/components/dashboard/ContributionHeatmap.tsx Outdated
Comment thread server/src/main/java/de/tum/cit/memo/service/SchedulingService.java
Comment thread server/src/main/java/de/tum/cit/memo/service/SchedulingService.java Outdated
vtotalova
vtotalova previously approved these changes Feb 23, 2026
@github-actions github-actions Bot removed the client-application 🎨 Client-side/UI changes label Feb 27, 2026
@github-actions github-actions Bot added the client-application 🎨 Client-side/UI changes label Feb 27, 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

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

Copilot reviewed 20 out of 22 changed files in this pull request and generated 4 comments.


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

Comment thread src/components/dashboard/ContributionHeatmap.tsx Outdated
Comment thread server/src/main/java/de/tum/cit/memo/dto/VoteRequest.java Outdated
Comment thread server/src/main/java/de/tum/cit/memo/controller/SchedulingController.java Outdated
Comment thread src/components/session/SessionSummary.tsx
@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 github-actions Bot removed the client-application 🎨 Client-side/UI changes label Feb 27, 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

Comment thread src/pages/DashboardPage.tsx
Comment thread server/src/main/java/de/tum/cit/memo/service/ContributorStatsService.java Outdated
Comment thread server/src/main/java/de/tum/cit/memo/service/ContributorStatsService.java Outdated
Comment thread server/src/main/java/de/tum/cit/memo/service/ContributorStatsService.java Outdated
@github-actions

github-actions Bot commented Mar 4, 2026

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 merged commit dfde4e9 into main Mar 4, 2026
8 checks passed
@MaximilianAnzinger
MaximilianAnzinger deleted the feature/personal-dashboard branch March 4, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies 📦 Dependency updates enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants