Add 'Hide Server Selector' setting to bypass free-tier queue modal#342
Merged
Add 'Hide Server Selector' setting to bypass free-tier queue modal#342
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new user setting to optionally bypass the free-tier queue server selection modal and proceed with default routing when launching a game.
Changes:
- Extended the
Settingscontract (shared + main) withhideServerSelectorand added default values. - Exposed a new “Hide Server Selector” toggle in the settings UI.
- Updated launch gating logic in
App.tsxto skip the server selector when the setting is enabled.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
opennow-stable/src/shared/gfn.ts |
Adds hideServerSelector to the cross-process Settings interface. |
opennow-stable/src/main/settings.ts |
Adds the setting to the persisted settings model and default settings. |
opennow-stable/src/renderer/src/components/SettingsPage.tsx |
Adds a checkbox toggle to allow users to enable/disable the setting. |
opennow-stable/src/renderer/src/App.tsx |
Adds launch-path logic to bypass the server selector when enabled and initializes the default setting value. |
Comment on lines
+2842
to
+2846
| if (settings.hideServerSelector) { | ||
| setQueueModalData(null); | ||
| void handlePlayGame(game); | ||
| return; | ||
| } |
There was a problem hiding this comment.
handleInitiatePlay reads settings.hideServerSelector, but settings/settings.hideServerSelector is not included in the useCallback dependency array. This can leave the callback with a stale value after toggling the setting, so the server selector may still appear (or be skipped) until some other dependency changes. Add settings.hideServerSelector (or settings) to the dependency list.
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.
This pull request introduces a new user setting to allow skipping the free-tier server selection dialog and always launching with the default routing. The main changes include adding the
hideServerSelectorsetting to the relevant interfaces, updating default values, integrating the setting into the launch logic, and exposing it in the UI.New "Hide Server Selector" Setting
hideServerSelectorboolean field to theSettingsinterface insettings.tsandgfn.ts, including documentation for its purpose. [1] [2]hideServerSelectortofalsein both the settings backend (settings.ts) and frontend (App.tsx). [1] [2]App.tsxto skip the server selection modal and immediately launch the game ifhideServerSelectoris enabled.UI Updates
SettingsPagecomponent, with a label and hint explaining its function.## Description