Add game available to configs and endpoint for frontend to check#141
Merged
marcosfrenkel merged 3 commits intomasterfrom Apr 16, 2026
Merged
Add game available to configs and endpoint for frontend to check#141marcosfrenkel merged 3 commits intomasterfrom
marcosfrenkel merged 3 commits intomasterfrom
Conversation
4678c5e to
1471da2
Compare
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.
Description
Adds a
GamesAvailabilityconfiguration model and a/games/availabilityAPI endpoint so the frontend can check which games are enabled on a given node. Also adds atoggle_gameCLI command to enable/disable games inconfig.tomlwithout manually editing the file.Changes:
GamesAvailabilitypydantic model (fields:chsh,qf,ssm, all defaulting toTrue) added as a field onSettings/games/availabilityGET endpoint returning the currentGamesAvailabilitytoggle_gameCLI command — accepts one or more game names and--enable/--disable, writes the updated value back toconfig.tomlusingtomli-wtomli-wdependency (webapp extra)Motivation and Context
The frontend needs to know which games are available on each node so it can show or hide game options accordingly. This allows node operators to configure game availability via
config.tomlrather than requiring code changes or frontend-specific config.How have these changes been tested?
/games/availabilityendpoint returns the correct defaults and respects values set inconfig.tomltoggle_gameCLI command with--enableand--disablefor each game (chsh,qf,ssm) and confirmed theconfig.tomlis updated correctlyScreenshots (if appropriate):
Types of changes
Checklist: