-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Settings store #362
Settings store #362
Conversation
e1a0eaa
to
a5469b8
Compare
If present, the config must be valid to proceed with app startup.
Provides the user with some information about what went wrong and why - and where they can look to fix it. Needs help / support button added.
a5469b8
to
64fab8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, the changes to store basePath
in a separate store looks good, while the installState
probably needs a rename or better documentation on explaining it's scope.
|
||
export type DesktopSettings = { | ||
basePath?: string; | ||
installState?: 'started' | 'installed' | 'upgraded'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some documentation explaining what each state represents? Do we have a plan to expand this install state to track more stages during installation so that we can resume at certain state on install retry?
This reverts commit 54f1a96.
* Reapply "Settings store (#362)" (#440) This reverts commit 81320e2. * Allow user to see result of YAML config read - Nature of the failure is returned - Invalid values read are included if available - Retains inferred types * Fix cannot start app if invalid install state Current requirement is that a missing YAML file triggers the install screen. * Detect YAML parse exceptions * Update test expectations
Adds an electron-store config store to house desktop-specific installation state / config. Includes fairly(?) complete error handling and pre-window interaction.
config.json
undefined
until an install has started,'started'
, or'installed'
.'upgraded'
status is temporarily used when upgrading from a version prior to this PR, and changed to'installed'
when successfulbase_path
inextra_models_config.yaml
is still the source of truthbasePath
in config.json is used as a fallback onlyFailures
If the settings store is invalid (file is present, but can't be parsed as json), the user is prompted to resolve the issue:
Confirmation if they choose to reset:
Resolves #360