feat: add personal dashboard#35
Conversation
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
There was a problem hiding this comment.
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
/dashboardUI 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.
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
There was a problem hiding this comment.
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.
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
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
Changes Made
Client:
emojifield in badges).Server:
ContributorStatsController,ContributorStatsService, andContributorStatsResponseDTO to serve aggregated user data.Database:
Testing
Manual Testing
Screenshots/Videos
Before:
No existing dashboard
After:
