Skip to content

fix(restart): Return to Dashboard during a restart no longer loads the install's page into the dashboard window - #2338

Open
synap5e wants to merge 2 commits into
mainfrom
synap5e/fix/restart-load-stale-guard
Open

synap5e wants to merge 2 commits into
mainfrom
synap5e/fix/restart-load-stale-guard

Conversation

@synap5e

@synap5e synap5e commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

If a ComfyUI install is restarting in a Desktop window and you click Return to Dashboard before the restarted server answers, Desktop no longer loads that install's page into the dashboard window afterwards. Returning to the dashboard detaches the install: it clears the window's install and deletes the restart's state. The restart's pending load only checked for a destroyed window or a newer restart, and with the state gone the newer-restart check passed, so the load went ahead. Both of the restart's checks now also abandon the load when the window no longer holds the install being restarted, through restartLoadAbandoned in src/main/host/restartLoad.ts.

  • Unit tests cover each abandon condition in restartLoadAbandoned. Replacing the new install check with return false fails 2 of them (window back on the dashboard, window holding a different install). Removing the newer-restart check or the destroyed-window check fails their cases.
  • Known limitation: the tests cover the decision, not where onComfyRestarted calls it in src/main/index.ts, which has no unit test harness.

…dow that returned to the dashboard

onComfyRestarted now abandons its load when the window no longer holds the
restarting install, alongside the existing destroyed-window and newer-relaunch
checks, through one tested helper.
@synap5e

synap5e commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

A new restartLoadAbandoned predicate checks window state, relaunch tokens, and installation identity. onComfyRestarted uses it before and after its retry loop. Tests cover the predicate’s true and false conditions.

Changes: Restart Load Abandonment

Layer / File(s) Summary
Define and test abandonment conditions
src/main/host/restartLoad.ts, src/main/host/restartLoad.test.ts
Adds RestartLoadTarget and restartLoadAbandoned. Tests cover destroyed windows, changed installation IDs, relaunch-token changes, and non-abandoned cases.
Apply the predicate in the restart callback
src/main/index.ts
onComfyRestarted uses the predicate before proceeding with the retry loop and after the loop.

Suggested reviewers: benceruleanlu, deepme987

Merge Risk: Minimal · up to df2e7

Returning to the dashboard during a restart should no longer load the install's page into the dashboard window. The predicate is tested for each abandon condition. I found no remaining merge-blocking risk.

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: Team
  • Run ID: 0f8241cd-14c1-490d-8359-169e9b1f179c
Commits

Reviewing files that changed from the base of the PR and between f1f890e and df2e704.

Files selected for processing: 3

  • src/main/host/restartLoad.test.ts
  • src/main/host/restartLoad.ts
  • src/main/index.ts

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@synap5e
synap5e marked this pull request as ready for review November 20, 2026 17:57
@synap5e
synap5e requested review from a team as code owners November 20, 2026 17:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T17:58:20.450858Z df2e704 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@comfy-greenlight-bot

comfy-greenlight-bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Swarmhost agentic review

The current assessment is available to employees in the internal Slack review thread.

Evaluation budget remaining for this pull request: 98 automatic and 99 manual.

Updated by Swarmhost's agentic review process.

@comfy-greenlight-bot comfy-greenlight-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request at head commit df2e704 has been reviewed and approved by Swarmhost's agentic review process.

The detailed evaluation is available to employees in the internal Slack review thread.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants