Files
ComfyUI_frontend/src/scripts
DrJKL 33d314b4ac fix: hide DOM widgets when their input slot is linked
`BaseDOMWidgetImpl.isVisible()` only considered `hidden` and
`LGraphNode.isWidgetVisible`. When a widget's input slot was linked
(e.g. promoted to a SubgraphInput), the canvas dimmed the widget via
`computedDisabled` but the DOM overlay (multiline text, custom
component widgets, etc.) stayed fully rendered on top, hiding the
input connection dot beneath it.

`isVisible()` now also returns false when `computedDisabled` is true,
matching the canvas's intent and exposing the connection dot.

Amp-Thread-ID: https://ampcode.com/threads/T-019e4c28-5668-7045-b744-da018fd06d25
Co-authored-by: Amp <amp@ampcode.com>
2026-05-21 14:11:47 -07:00
..
2026-03-06 20:02:19 +00:00

Scripts Directory Documentation

This directory contains TypeScript code inherited from the legacy ComfyUI JavaScript frontend project. The code has been migrated from JavaScript to TypeScript while maintaining compatibility with the original functionality.

When implementing new features, prefer using the new Vue3 system over the legacy scripts.

Key Components

ComfyApi (api.ts)

Main API client class that handles communication with the ComfyUI backend. Provides methods for:

  • Queue management
  • Model operations
  • Extension handling
  • WebSocket communication
  • User data management

ComfyApp (app.ts)

Core application class that manages:

  • Graph manipulation
  • Node management
  • Canvas interactions
  • Extension system
  • Workflow state

UI Components (ui/)

Collection of reusable UI components including:

  • Buttons and button groups
  • Popups and dialogs
  • Draggable lists
  • Image previews
  • Menu system
  • Settings dialog

Integration with Vite

All TypeScript exports are shimmed through Vite configuration to maintain compatibility with the legacy JavaScript codebase. The shimming logic can be found in vite.config.mts.

Legacy Compatibility

This codebase maintains compatibility with the original ComfyUI Legacy Frontend while providing TypeScript type safety and modern development features.

For users wanting to fall back to the legacy frontend, use the command line argument:

--front-end-version Comfy-Org/ComfyUI_legacy_frontend@latest