mirror of
https://github.com/Comfy-Org/desktop.git
synced 2026-11-04 23:47:43 +00:00
[PR #362] [MERGED] Settings store #818
Labels
No labels
area: desktop-app
Bounty
bug
bug-cop:answered
bug-cop:response-received
component: installer
component: preload
custom node
dependencies
Design
documentation
duplicate
enhancement
expected
frontend
good first issue
installation
Low-Priority
performance
Planned
platform: cross-platform
platform: windows
Potential Bug
Potential Bug
pull-request
question
refactor
Release
stale
User Support
V1
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/desktop#818
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/desktop/pull/362
Author: @webfiltered
Created: 11/26/2024
Status: ✅ Merged
Merged: 12/3/2024
Merged by: @huchenlei
Base:
main← Head:settings-store📝 Commits (10+)
a8dabfdRename window settings: AppWindowSettings6676969Add settings store, required for startup34d9353Add shell open option to debug7f198a9Add initial DesktopSettings type45c3748Use app settings store for install statef5fed9dAdd setting store reset to resetInstall scriptd1a1d51Add file validation to pre-window checksce2d921[Refactor] Desktop config store back to class64fab8dAdd better handling for showing file on exit4f27889Add documentation📊 Changes
7 files changed (+282 additions, -27 deletions)
View changed files
📝
scripts/resetInstall.js(+41 -13)➕
src/install/installationValidator.ts(+58 -0)📝
src/main-process/appWindow.ts(+4 -4)📝
src/main-process/comfyDesktopApp.ts(+46 -8)📝
src/main.ts(+16 -1)➕
src/store/desktopConfig.ts(+104 -0)📝
src/store/index.ts(+13 -1)📄 Description
Adds an electron-store config store to house desktop-specific installation state / config. Includes fairly(?) complete error handling and pre-window interaction.
config.jsonundefineduntil 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_pathinextra_models_config.yamlis still the source of truthbasePathin 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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.