Conversation
* fix(exp): address experience bar overflows * fix(exp): remove redundant else branch in master exp bar rendering Agent-Logs-Url: https://github.com/olisikh/ClosedMuMain/sessions/48614910-9c0b-4ba3-b996-df0a139a9f13 Co-authored-by: olisikh <1538201+olisikh@users.noreply.github.com> * code review remarks addressed * Fix EXP bar max-progress rendering and clamp with std::clamp * Fix remaining EXP review findings * Fix master EXP lower bound calc for MSVC * Fix saturating subtraction edge case --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: olisikh <1538201+olisikh@users.noreply.github.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses issues where experience bar values could overflow or display incorrectly by implementing strict bounds checking and safe arithmetic operations. It introduces centralized logic for calculating experience boundaries and clamping values, ensuring that both normal and master experience progression remain within valid ranges during updates and rendering. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors experience rendering and calculation logic to improve robustness and prevent overflows. It introduces a buildExpSegment helper in NewUIMainFrameWindow.cpp and several saturating arithmetic and bounding helpers in WSclient.cpp. Feedback suggests using std::numeric_limits for better C++ style and simplifying the saturating multiplication logic.
Fixes bar overflows when sometimes it shows numbers > 9, both for master and normal experience progression.
This PR is manually tested by myself, works pretty well so far.