show mana column for solo players with mana#531
Merged
nschimme merged 1 commit intoMay 18, 2026
Merged
Conversation
The GroupWidget was hiding the Mana column until the player joined a group, even if the player themselves had mana. This happened because column visibility was only updated when characters were added or removed, but not when they were updated. This commit modifies GroupWidget::slot_onCharacterUpdated to conditionally trigger updateColumnVisibility() if the updated character's mana status is inconsistent with the current column visibility. This ensures the Mana column appears as soon as the player's vitals (including mana) are first received, while avoiding redundant visibility updates when the state hasn't changed.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds logic to GroupWidget::slot_onCharacterUpdated to re-evaluate mana column visibility when a character’s mana stats change, ensuring the Mana column appears for solo players with mana without performing redundant visibility updates. Sequence diagram for updated GroupWidget::slot_onCharacterUpdated mana visibility handlingsequenceDiagram
participant GroupWidget
participant GroupModel as GroupModel_m_model
participant GroupTable as GroupTable_m_table
participant Character as SharedGroupChar
GroupWidget->>GroupModel: updateCharacter(character)
GroupWidget->>Character: getMana()
GroupWidget->>Character: getMaxMana()
GroupWidget->>GroupTable: isColumnHidden(manaCol)
alt [mana column visibility inconsistent with hasMana]
GroupWidget->>GroupWidget: updateColumnVisibility()
end
GroupWidget->>GroupWidget: updatePulseTimer()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The condition
if (m_table->isColumnHidden(manaCol) == hasMana)is logically correct but a bit opaque; consider computing an explicitshouldShowManaand comparing it to the current hidden state to make the intent clearer. - The
hasManacheck duplicates the mana visibility decision logic; if similar logic exists elsewhere (e.g., when initially setting column visibility), consider centralizing this into a shared helper to keep behavior consistent.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The condition `if (m_table->isColumnHidden(manaCol) == hasMana)` is logically correct but a bit opaque; consider computing an explicit `shouldShowMana` and comparing it to the current hidden state to make the intent clearer.
- The `hasMana` check duplicates the mana visibility decision logic; if similar logic exists elsewhere (e.g., when initially setting column visibility), consider centralizing this into a shared helper to keep behavior consistent.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #531 +/- ##
==========================================
- Coverage 25.36% 25.36% -0.01%
==========================================
Files 519 519
Lines 43181 43185 +4
Branches 4705 4706 +1
==========================================
Hits 10952 10952
- Misses 32229 32233 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The GroupWidget was hiding the Mana column until the player joined a group, even if the player themselves had mana. This happened because column visibility was only updated when characters were added or removed, but not when they were updated.
This commit modifies GroupWidget::slot_onCharacterUpdated to conditionally trigger updateColumnVisibility() if the updated character's mana status is inconsistent with the current column visibility. This ensures the Mana column appears as soon as the player's vitals (including mana) are first received, while avoiding redundant visibility updates when the state hasn't changed.
Summary by Sourcery
Bug Fixes: