Repository navigation
fix: show the canvas, not a blank panel, while a picker op stops the instance - #1725
benceruleanlu wants to merge 3 commits into
Conversation
Send Feedback was the same kind of panel key What's New was, so closing it landed on the dashboard and dropped a running performance test or a half-filled wizard. It is now the second title-bar modal kind: the page underneath stays mounted and inert, and closing it leaves that page in place. Only one title-bar modal is open at a time. The renderer keeps both in one shared state, so swapping What's New for Feedback happens in one render and the panel over the canvas never drops its transparency. Feedback shares What's New's layering through BaseModal's new `coversPage` option: it sits below other dialogs, leaves an open dialog its focus, and takes Escape before a wizard underneath.
MCP setup was the last overlay still modeled as a panel key, so it sat above What's New as a dialog and clicking the bell over it did nothing visible. It is now the third title-bar modal kind: one modal at a time, opening What's New replaces it, and it shares the page-cover layering, focus and Escape handling through BaseModal's `coversPage`. With no overlay panel keys left, a canvas overlay is just a running canvas with a modal open.
…instance An inline picker op that stops a running install (update, restore, copy) suppressed refreshComfyTabBody so the lifecycle page wouldn't flash, but computeBodyMode still reported 'comfy-lifecycle'. A resize or a title-bar modal open/close then laid out the lifecycle panel while its renderer was still on the empty 'comfy' body, leaving a blank panel. The op now holds the install's canvas: computeBodyMode reports 'comfy' while held, so every layout path agrees with the renderer. Releasing the hold when the op settles re-syncs the body, so a failed or non-relaunching op ends on the stopped page instead of a stale canvas. An install that was already stopped is never held and keeps its lifecycle page.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3854ed65db
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!_runningSessions.has(installationId)) return () => {} | ||
| heldCanvases.add(installationId) | ||
| return () => { | ||
| if (heldCanvases.delete(installationId)) refreshComfyTabBody(installationId) |
There was a problem hiding this comment.
Preserve picker focus when releasing the canvas
When an inline picker operation on a running install finishes, this release calls refreshComfyTabBody, which reaches focusActiveBody and focuses the canvas or panel. The instance picker is configured with hideOnPopupBlur: true in titlePopup.ts, so this focus transfer closes the still-open picker immediately after its terminal status is broadcast, preventing users from seeing the result or using the success CTA. Refresh the layout without stealing focus while the picker remains open.
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
A picker op that stops a running instance (inline update, snapshot restore, copy) no longer leaves a blank panel when the window is resized or a title-bar modal opens or closes mid-op. The canvas stays up until the op finishes. Then the window shows the relaunched canvas, or the stopped page if the instance didn't come back.
Stacked on #1724 (MCP setup), which is stacked on #1719 (Send Feedback) and #1712 (What's New).
Behavior
refreshComfyTabBodyreturned early while a picker op was in flight, skipping both thepanel-switchIPC andlayoutViews(). ButcomputeBodyModealready said'comfy-lifecycle'because the instance had stopped. Any later layout pass (windowresize,openPanelModal/hidePanelModal) applied the lifecycle layout (panel shown, canvas hidden) while the panel renderer was still on its empty'comfy'body.computeBodyModereturns'comfy'while the hold is in place, so every layout path,bodyLayout,isCanvasOverlayand focus agree with what the renderer was last told. A modal opened mid-op sits transparently over the canvas and closes back to it.pickerRunBackgroundOpdrops the hold in a.finally, which re-runsrefreshComfyTabBody. Before this, nothing refreshed the body when an op settled, so a failed, cancelled or non-relaunching op (e.g. copy) left a stale canvas plus the same blank-panel trap. It now ends on the stopped page. A successful relaunch stays on the canvas.holdCanvasdoes nothing and the stopped page stays through resizes.refreshComfyTabBodynow skips only while the canvas is held, not for every unfinished picker op. An op that doesn't stop the instance no longer swallows session changes, so a crash during one shows the crash page instead of leaving main and the renderer out of sync.Why not just have
computeBodyModereport'comfy'for any unfinished op: on an already-stopped instance, that swaps the stopped page for the dead canvas on the next resize. It also lifts when the op ends without anything re-syncing the renderer, which brings the blank panel back.Validation
panel-switchis sent. The op ending sends the stopped page, or keeps the canvas after a relaunch. An already-stopped instance keeps its stopped page through a resize.computeBodyMode/bodyLayouthonor the hold, including while the instance is still stopping.computeBodyModereproduces the blank panel ({ panel: true, canvas: false }with nopanel-switch) and fails the resize and modal tests. Dropping the re-sync on release fails 3 tests. Holding an already-stopped instance fails 1.src/main/lib/processIdentity.test.tsfails the same way on this stack's base; it is the time-dependent test fixed onmainby test(processIdentity): fix same-second flake in readStartTimes real-process test #1721 and fix(process): read macOS lstart start times as UTC #1723.Change breakdown
178 changed lines (additions + deletions), relative to #1724:
src/main/host/panelView.ts,src/main/host/registry.ts,src/main/index.tssrc/main/host/panelView.test.ts,src/main/host/registry.test.tsNo documentation, configuration, generated, lockfile or vendored changes.