Skip to content
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

Draft: Refactor installation state. #216

Closed
wants to merge 2 commits into from
Closed

Draft: Refactor installation state. #216

wants to merge 2 commits into from

Conversation

robinjhuang
Copy link
Member

Currently, the main process will send events and state to the renderer for the initial onboarding installation.

This is brittle because the renderer state can become out of sync if it misses messages.

This refactor stores the current state of the installation, and registers an IPC event so the renderer can always request the up to date state.

@robinjhuang robinjhuang marked this pull request as draft November 10, 2024 00:19
import { AppWindow } from '../main-process/appWindow';
import { ComfyConfigManager } from '../config/comfyConfigManager';

type InstallationState =
Copy link
Member

Choose a reason for hiding this comment

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

Let's just keep this a simple enum matching ProgressStatus, and get the validation and location stuff in separate API.

@huchenlei
Copy link
Member

See also: #228

@huchenlei
Copy link
Member

Installation state will be stored in the frontend, and finally when everything are validated, the frontend will send all relevant info to the electron backend to initiate the download. There will be no need to track the state in the electron side.

@huchenlei huchenlei closed this Nov 12, 2024
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