Skip to content

[BUG] Leaderboard shows negative XP and incorrect progress values #3

@youngcoder45

Description

@youngcoder45
Image

The leaderboard page is displaying incorrect XP values for users.
Some users have negative XP values and the progress percentage exceeds the valid range, which should not happen in a normal leveling system.

For example:

  • XP values appear like -2,184 / 1,000
  • Progress percentages appear like -218.4%
  • XP is going below 0 and exceeding the level limit range.

This indicates that the XP calculation or progress calculation logic may be incorrect.

Steps to Reproduce

  1. Open the Miku dashboard
  2. Navigate to the Leaderboard page
  3. Observe the XP and progress values for users

Expected Behavior

  • XP should never be negative
  • XP should remain between 0 and the required XP for the next level
  • Progress percentage should stay between 0% and 100%

Actual Behavior

  • XP values are negative
  • XP exceeds the allowed range
  • Progress percentages show negative values (e.g. -218%)

Screenshot

Attach the screenshot showing negative XP and incorrect progress values.

Possible Causes

  • XP subtraction or reset logic may be incorrect
  • Level-up calculation may not properly clamp XP values
  • Progress percentage formula may be using incorrect variables
  • Database values may contain corrupted or unvalidated XP data

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions