Skip to content

test: fix the last nightly lifecycle failure and a layout test that measured mid-animation - #2108

Merged
benceruleanlu merged 2 commits into
mainfrom
bl/lifecycle-remote-cleanup
Nov 15, 2026
Merged

benceruleanlu merged 2 commits into
mainfrom
bl/lifecycle-remote-cleanup

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Follows #2092 and #2101, both merged. Two test-only commits: the last failure in the nightly lifecycle chain on main, and a unit test that failed this PR's own Test check.

1. Lifecycle: the remote connection's window

Lifecycle Tests dispatched on main at 9f5a178f (run 43651779492, Windows): 66 passed, 1 failed, 2 did not run.

  • The three @sec-bootwindow tests pass on both passes, including "restart clicked during a FRESH chooser boot", which fix(picker): offer Restart from the dashboard for a build starting with no window #2101's picker change targets.
  • The copy, untrack and remote-connection tests pass.
  • e2e/lifecycle.test.ts:2649, "cleans up the remote connection: window closed, record untracked, local install untouched", fails on both passes. The two delete tests after it did not run.

Root cause: the test is wrong. It closed the dashboard window the wizard ran in and then waited for the remote session to end. Before launch-on-card (#2074) that dashboard window became the remote connection's window when its tile was clicked, so closing it ended the session. Now a build started from the dashboard opens in its own window and the dashboard window stays a dashboard. The remote session kept running and the wait timed out. The failure screenshots show the "Remote Loopback" window still open next to the local ComfyUI window.

Fix. The cleanup closes the window that shows the remote connection, found by the webContents the previous test drove, as well as the dashboard window. It waits for both to be gone before it opens a dashboard from the local ComfyUI window, so one ComfyUI window is left, as the rest of the test expects. _remoteWindowId is renamed _remoteDashboardWindowId to say what it holds.

2. Unit: the release-channel layout test

The Test check failed on the first push here in releaseChannelSwitchLayout.test.ts (from #2097), which this PR had not touched. Every box in its baseline was 0.98 of its later size and 4px lower: the baseline was taken at the first keyframe of the setup dialog's pop-in animation (scale .98, translateY 4px, 160ms), and the layouts sampled afterwards were at rest.

finishEntranceAnimations took one snapshot of document.getAnimations() and awaited those. An animation that starts after the snapshot, or one that is cancelled and restarted, let it return while the dialog was still moving. It now waits frame by frame, awaits whatever finite animation is running, and returns only after three consecutive frames with none.

I did not reproduce the failure locally; it depends on timing. The diagnosis comes from the numbers in the CI failure.

Validation

  • pnpm run typecheck, pnpm run lint, pnpm run format:check pass. The layout test file passes locally three times in a row.
  • E2E was not run locally. Lifecycle Tests dispatched on this branch at the first commit, run 43655480295: green on Windows, 69 passed, none failed or retried. That includes the remote cleanup and the two delete tests behind it, which had not run on main since 9 Nov. The second commit only touches a unit test.

…cleanup

"cleans up the remote connection" closed the dashboard window the wizard
ran in and then waited for the remote session to end. Before
launch-on-card (#2074) that dashboard window became the remote
connection's window, so closing it ended the session. Now a build
started from the dashboard opens in its own window, the dashboard window
stays a dashboard, and the remote session kept running: the wait timed
out on both passes of the nightly. The failure screenshots show the
"Remote Loopback" window still open next to the local ComfyUI window.

The test now closes the window that shows the remote connection, found
by the webContents the previous test drove, as well as the dashboard
window, and waits for both to be gone before it opens a dashboard from
the local ComfyUI window. The dashboard window's id is renamed to say
what it is.
@benceruleanlu
benceruleanlu requested review from a team as code owners November 14, 2026 23:54
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The remote lifecycle test now tracks the dashboard window separately and verifies its destruction alongside the remote web contents. The renderer test waits for running finite animations to settle and requires three consecutive animation-free frames.

Changes: Remote connection cleanup

Layer / File(s) Summary
Track and clean up remote windows
e2e/lifecycle.test.ts
The test stores the dashboard window ID. Cleanup closes windows that match that ID or display the remote web contents, then waits for both resources to be destroyed.

Entrance animation settling

Layer / File(s) Summary
Wait for entrance animations to settle
src/renderer/src/views/releaseChannelSwitchLayout.test.ts
The test waits for running animations with finite computed end times and returns only after three consecutive frames have no running animations.

Suggested reviewers: alexisrolland

Merge Risk: Minimal · up to b7c7c

This PR changes test code only, so it does not affect production behavior. Its lifecycle test results are still pending in CI, but nothing in the changes points to a concrete problem.

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: 98781090-9d72-48d1-b7f3-cc13765578f5
Commits

Reviewing files that changed from the base of the PR and between ad5d3ab and b7c7cdd.

Files selected for processing: 1

  • src/renderer/src/views/releaseChannelSwitchLayout.test.ts

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

…s stopped animating

The Test check failed on this PR in releaseChannelSwitchLayout.test.ts,
"keeps the dialog and every row in place from the click until the other
channel has loaded". Every box in the baseline was 0.98 of its later
size and 4px lower: the baseline was taken at the first keyframe of the
setup dialog's pop-in animation (scale .98, translateY 4px, 160ms), and
the layouts sampled afterwards were at rest.

finishEntranceAnimations took one snapshot of document.getAnimations()
and awaited those. An animation that starts after the snapshot, or one
that is cancelled and restarted so its finished promise rejects, let the
helper return while the dialog was still moving.

It now waits frame by frame, awaits whatever finite animation is
running, and returns only after three consecutive frames with none.
@benceruleanlu benceruleanlu changed the title test(e2e): close the remote connection's own window in the lifecycle cleanup test: fix the last nightly lifecycle failure and a layout test that measured mid-animation Nov 15, 2026
@coderabbitai
coderabbitai Bot requested a review from alexisrolland November 15, 2026 00:03
@benceruleanlu
benceruleanlu merged commit 552c08a into main Nov 15, 2026
21 checks passed
@benceruleanlu
benceruleanlu deleted the bl/lifecycle-remote-cleanup branch November 15, 2026 00:09
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