Skip to content

Implement TOGGLEABLE undeployed view mode (#175)#417

Merged
tastybento merged 1 commit into
developfrom
feat/175-toggleable-undeployed
Jul 11, 2026
Merged

Implement TOGGLEABLE undeployed view mode (#175)#417
tastybento merged 1 commit into
developfrom
feat/175-toggleable-undeployed

Conversation

@tastybento

Copy link
Copy Markdown
Member

Finishes #175

The undeployed-view-mode setting has always offered three modes, but TOGGLEABLE was never implemented (config.yml literally said "Currently not implemented"). Selecting it behaved like VISIBLE, because the player panel only filtered undeployed challenges when the mode was HIDDEN.

What this adds

In TOGGLEABLE mode 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:

  • The preference is per-session and defaults to shown, so TOGGLEABLE starts out identical to VISIBLE (matches the "hype upcoming challenges" use-case from the issue thread).
  • Clicking the button flips the preference, resets paging, and rebuilds the GUI.
  • VISIBLE and HIDDEN are unchanged — the button only appears in TOGGLEABLE mode (the type builder returns null otherwise, so the slot falls back to the panel background).

Implementation

  • ChallengesPanel: showUndeployed session field; a single hideUndeployedChallenges() helper now drives filtering in both updateFreeChallengeList and updateChallengeList (covers HIDDEN and TOGGLEABLE-hidden); createToggleUndeployedButton.
  • main_panel.yml: TOGGLE_UNDEPLOYED button slot.
  • en-US.yml: button name + shown/hidden state lines (reuses the existing click-to-toggle tip).
  • config.yml / Settings: document TOGGLEABLE properly.

Tests

ChallengesPanelTest: HIDDEN removes undeployed; TOGGLEABLE shown (default) keeps them; TOGGLEABLE hidden 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.yml won't see the new slot until they regenerate it (delete the file) or add the TOGGLE_UNDEPLOYED button themselves — the standard behaviour for template changes. Fresh installs get it automatically.

🤖 Generated with Claude Code

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
@sonarqubecloud

Copy link
Copy Markdown

@tastybento tastybento merged commit f699c90 into develop Jul 11, 2026
3 checks passed
@tastybento tastybento deleted the feat/175-toggleable-undeployed branch July 11, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant