Skip to content

bug: main and renderer keep two different default settings #353

Open

Description

@BernardJen

What

There are two default-settings objects, and they disagree:

src/main/index.js defaultSettings renderer.js getDefaultSettings()
layoutMode 'dual' null ("use screen-based detection")
centerGap, borderWidth, defaultInputId missing present
leftVolume, rightVolume, systemVolume missing present
remoteKeyboard*, presenterDebugEnabled, gpuCompositing missing present
cropLetterbox, aspectHint present missing

Main merges its defaults over the file before the renderer sees it, so main's values win where both exist.

Consequences

  • layoutMode: null never reaches the renderer on a fresh install, so the aspect-ratio detection (renderer.js:4970-4981) never runs in production. README, USER_GUIDE and settings.example.json describe it as live.
  • The CLAUDE.md note that the keys "mirror getDefaultSettings()" is not true.

Fix

One default set, in one place. Decide whether screen-based layout detection is wanted. If it is, make null survive the merge; if not, drop it and fix the docs.


Found while reconstructing the Electron app's decisions as ADRs for the egui port (#346, docs/adr/open-questions.md). Line numbers are from main at 787375b (v3.4.1).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions