Comfy-Org / Comfy-Org/Comfy-Desktop
test: backfill integration + @lifecycle coverage for v0.6.x+ architecture
- Dominant language
- TypeScript
- Stars
- 458
- Forks
- 59
- Avg merge
- 22h 18m
- Merged PRs (30d)
- 45
Description
## Context
#411 (v0.6.0) added the first integration tests for the update-orchestration pipeline (`src/main/sources/standalone/updateOrchestrator.integration.test.ts`), and `e2e/lifecycle.test.ts` covers the install ? detail ? launch ? console ? stop ? update happy path.
Since v0.6.x landed, the launcher's surface area has grown substantially:
- **Unified-window title bar + panels** (#500, v0.6.0) - title-bar `WebContentsView`, panel `WebContentsView`, and comfy `WebContentsView` all coexist in one `BrowserWindow`.
- **Title-popup primitive** (#533) - dropdowns, downloads tray, settings all unified.
- **Custom title bar with native window controls overlay** (#414).
- **Bootstrap Python** (#436, #438) - pre-install git operations now run via a bundled Python runtime.
- **R2-hosted standalone environments** (#446) - install path no longer pulls from GitHub release artifacts.
- **Latest-stable ComfyUI tag in New Install wizard** (#452) - wizard preselects via bootstrap pygit2.
- **Bring existing install/chooser forward on re-launch** (#526, closes #513).
- **Title-bar zoom shortcuts** (#518) and **macOS hover-tooltip overlay popup** (#530).
- **Consent / EULA / Privacy / Third-Party tabs** on first-use takeover (a8c494e).
- **Snapshot telemetry** (#524) and **per-host-window telemetry relay** (#519).
The existing `@lifecycle` suite predates most of this and does not exercise the new architecture. We should backfill coverage for the v0.6.x+ surfaces while the cost of writing each test is low.
## Proposed test additions
### Integration tests (Vitest, real binaries / temp installs where useful)
- **Bootstrap Python pygit2 path** - exercise the pre-install git operations (clone, fetch tags, checkout) against the bundled bootstrap runtime in a temp install dir. Verify behaviour when bootstrap-python is missing vs. present.
- **R2 standalone environment manifest** - fetch + parse a fixture manifest, verify variant selection and asset URL resolution. Mock the HTTP layer; exercise the parser end-to-end.
- **Title-popup IPC contract** - round-trip the `comfy-titlepopup:set-config` payloads (downloads tray, settings, dropdown menus) and assert the popup's dumb-renderer behaviour stays in sync with main.
- **Telemetry per-host-window relay** (#519 follow-through) - assert events from main land on every host window's title-bar renderer exactly once (no double-count, no panel double-relay). Pairs with the regressions tracked in #547 / #548.
- **Snapshot dedup + import preview** (#412, #524) - end-to-end `captureSnapshotIfChanged` collapse path + import preview/confirm flow against a temp install dir.
- **Update orchestrator dry-run conflict detection** - extend the existing integration suite to exercise `dryRunConflictCheck: true`, manager_requirements changes, rollback save, and the `Cancelled` abort path (scenarios 3-6, 8 from #392's original spec - the v0.6.0 PR landed the happy path).
### E2E / `@lifecycle` additions (Playwright)
- **Unified title bar + window controls overlay** - assert traffic-lights / WCO render in the right corner per platform; drag region works; `Reset Zoom` menu item appears at non-100% zoom.
- **Return to Dashboard from a comfy window** - covers the swap-via-close path in `src/main/index.ts` (related: #470).
- **Re-launch with running install** - verify #526 behaviour: existing comfy / chooser host is brought forward instead of duplicating.
- **First-use takeover + consent flow** - click through EULA / Privacy / Third-Party tabs, accept, assert telemetry consent state is persisted and the renderer mounts.
- **Settings ? Downloads tab** - open via title-popup, assert downloads list renders, mock a download, assert progress events flow into the panel.
- **App update prompt** - drive the `AppUpdateAction.vue` state machine (`available ? downloading ? ready`) with a stubbed ToDesktop runtime; verify the title-bar pill + system-modal restart prompt.
- **Snapshot import** - drive the new preview/confirm flow from #412 with a fixture snapshot file.
### CI wiring
- Promote the `@lifecycle` suite to actually run on CI (currently only invoked manually) - already tracked by **#456**, mention as a hard blocker for this issue's E2E additions.
## Out of scope
- New scenarios that need real GPU (`@lifecycle` runs on the CPU variant by design).
- Cross-repo telemetry validation - tracked by #547 / #548.
## Acceptance criteria
- [ ] Integration suite covers the bootstrap-python, R2 manifest, title-popup IPC, snapshot dedup/import, telemetry relay, and remaining update-orchestrator scenarios listed above.
- [ ] `@lifecycle` E2E suite exercises unified title bar, return-to-dashboard, re-launch-with-running-install, consent flow, downloads tab, app update, and snapshot import.
- [ ] All new tests pass on local Windows + macOS dev runs.
- [ ] CI wires the `@lifecycle` project (depends on #456).
## Related
- #411 - initial integration tests for update orchestration pipeline (closed)
- #392 - original spec for update-orchestrator integration tests (closed, this issue picks up the rest)
- #456 - `@lifecycle` E2E on CI
- #547 / #548 - post-#529 telemetry validation (the relay test would catch these regressions earlier)
- #521 - preload-chunk inlining (re-enabling sandbox would invalidate parts of this suite; coordinate)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.