Skip to content

Add 'Hide Server Selector' setting to bypass free-tier queue modal#342

Merged
Kief5555 merged 1 commit intodevfrom
server-selector-setting
Apr 20, 2026
Merged

Add 'Hide Server Selector' setting to bypass free-tier queue modal#342
Kief5555 merged 1 commit intodevfrom
server-selector-setting

Conversation

@Kief5555
Copy link
Copy Markdown
Collaborator

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 hideServerSelector setting 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

  • Added a new hideServerSelector boolean field to the Settings interface in settings.ts and gfn.ts, including documentation for its purpose. [1] [2]
  • Set the default value for hideServerSelector to false in both the settings backend (settings.ts) and frontend (App.tsx). [1] [2]
  • Integrated logic in App.tsx to skip the server selection modal and immediately launch the game if hideServerSelector is enabled.

UI Updates

  • Added a toggle for the new setting in the SettingsPage component, with a label and hint explaining its function.## Description

@Kief5555 Kief5555 requested a review from Copilot April 20, 2026 05:51
@Kief5555 Kief5555 merged commit 3e88b4a into dev Apr 20, 2026
7 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Settings contract (shared + main) with hideServerSelector and added default values.
  • Exposed a new “Hide Server Selector” toggle in the settings UI.
  • Updated launch gating logic in App.tsx to 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;
}
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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