name: Bug Report
description: Report a bug or unexpected behavior
title: "[Bug]: "
labels: ["bug", "triage"]
body:
  - type: markdown
    attributes:
      value: |
        Thanks for taking the time to report a bug! Please fill out the form below.

  - type: dropdown
    id: component
    attributes:
      label: Component
      description: Which part of the project is affected?
      options:
        - Bambuddy
        - SpoolBuddy
        - Both
    validations:
      required: true

  - type: textarea
    id: description
    attributes:
      label: Bug Description
      description: A clear and concise description of what the bug is.
      placeholder: Describe what happened...
    validations:
      required: true

  - type: textarea
    id: expected
    attributes:
      label: Expected Behavior
      description: What did you expect to happen?
      placeholder: Describe what you expected...
    validations:
      required: true

  - type: textarea
    id: steps
    attributes:
      label: Steps to Reproduce
      description: How can we reproduce this issue?
      placeholder: |
        1. Go to '...'
        2. Click on '...'
        3. See error
    validations:
      required: true

  - type: dropdown
    id: printer
    attributes:
      label: Printer Model
      description: Which printer model are you using?
      options:
        - X1 Carbon
        - X1
        - X1E
        - P1S
        - P1P
        - P2S
        - A1
        - A1 Mini
        - H2D
        - H2D Pro
        - H2C
        - H2S
        - Multiple printers
        - Not printer-related
    validations:
      required: false

  - type: input
    id: version
    attributes:
      label: Bambuddy Version
      description: Which version of Bambuddy are you running? (Check Settings page)
      placeholder: e.g., 0.1.5
    validations:
      required: true

  - type: input
    id: spoolbuddy_version
    attributes:
      label: SpoolBuddy Version
      description: If SpoolBuddy-related, which version is running? (Check SpoolBuddy Settings → Updates)
      placeholder: e.g., 0.1.0

  - type: input
    id: firmware
    attributes:
      label: Printer Firmware Version
      description: Which firmware version is your printer running? (Check printer screen or Bambu Handy app). Leave blank if not printer-related.
      placeholder: e.g., 01.08.00.00

  - type: dropdown
    id: installation
    attributes:
      label: Installation Method
      description: How did you install Bambuddy?
      options:
        - Manual (git clone)
        - Docker
        - Other
    validations:
      required: true

  - type: dropdown
    id: os
    attributes:
      label: Operating System
      description: What OS is Bambuddy running on?
      options:
        - Linux (Ubuntu/Debian)
        - Linux (Other)
        - macOS
        - Windows
        - Docker
        - Other
    validations:
      required: true

  - type: markdown
    attributes:
      value: |
        ---
        ### 📦 Support Package

        For faster debugging, please create and attach a **Support Package** from **Settings → System Info → Download Support Package**.
        This includes logs, system info, and configuration (with sensitive data redacted).

        For detailed instructions on enabling debug logging, see: [Debug Logging Guide](https://wiki.bambuddy.cool/features/system-info/?h=debug#enable-debug-logging)

  - type: textarea
    id: logs
    attributes:
      label: Relevant Logs / Support Package
      description: |
        Attach a support package (.zip) or paste relevant logs here. Enable DEBUG mode for verbose logging.
        💡 Tip: You can drag and drop files directly into this text box.
      placeholder: |
        Drag and drop your support package .zip file here, or paste logs...

  - type: textarea
    id: screenshots
    attributes:
      label: Screenshots
      description: |
        If applicable, add screenshots to help explain your problem.
        💡 Tip: You can drag and drop images directly into this text box.

  - type: textarea
    id: additional
    attributes:
      label: Additional Context
      description: Add any other context about the problem here.

  - type: checkboxes
    id: checklist
    attributes:
      label: Checklist
      options:
        - label: I have searched existing issues to ensure this bug hasn't already been reported
          required: true
        - label: I am using the latest version of Bambuddy
          required: true
        - label: My printer is set to LAN Only mode
          required: true
        - label: My printer has Developer Mode enabled
          required: true
