Address Copilot review on the 1.8.0 release PR (#421)#425
Merged
Conversation
- ChallengesAddon.allLoaded(): reset levelProvided=false when the Level add-on is absent, so isLevelProvided() can't be stale-true and TryToComplete.rewardIslandLevel() can't NPE on a null level add-on. - EditChallengePanel: sort the required-biome list before rendering so the admin GUI description is stable (the backing set is unordered). - ChallengesPanel.createToggleUndeployedButton(): guard the template description with !isBlank() to avoid inserting empty lore lines, matching the other button builders. - ChallengesAddonTest: verify placeholder registration with atLeastOnce() instead of times(13) so the tests don't break whenever a placeholder is added or removed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DfEq1X2sy57G8nq2Cd23ba
Open
|
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.



Addresses the five Copilot review comments on the 1.8.0 release PR #421.
ChallengesAddon.allLoaded()— resetlevelProvided = falsein the "Level add-on not found" branch. Previously onlylevelAddonwas nulled, soisLevelProvided()could return a staletrueandTryToComplete.rewardIslandLevel()would NPE dereferencing a null Level add-on.EditChallengePanel— sort the required-biome list before rendering it into the button description. The backing collection is aSet, so the admin GUI could shuffle biome order between runs.ChallengesPanel.createToggleUndeployedButton()— guard the template description with!isBlank()so a blank template doesn't add an empty lore line, matching the other button builders in the class.ChallengesAddonTest— verify placeholder registration withatLeastOnce()instead oftimes(13). The exact count is incidental to what these tests assert and made them brittle to any placeholder being added/removed.Verification
mvn compile test-compileclean;ChallengesAddonTest,ChallengesPanelTestandTryToCompleteTestpass.🤖 Generated with Claude Code
https://claude.ai/code/session_01DfEq1X2sy57G8nq2Cd23ba