Implement TOGGLEABLE undeployed view mode (#175)#417
Merged
Conversation
The undeployed-view-mode setting had a TOGGLEABLE option that was never implemented: selecting it behaved exactly like VISIBLE because the player panel only filtered undeployed challenges in HIDDEN mode. Finish it: in TOGGLEABLE mode the player GUI now shows a button (in the free-challenges row) that each player uses to show or hide undeployed challenges for themselves. The preference defaults to shown, so TOGGLEABLE starts out like VISIBLE, and the challenge/level lists are filtered through a single hideUndeployedChallenges() helper that covers both HIDDEN and TOGGLEABLE-hidden. - ChallengesPanel: showUndeployed session field, hideUndeployedChallenges() helper used by both list builders, and createToggleUndeployedButton (returns no button outside TOGGLEABLE mode). - main_panel.yml: TOGGLE_UNDEPLOYED button slot. - en-US.yml: button name + shown/hidden state strings. - config.yml / Settings: document TOGGLEABLE instead of "not implemented". - ChallengesPanelTest: HIDDEN removes, TOGGLEABLE-shown keeps, TOGGLEABLE-hidden removes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
|
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.



Finishes #175
The
undeployed-view-modesetting has always offered three modes, butTOGGLEABLEwas never implemented (config.yml literally said "Currently not implemented"). Selecting it behaved likeVISIBLE, because the player panel only filtered undeployed challenges when the mode wasHIDDEN.What this adds
In
TOGGLEABLEmode the player GUI now shows a toggle button (a spyglass in the free-challenges row) that each player uses to show or hide undeployed challenges for themselves:TOGGLEABLEstarts out identical toVISIBLE(matches the "hype upcoming challenges" use-case from the issue thread).VISIBLEandHIDDENare unchanged — the button only appears inTOGGLEABLEmode (the type builder returnsnullotherwise, so the slot falls back to the panel background).Implementation
ChallengesPanel:showUndeployedsession field; a singlehideUndeployedChallenges()helper now drives filtering in bothupdateFreeChallengeListandupdateChallengeList(coversHIDDENandTOGGLEABLE-hidden);createToggleUndeployedButton.main_panel.yml:TOGGLE_UNDEPLOYEDbutton slot.en-US.yml: button name + shown/hidden state lines (reuses the existingclick-to-toggletip).config.yml/Settings: documentTOGGLEABLEproperly.Tests
ChallengesPanelTest:HIDDENremoves undeployed;TOGGLEABLEshown (default) keeps them;TOGGLEABLEhidden removes them. Full suite green (505 tests).Note for existing servers
The button lives in the panel template, so servers with an already-copied
panels/main_panel.ymlwon't see the new slot until they regenerate it (delete the file) or add theTOGGLE_UNDEPLOYEDbutton themselves — the standard behaviour for template changes. Fresh installs get it automatically.🤖 Generated with Claude Code