Skip to content

test(e2e): open Builds after Return to dashboard in the nightly lifecycle suite - #2092

Merged
benceruleanlu merged 2 commits into
mainfrom
bl/lifecycle-dashboard-lands-on-home
Nov 14, 2026
Merged

benceruleanlu merged 2 commits into
mainfrom
bl/lifecycle-dashboard-lands-on-home

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

The nightly Lifecycle Tests workflow has been red on main since 10 Nov. On 14 Nov (run 43579192917, 3c1bcbfd) it fails in e2e/lifecycle.test.ts:716, "update-comfyui drives the real updater and moves HEAD forward", on both attempts: selector [data-testid="dashboard-tile-inst-<id>"] did not become visible.

This PR fixes that failure. It does not make the whole nightly green: the chain now runs 17 tests further and stops at a different failure, described under "What is still red".

Root cause

The product is right and the test is wrong.

  • feat(home): add a Home page with example workflows from the Comfy content catalog #2009 added the Home page and made it the page a dashboard panel opens on. PanelApp.vue starts dashboardHomePage at 'home'.
  • "Return to dashboard" (_detachInstallImpl in src/main/host/detach.ts) destroys the window's panel webContents and creates a fresh one, so the dashboard opens on Home every time.
  • ChooserView stays mounted under v-show while Home is showing. stopAndReturnToDashboardViaUI only checked that .chooser-view exists in the DOM, so it passed on Home.
  • openManageViaDashboard then waited for a build tile to be visible. Tiles are only visible on the Builds page, so the wait timed out. The failure screenshot shows Home ("Welcome. Let's create!").

The test last ran green on 9 Nov (c8890334). From 10 Nov to 13 Nov the serial chain stopped earlier, in the setup tests, so this test did not run at all. #2072 and #2074 repaired the setup tests on 13 Nov, which exposed it. #2082, #2083, #2051, #2077 and #1993 are not involved.

Fix

Two commits, test code only.

  1. test(e2e): open Builds before managing installations is cherry-picked unchanged from test(e2e): cover first-use Install with recommended settings #2078 (05091f73). openManageViaDashboard and stopAndReturnToDashboardViaUI now go through expectChooserVisible, which picks Builds in the sidebar when Home is showing. It also adds a nav-matrix-dashboard test for Home → Builds → Update settings.
  2. test(e2e): keep waiting while a window swaps its panel page. On test(e2e): cover first-use Install with recommended settings #2078 the first commit alone got past :716 and then failed in the Manager test and in the retry of the stop test with webContents not found (marker=panel.html) (run 43515629053). While the panel is being swapped no webContents matches panel.html, WebContentsPage.evaluate throws, and expect.poll rethrows a thrown predicate at once. The old helper hid this with its own .catch(() => false). WebContentsPage.waitFor now reads a missing or destroyed page as "not yet" and keeps polling until its timeout. Every other error still fails at once.

Validation

  • pnpm run typecheck, pnpm run lint, pnpm run format:check pass.
  • PR CI: 21 checks pass, including the E2E jobs on every OS.
  • E2E was not run locally. Lifecycle Tests dispatched on this branch, run 43641838390, Windows:
    • "update-comfyui drives the real updater and moves HEAD forward" passes on the first attempt and again on the retry pass.
    • "stop ComfyUI again…" and the Manager security test, the two that hit the panel-swap race on test(e2e): cover first-use Install with recommended settings #2078, pass on both passes.
    • The new nav-matrix-dashboard test passes.
    • 57 passed, 1 failed, 1 flaky, 10 did not run. The job is red for the reason below.

What is still red

Not caused by this PR and not fixed here. Both are in the @sec-bootwindow tests and come from launch-on-card (#2074).

  1. lifecycle.test.ts:2011, "restart clicked during a FRESH chooser boot (unattached window) cancels it and applies the edited --port" fails with Expected substring: "Restart", Received string: "Switch". Since feat(launch): start a build on its card, then open ComfyUI in its own window #2074 a launch started from the dashboard runs on the build's card and the dashboard window no longer hosts it. The picker opened from the dashboard therefore sees the build as running elsewhere and decideNavigation gives dashboard | instance | running-elsewhere → "Switch". The screenshot shows the "Restart to apply" badge next to Startup Arguments with a Switch button under it, so there is no way to restart a starting build from the dashboard picker. feat(launch): start a build on its card, then open ComfyUI in its own window #2074 moved this test from the title-bar pill to the dashboard picker and kept the "Restart" expectation, but the nightly never reached it. Whether the dashboard picker should offer Restart for a build that is starting is a product decision.
  2. lifecycle.test.ts:1933, "restart clicked during boot cancels the in-flight boot…" passed on the first pass and failed on the retry pass with "boot finished before the restart click". It races a real boot instead of holding the spawn with armLaunchSpawnHold, as the test after it does.

The 10 tests after :2011 (copy, untrack, remote connection, delete) have not run on main since 9 Nov.

Overlap with open PRs

Return to dashboard closes the window's panel webContents and loads a
fresh one. Until the new page commits its URL, no webContents matches
panel.html, so WebContentsPage.evaluate throws "webContents not found".
expect.poll rethrows a thrown predicate at once, so any waitFor that
straddles the swap failed in about a second instead of waiting.

stopAndReturnToDashboardViaUI used to hide this with its own
.catch(() => false) poll. Once it waits through expectChooserVisible,
the swap surfaced as a failure in the Manager test and in the retry of
the stop test.

waitFor now reads a missing or destroyed page as "not yet" and keeps
polling until the timeout, so every waitForVisible and waitForSelector
survives a panel swap. Any other error still fails at once.
@benceruleanlu
benceruleanlu requested review from a team as code owners November 14, 2026 21:16
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The end-to-end tests now wait for chooser visibility during lifecycle transitions and dashboard navigation. Page polling retries errors that indicate the web contents no longer exist.

Changes: End-to-end navigation and lifecycle

Layer / File(s) Summary
Unload polling and chooser visibility
e2e/support/cdpPages.ts, e2e/lifecycle.test.ts
WebContentsPage.waitFor treats recognized page-gone errors as retryable. Lifecycle checks wait for the chooser to become visible.
Dashboard navigation to Update settings
e2e/support/chooserHelpers.ts, e2e/nav-matrix-dashboard.test.ts
openManageViaDashboard waits for chooser visibility. A cross-platform test opens Update settings for INSTALL_A_ID and checks that the settings view identifies that installation.

Suggested reviewers: kosinkadink, deepme987, maanilverma

Merge Risk: Minimal · up to 15cc8

The change only affects end-to-end test helpers and tests, so it has no production impact. No merge-blocking issue was found.

Pre-merge checks: Passed 2

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 08e6a0fc-d5e1-46a7-8352-84301dc1a4d7
Commits

Reviewing files that changed from the base of the PR and between 3c1bcbf and 15cc8c3.

Files selected for processing: 4

  • e2e/lifecycle.test.ts
  • e2e/nav-matrix-dashboard.test.ts
  • e2e/support/cdpPages.ts
  • e2e/support/chooserHelpers.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@benceruleanlu benceruleanlu changed the title test(e2e): fix the nightly lifecycle suite after the dashboard started landing on Home test(e2e): open Builds after Return to dashboard in the nightly lifecycle suite Nov 14, 2026
@benceruleanlu
benceruleanlu merged commit a76048b into main Nov 14, 2026
21 of 22 checks passed
@benceruleanlu
benceruleanlu deleted the bl/lifecycle-dashboard-lands-on-home branch November 14, 2026 22:25
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.

1 participant