Skip to content

fix: open MCP setup over the page like What's New and Feedback - #1724

Open
benceruleanlu wants to merge 1 commit into
bl/send-feedback-keeps-pagefrom
bl/mcp-setup-keeps-page
Open

benceruleanlu wants to merge 1 commit into
bl/send-feedback-keeps-pagefrom
bl/mcp-setup-keeps-page

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

MCP setup now opens like What's New and Send Feedback: as a modal over the canvas, in the same one-at-a-time slot. Clicking the What's New bell while MCP setup is open now replaces it, instead of opening What's New hidden underneath.

Stacked on #1719 (Send Feedback), which is stacked on #1712 (What's New).

Behavior

  • MCP setup is the third title-bar modal kind (panelModal = 'mcp-setup') instead of a panel key. ComfyUI's MCP sidebar entry (desktop2-open-mcp-setup) opens it through openPanelModal. It's still limited to local installs, and the renderer receives it on the new comfy-panel:open-mcp-setup channel.
  • One title-bar modal at a time. Opening What's New or Feedback while MCP setup is open swaps them in a single render, and the reverse works too. Title-bar navigation closes it.
  • McpSetupModal uses BaseModal's coversPage, like Feedback. It sits below other dialogs, leaves an open dialog its focus, takes Escape before a wizard underneath, and closes through main's hide-then-dismiss round trip.
  • With no overlay panel keys left, isCanvasOverlay is just a running canvas with a modal open. Main and the renderer's transparency check both drop their mcp-setup special case.
  • MCP setup is no longer a view, so it no longer emits comfy.desktop.view.opened with view: 'mcp-setup'. Its own comfy.desktop.mcp.* events are unchanged.

Validation

  • Unit suite: 6741 passed. src/main/lib/processIdentity.test.ts failed once; it is the time-dependent test fixed on main by test(processIdentity): fix same-second flake in readStartTimes real-process test #1721 and fix(process): read macOS lstart start times as UTC #1723, and this stack's base predates those fixes.
  • The page-cover tests (Escape order, confirmations above, rich confirms, stacking) now run for What's New, Feedback and MCP setup. Removing covers-page from McpSetupModal fails 5 of them.
  • New tests pin the main entry point (local installs only, opened through openPanelModal), the preload channel, and the swap from What's New in PanelApp.
  • Typecheck, lint and format checks pass.
  • Packaged visual QA has not been run.

Change breakdown

209 changed lines (additions + deletions), relative to #1719:

  • Product: 11 files, +61/-36, 97 lines (46.4%): src/main/host/panelView.ts, src/main/host/registry.ts, src/main/index.ts, src/main/popups/titlePopup.ts, src/preload/api.ts, src/renderer/src/composables/useMcpSetup.ts, src/renderer/src/panel/PanelApp.vue, src/renderer/src/panel/usePanelOverlays.ts, src/renderer/src/views/mcp/McpSetupModal.vue, src/shared/panelModal.ts, src/types/ipc.ts
  • Tests: 6 files, +101/-11, 112 lines (53.6%): src/main/host/panelView.test.ts, src/main/host/registry.test.ts, src/main/popups/titlePopup.test.ts, src/preload/api.test.ts, src/renderer/src/composables/usePageCoverModal.test.ts, src/renderer/src/panel/PanelApp.test.ts

@benceruleanlu
benceruleanlu requested review from a team as code owners October 13, 2026 22:12
@benceruleanlu
benceruleanlu added this pull request to stack #1720 October 13, 2026 22:12
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 85fe5380-8911-4ccd-a56d-1f8b27975409
📥 Commits

Reviewing files that changed from the base of the PR and between d1ab638 and e7e897e.

📒 Files selected for processing: 17
  • src/main/host/panelView.test.ts
  • src/main/host/panelView.ts
  • src/main/host/registry.test.ts
  • src/main/host/registry.ts
  • src/main/index.ts
  • src/main/popups/titlePopup.test.ts
  • src/main/popups/titlePopup.ts
  • src/preload/api.test.ts
  • src/preload/api.ts
  • src/renderer/src/composables/useMcpSetup.ts
  • src/renderer/src/composables/usePageCoverModal.test.ts
  • src/renderer/src/panel/PanelApp.test.ts
  • src/renderer/src/panel/PanelApp.vue
  • src/renderer/src/panel/usePanelOverlays.ts
  • src/renderer/src/views/mcp/McpSetupModal.vue
  • src/shared/panelModal.ts
  • src/types/ipc.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.

📝 Walkthrough

MCP setup is now represented as a modal over the canvas instead of a panel key. A title-popup request opens the modal through IPC, and the renderer manages its state and dismissal without closing the active panel.

Changes: MCP setup modal

Layer / File(s) Summary
Modal and IPC event contract
src/shared/panelModal.ts, src/types/ipc.ts, src/preload/api.ts, src/preload/api.test.ts
PanelModal includes mcp-setup. The preload API exposes onOpenMcpSetup, which listens for the open event and returns an unsubscribe function.
Title-popup request routing
src/main/popups/titlePopup.ts, src/main/index.ts, src/main/popups/titlePopup.test.ts
The title-popup handler opens the MCP setup modal through openPanelModal. Tests cover local-source and cloud-source hosts.
Renderer modal lifecycle
src/renderer/src/composables/useMcpSetup.ts, src/renderer/src/panel/PanelApp.vue, src/renderer/src/views/mcp/McpSetupModal.vue, src/renderer/src/composables/usePageCoverModal.test.ts, src/renderer/src/panel/PanelApp.test.ts
The renderer subscribes to open events and renders MCP setup as a page-cover modal. Escape requests modal dismissal while keeping the panel open.
Panel and body-mode classification
src/main/host/registry.ts, src/main/host/registry.test.ts, src/renderer/src/panel/usePanelOverlays.ts, src/main/host/panelView.ts, src/main/host/panelView.test.ts
MCP setup is removed from panel keys and body modes. Canvas-overlay detection uses a Comfy body with a panel modal. Related tests use progress as a panel key.

Sequence Diagram(s)

sequenceDiagram
  participant TitlePopup
  participant OpenPanelModal
  participant PreloadAPI
  participant UseMcpSetup
  participant PanelApp
  TitlePopup->>OpenPanelModal: Open mcp-setup with comfy-panel:open-mcp-setup
  OpenPanelModal->>PreloadAPI: Send comfy-panel:open-mcp-setup event
  PreloadAPI->>UseMcpSetup: Invoke registered callback
  UseMcpSetup->>PanelApp: Update modal state
  PanelApp->>PanelApp: Render MCP setup modal
Loading

Suggested reviewers: maanilverma

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to e7e89

MCP setup now opens as a modal over the current page, like What's New and Feedback. No concrete defect was found. Packaged visual QA has not been run, which is a normal pre-merge check rather than an identified risk.

Security architecture risk: 🔵 Low · up to e7e89

The change is limited to how MCP setup opens and closes. Local-install restrictions remain, and the setup request does not itself grant terminal access or execute setup commands. No introduced security weakness was established, but interruption and terminal-transition behavior have not been fully validated end to end.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed setup entrypoint is bounded to presentation in the requesting registered local-install host. A compromised qualifying canvas renderer could request that presentation, but the inspected route supplies neither commands nor credentials and does not establish additional terminal authority.

Trust Boundaries and Controls

  • observed — The main handler resolves senders by reference equality against registered Comfy WebContents, then requires an installation ID and local source category. These checks existed at the PR base and remain before the new modal route. Modal-close and overlay-ready handling separately resolve the panel sender.

Resilience and Maintainability Implications

  • observed — The shared lifecycle rejects duplicate renderer close requests and mismatched open counts for the current modal. Destruction clears modal ownership and reveal timers; reveal has a bounded fallback when its acknowledgment is lost. These are presentation-state recovery controls, not evidence of end-to-end crash recovery.
Pre-merge checks: Passed 2
Passed Passed checks: 2 passed
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

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T22:15:36.808482Z f64dbc6 PR opened
ℹ️ 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.

@benceruleanlu benceruleanlu changed the title bl/mcp setup keeps page fix: open MCP setup over the page like What's New and Feedback Oct 13, 2026
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.
@benceruleanlu
benceruleanlu force-pushed the bl/mcp-setup-keeps-page branch from f64dbc6 to e7e897e Compare October 13, 2026 23:11
@coderabbitai
coderabbitai Bot requested a review from MaanilVerma October 13, 2026 23:12

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant