Skip to content

refactor: remove leaderboard, leagues, and XP progression #1374

Description

@FelixTJDietrich

Problem

The leaderboard/league/XP subsystem was superseded by the practice-centric model and is flag-gated off, but its code, schema, scheduled tasks (LeaguePointsUpdateTask, SlackWeeklyLeaderboardTask), the Slack digest publisher, and the workspace.leaderboard*/leagues/progression flags all remain. It is dead weight, an unnecessary tenancy/egress surface, and confusing to contributors.

What

  • Remove leaderboard/league/XP code paths (server + webapp), scheduled tasks, and the Slack digest publisher.
  • Remove the related workspace feature flags and columns (including the leaderboardNotificationEnabled residue).
  • Liquibase migration dropping tables/columns after a data snapshot; ERD and OpenAPI regenerated.
  • The leaderboard-flag-phase-out branch (PR feat(leaderboard): enforce the workspace flag and ship the practice report read model dark #1346) is the prepared precursor — it enforces the workspace flag and ports the read model dark; build the removal on top of it.

Sequencing

Today /w/{slug} is the leaderboard page. The replacement developer-facing practice home is Valentin's deliverable (PR #1347 serves as reference, not a merge candidate) and gates Gate 2 — the code removal itself does not wait on it. The existing production instance still shows the leaderboard to real users: coordinate this removal's deploy so they are not left with an empty product in the interim.

Concrete removal scope (from the page audit)

  • LeaderboardPage route (/w/$slug/index), leaderboard components, league progress/scoring dialogs.
  • ProfileHeader gamification (level badge, XP bar, league points) — and note ProfileContent imports from components/leaderboard/ (ActivityBadges, ReviewsPopover, score > 0 filter): extract/refactor these before deleting the directory (feat(webapp,server): practice-centric profile v1 (self and workspace-admin audiences) #1273 is the replacement surface).
  • AdminSettingsPage: strip the Leaderboard/XP/Leagues feature toggles and the AdminLeagueSettings league-reset action (embedded remnants, not standalone pages).
  • Scheduled tasks + Slack digest publisher (server side, as above); delete the ai/agents / ai/practice-detection redirect shims while touching navigation.

Scope decisions

  • Achievements stay (flag-gated): the achievement/ package is self-contained — no XP/league/leaderboard coupling. Post-1.0 intent: re-evaluate achievements against the practice-centric model; either integrate or remove in v2.0.0 — this sentence is the named owner of that decision.
  • AC: verify at the data level that no achievement definitions reference removed XP/league events.
  • AC: the pre-drop data snapshot procedure (what, where stored, who runs it) is documented and executed before the drop migration ships.
  • Docs: delete the leaderboard docs page with this change; achievements docs stay while achievements stay.

Supersedes #1336 and #1305 (closed leaderboard bugs) and completes #1249's remaining column cleanup (leaderboardNotificationEnabled); realizes the direction of the closed epic #1206. The practice-centric profile (#1273) replaces the developer-facing surface.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    High

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions