-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
0and exceeding the level limit range.
This indicates that the XP calculation or progress calculation logic may be incorrect.
Steps to Reproduce
- Open the Miku dashboard
- Navigate to the Leaderboard page
- Observe the XP and progress values for users
Expected Behavior
- XP should never be negative
- XP should remain between
0and the required XP for the next level - Progress percentage should stay between
0%and100%
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
- Dashboard: https://miku-two.vercel.app
- API: Render deployment
- Bot Framework: discord.py
- Database: PostgreSQL
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working