Skip to content

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
Contributor

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
Contributor

See also: #228

@huchenlei
Copy link
Contributor

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.

3 participants