Skip to content

epic: practice-centric profile replaces public leaderboard #1206

@FelixTJDietrich

Description

@FelixTJDietrich

Goal

Turn the workspace homepage from a public ELO ranking into a practice-centric profile page that is the primary surface every contributor lands on. The profile shows each person their own practice trajectory — what they're doing well, where they're struggling, what the mentor has flagged — and lets workspace maintainers drill in from a cohort dashboard for intervention. The current "league points" + weekly Slack "top 3 reviewers" mechanic is deleted entirely; OSS-style contributor recognition is preserved as an opt-in section of the same profile, not a separate scoreboard.

The leaderboard contradicts the mentor thesis the rest of the product is built around. The gamification-in-education literature is consistent that public individual ranking suppresses intrinsic motivation in project-based learning contexts, with worse effects on under-represented students. Replacing it with self-comparison-over-time + instructor distribution dashboards + opt-in contributor recognition aligns the product with the formative-feedback model it already commits to.

Shape after the epic

  • /u/{handle} is the primary surface. Practice findings (per-practice POS/NEG/NA counts, trajectory, recent specific findings, mentor-flagged improvements) are the dominant section. Activity counts (reviews completed, MRs opened, issues opened) are secondary.
  • Audience-aware rendering — one route, four tiers based on the viewer's relationship to the profile owner: self / instructor or workspace maintainer / workspace peer / public visitor. Each tier sees a different field set; the owner controls peer + public visibility per workspace.
  • A workspace cohort dashboard exists for the admin / maintainer role. It surfaces distribution charts (histograms of practice-detection rates), no-engagement early-warning flags, and drill-down to a contributor's profile when intervention is warranted. It never presents a browsable ranking.
  • The ELO league-points machinery and the weekly Slack "top 3 reviewers" broadcast are gone. workspace_membership.league_points, Workspace.leaderboard_schedule_*, and Workspace.leaderboard_notification_* columns are dropped.
  • Server-side feature-flag enforcement on every dashboard endpoint. Today's WorkspaceFeatures.leaderboardEnabled is a webapp-only flag — endpoints return data regardless. That bug is fixed as part of the transformation; the flag is split into a workspace-toggleable publicAttributionEnabled (gates peer + public profile tiers, default OFF) and a role-gated instructor cohort surface.

Key decisions (locked)

Decision Choice
Profile audience rendering One route, four tiers — self / instructor or workspace maintainer / workspace peer / public visitor. Owner controls peer + public via user_workspace_preference.
Default flag posture Self + instructor (role-gated) tiers default-on, platform-fixed. Peer + public tiers default-off, workspace + per-user opt-in BOTH required.
ELO + league points Deleted, not preserved. Anti-pattern in PBL contexts per the systematic-review literature; no preservation justifies the deletion cost.
Weekly Slack top-3 broadcast Deleted. Replaced — when the user wants Slack-side engagement — by the proactive reflection DM flow in the Slack-mentor epic.
Workspace homepage Replaces the leaderboard. Routes per role: a student lands on their own profile; an instructor lands on the cohort dashboard; an unauthenticated visitor sees a minimal workspace landing.
Public attribution shape All-contributors-style — typed contribution counts, absolute, alphabetical or contribution-kind grouping. No ordering, no rank, no score. Opt-in per workspace per user.
Server-side flag enforcement All dashboard endpoints reject with 404 (not empty list) when their flag is off. Fixes the existing scrape-the-API leak.
Free-rider surfacing Self-comparison only on the profile; cohort distribution + early-warning flags on the instructor dashboard. No peer-comparison view in v1.

Non-goals (deliberately not building)

  • Internal team leaderboard, even if anonymized. Same anti-pattern in different dress. Defer until a workspace explicitly demands it with a justifying use case and an empirical baseline.
  • Instructor leaderboard of students. The instructor view is distributions + early-warning flags + intervention drill-down. No ranked roster.
  • Grade integration. Practice findings stay decoupled from grading; coupling is a hard ship-blocker for the formative-feedback alignment this epic establishes.
  • A rank field on any new API DTO. The field is deleted, not refactored.
  • Time-bounded "team sprint challenges." Defensible per the literature if team-based + time-bounded + opt-in + decoupled from grades, but not a v1 capability.

Sequencing (blocking chain: #1271#1272#1273#1274#1275#1276#1277#1278)

  1. chore(server,webapp): delete ELO league-points and weekly Slack top-3 task #1271 — Delete ELO league-points and weekly Slack top-3 task
  2. refactor(server): extract ProfileActivityService from leaderboard internals #1272 — Shared ProfileActivityService extracted from existing leaderboard internals
  3. feat(webapp,server): practice-centric profile with audience-aware rendering #1273 — Profile page transformation as practice-centric primary surface
  4. feat(webapp,server): instructor cohort dashboard with distributions and flags #1274 — Instructor cohort dashboard with distribution + early-warning flags
  5. feat(server,webapp): per-user per-workspace public-attribution opt-in #1275 — Per-user per-workspace public-attribution opt-in preferences
  6. feat(webapp): workspace homepage routing per viewer role #1276 — Workspace homepage routing per role
  7. fix(server): server-side feature-flag enforcement on dashboard endpoints #1277 — Server-side feature-flag enforcement on all dashboard endpoints
  8. chore(server): drop leaderboard columns and backfill profile preferences #1278 — Migration script dropping leaderboard columns + backfilling preferences

Acceptance criteria (epic-level)

  • GET /api/users/{handle}/profile returns the practice-centric primary view; field set varies by viewer tier; viewer tier is resolved server-side from auth + workspace memberships, never trusted from a request parameter
  • GET /api/workspaces/{slug}/cohort is role-gated to workspace admin / maintainer and returns distributions + flags — never a sorted list of users
  • workspace_membership.league_points and Workspace.leaderboard_schedule_* + leaderboard_notification_* columns are dropped via a Liquibase changeset; the API surface has no remaining rank / score / league_points field
  • Webapp homepage routing: a logged-in student visiting /w/{slug} lands on their own profile; a logged-in workspace admin lands on the cohort dashboard; an unauthenticated visitor sees a minimal workspace landing (no redirect loop)
  • Every dashboard endpoint returns 404 when its enabling flag is off (verified by an integration test that flips the flag and re-scrapes); the existing leaderboardEnabled flag is retired in favor of publicAttributionEnabled plus role gates
  • Migration is reversible by Liquibase down-script for one release cycle; populated league-point or leaderboard-schedule values are snapshotted into the integration audit log before the column drop

Risks

  • Workspace homepage redirect-loop UX bug. The current /w/{slug} redirects to user profile when leaderboardEnabled=false, but spins forever for unauthenticated visitors. The homepage-routing sub-issue must close this; not closing it means the deletion of the leaderboard breaks navigation for cold visitors.
  • Server-side flag bug today is a data leak. Anyone scraping /api/workspaces/{slug}/leaderboard gets the full ranking regardless of the workspace toggle. The flag-enforcement sub-issue is the security fix; it ships with the deletion, not after.
  • Profile activity service shared by two callers. If the profile sub-issue and the cohort dashboard sub-issue race, the service surface needs to be locked first. The service sub-issue ships before either consumer; both consumers depend on it.
  • Instructor visibility into student profiles disclosure. For TUM context, instructor visibility into a student's practice findings is the educational legitimate-interest basis. Mitigation: the privacy admin UI section surfaces this disclosure to students at signup (composed via the privacy + retention epic), not in a footnote.

Metadata

Metadata

Assignees

No one assigned

    Labels

    application-serverSpring Boot server: APIs, business logic, databasebreakingIntroduces breaking API or behavior changesepicLarge feature or initiative with multiple sub-issuesfeatureNew feature or enhancementpriority:highAddress this sprint - Significant impactwebappReact app: UI components, routes, state management

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions