ComfyUI connection, preflight and status panel (#34) #86
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
needs-info
needs-triage
question
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/ai-studio!86
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-34-comfyui-preflight"
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?
Closes #34. Part of #24.
What
crates/fake-comfy(new dev-only crate): a scriptable in-process ComfyUI on a loopback port./system_stats,/object_info,/modelsand/models/<folder>(each also under/api) andWS /ws?clientId(a status greeting, plussend_eventto push scripted frames).[[...]]or["COMBO", {options}]), model files per folder, offline, and an unused address for a ComfyUI that was never started. It records every request.routelater. It is a separate crate sosrc-tauritests can use it too.studio-core:ComfyClient(comfy_client.rs): version,object_info, model folders over HTTP (ureq, no TLS).ComfySettings(comfy_settings.rs): the address is an app setting in<config_dir>/comfyui.json, defaulthttp://127.0.0.1:8188. It is normalized (scheme added, trailing slash dropped) and refused when it is not http(s). This adds no migration.preflight(preflight.rs): checks reachability, version >= 0.39.0, every templateclass_type, every fixed model file in its/api/models/<folder>, and every fixed combo value of the templates (model files and per-job bindings excluded). It returns Connection plus aWorkflowStatusper shipped workflow withNotReadyReasons. Missing nodes and models carry the manifest's pack/model name and download URL. A missing core node says to update ComfyUI. Path separators are normalized, because manifests use\. It only issues GETs and installs nothing.comfyui_address,set_comfyui_address,comfyui_preflight(run inspawn_blocking).preflight.Tests
crates/studio-core/tests/comfyui_preflight.rs(13): Ready, missing node pack (name and URL), missing core node, missing model (folder, name, URL), missing combo value, old version (and newer or suffixed versions pass), offline and recovery, never started, read-only requests, separator normalization.comfyui_settings.rs(3), unit tests for version parsing and both combo encodings,crates/fake-comfy/tests/protocol.rs(5, including the WebSocket), an adapter smoke test, andsrc/lib/comfyui/summary.test.ts(4).cargo test --workspace --all-features,bun run testandbun run checkpass. The UI has been type-checked only, not run in the app.Notes
cargo clippy -- -D warningscurrently fails onmaintoo (type_complexityatHooks.open_window), andcargo fmt --checkflagssrc-tauri/src/lib.rs. I left both alone.