name: 🐞 Bug Report
description: Report an error or unexpected behavior
title: "[BUG] "
labels: [bug]
body:
  - type: markdown
    attributes:
      value: |
        **Thank you for reporting a bug!**  
        Please follow these steps to capture all necessary information:

        ### ✅ Before You Report:
        1. Make sure you have the **latest versions**:
           - [ComfyUI Github](https://github.com/comfyanonymous/ComfyUI/releases)
           - [LayerForge Github](https://github.com/Azornes/Comfyui-LayerForge/releases) or via [ComfyUI Node Manager](https://registry.comfy.org/publishers/azornes/nodes/layerforge)
        2. Gather the required logs:
        
        ### 🔍 Enable Debug Logs (for **full** logs):
        
        #### 1. Edit `config.js` (Frontend Logs):
        Path:
        ```
        ComfyUI/custom_nodes/Comfyui-LayerForge/js/config.js
        ```
        Find:
        ```js
        export const LOG_LEVEL = 'NONE';
        ```
        Change to:
        ```js
        export const LOG_LEVEL = 'DEBUG';
        ```
        
        #### 2. Edit `config.py` (Backend Logs):
        Path:
        ```
        ComfyUI/custom_nodes/Comfyui-LayerForge/python/config.py
        ```
        Find:
        ```python
        LOG_LEVEL = 'NONE'
        ```
        Change to:
        ```python
        LOG_LEVEL = 'DEBUG'
        ```

        ➡️ **Restart ComfyUI** after applying these changes to activate full logging.

  - type: input
    id: environment
    attributes:
      label: Environment (OS, ComfyUI version, LayerForge version)
      placeholder: e.g. Windows 11, ComfyUI v0.3.43, LayerForge v1.2.4
    validations:
      required: true

  - type: input
    id: browser
    attributes:
      label: Browser & Version
      placeholder: e.g. Chrome 115.0.0, Firefox 120.1.0
    validations:
      required: true

  - type: textarea
    id: what_happened
    attributes:
      label: What Happened?
      placeholder: Describe the issue you encountered
    validations:
      required: true

  - type: textarea
    id: steps
    attributes:
      label: Steps to Reproduce
      placeholder: |
        1. …
        2. …
        3. …
    validations:
      required: true

  - type: textarea
    id: expected
    attributes:
      label: Expected Behavior
      placeholder: Describe what you expected to happen
    validations:
      required: true

  - type: textarea
    id: actual
    attributes:
      label: Actual Behavior
      placeholder: Describe what happened instead
    validations:
      required: true

  - type: textarea
    id: backend_logs
    attributes:
      label: ComfyUI (Backend) Logs
      description: |
        After enabling DEBUG logs, please:
        1. Restart ComfyUI.
        2. Reproduce the issue.
        3. Copy-paste the newest **TEXT** logs from the terminal/console here.
    validations:
      required: true

  - type: textarea
    id: console_logs
    attributes:
      label: Browser Console Logs
      description: |
        After enabling DEBUG logs:
        1. Open Developer Tools → Console.
          - Chrome/Edge (Win/Linux): `Ctrl+Shift+J`  
            Mac: `Cmd+Option+J`
          - Firefox (Win/Linux): `Ctrl+Shift+K`  
            Mac: `Cmd+Option+K`
          - Safari (Mac): enable **Develop** menu in Preferences → Advanced, then `Cmd+Option+C`
        2. Clear console (before reproducing):
           - Chrome/Edge: “🚫 Clear console” or `Ctrl+L` (Win/Linux) / `Cmd+K` (Mac).
           - Firefox: `Ctrl+Shift+L` (newer) or `Ctrl+L` (older) (Win/Linux) / `Cmd+K` (Mac).
           - Safari: 🗑 icon or `Cmd+K`.
        3. Reproduce the issue.
        4. Copy-paste the **TEXT** logs here (no screenshots).
    validations:
      required: true

  - type: markdown
    attributes:
      value: |
        **Optional:** You can also **attach a screenshot or video** to demonstrate the issue visually.  
        Simply drag & drop or paste image/video files into this issue form. GitHub supports common image formats and MP4/GIF files.
