Skip to content

Conversation

unbelievableflavour
Copy link

This MR moves backend runner specific code into a single object so that it's a LOT easier to add new runners to the backend of the project. It's basically an addition to #4895,
But since that PR has already been reviewed I'd thought I'd offer it as a separate PR.


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@unbelievableflavour unbelievableflavour force-pushed the simplified-adding-runners-backend branch from b0c6d73 to 3130f45 Compare August 26, 2025 06:20
Copy link
Collaborator

@CommandMC CommandMC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I'm very much in favor of this change. I've toyed with an idea like this in the past (having a "runner registry" that gets populated at runtime, to allow for a plugin-like runner interface), so this feels very familiar
Got a few small nitpicks

import { runnerMap } from 'backend/runners'

const RUNNERS = z.enum(['legendary', 'gog', 'nile', 'sideload'])
const RUNNERS = z.enum(Object.keys(runnerMap) as [Runner, ...Runner[]])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little awkward. Out of scope here, but we should look into making this a branded type with a refine instead then

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.

2 participants