-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Issue# 365: PVP Rank #424
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Phrosfire <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe update introduces a new constant, Changes
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/drizzle/constants.ts (1)
158-165
: Nice implementation of ranked divisions with LP thresholds.The RankedDivisions constant effectively defines the different ranks players can achieve, with clear league point thresholds for each division. I especially like how you've set up an implicit progression system with increasing LP requirements.
Consider adding a brief comment explaining the intended progression between ranks and what "Infinity" for SANNIN means in practical terms (e.g., whether it's truly unreachable or just represents the highest tier with no upper limit).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/drizzle/constants.ts
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: analyze
- GitHub Check: build-test
- GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
app/drizzle/constants.ts (2)
166-167
: Good type safety implementation.Using TypeScript's keyof and indexed access operators to create strongly-typed interfaces for the ranked divisions will help prevent errors when working with these values throughout the codebase.
283-283
:✅ Verification successful
Successfully extended PvpBattleTypes with the new ranked option.
This addition aligns well with the PR objective of introducing ranked PVP battles. This change ensures that ranked battles become a first-class PvP battle type in the system.
Verify that any code consuming PvpBattleTypes can handle this new value:
🏁 Script executed:
#!/bin/bash # Look for places that might be using PvpBattleTypes in switch statements or equality checks rg -A 2 -B 2 "PvpBattleTypes|BattleType.*COMBAT|BattleType.*SPARRING|BattleType.*CLAN_BATTLE|BattleType.*TOURNAMENT"Length of output: 3966
PvpBattleTypes Extension Verified: Consuming Code Handles "RANKED" Correctly
After reviewing the search output:
- In files like
app/src/layout/Combat.tsx
andapp/src/server/api/routers/combat.ts
, the code uses membership checks (via.includes
) onPvpBattleTypes
, which will automatically recognize and handle the new"RANKED"
value.- No additional adjustments or special-case logic are needed since all consumers evaluate the battle type dynamically.
The new
"RANKED"
option integrates seamlessly with the existing conditional logic.
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
Signed-off-by: Phrosfire <[email protected]>
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
129.62 KB (🟡 +1 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Signed-off-by: Phrosfire <[email protected]>
Signed-off-by: Phrosfire <[email protected]>
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
129.62 KB (🟡 +3 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
Signed-off-by: Phrosfire <[email protected]>
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
129.62 KB (🟡 +1 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
Signed-off-by: Phrosfire <[email protected]>
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
Signed-off-by: Phrosfire <[email protected]>
Signed-off-by: Phrosfire <[email protected]>
Signed-off-by: Phrosfire <[email protected]>
📦 Next.js Bundle Analysis for tnrThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
As of right now, the pvp rank is added to the users profile. The rank thresholds are in constants and the router determines the persons rank. This is still a work in progress. |
Pull Request
Add ranked pvp as an option for battling. Users will be assigned ranks based on their LP as well as rewards.
License
By making this pull request, I confirm that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the Studie-Tech ApS organization has the copyright to use and modify my contribution for perpetuity.
Summary by CodeRabbit