name: "🐛 Bug Report"
description: Report a bug or unexpected behavior in Lemonade
labels: ["bug"]
body:
  - type: markdown
    attributes:
      value: |
        Thanks for taking the time to report a bug! Please fill out the details below so we can investigate.

  - type: dropdown
    id: platform
    attributes:
      label: Platform
      description: Which operating system are you using?
      options:
        - Windows
        - Linux/Ubuntu
        - Linux/Fedora
        - Linux/Arch
        - Linux/Other (please specify)
        - macOS
    validations:
      required: true

  - type: input
    id: version
    attributes:
      label: Lemonade Version
      description: "Run `lemonade --version` or check the About dialog in the app."
      placeholder: "e.g. 9.4.2"
    validations:
      required: true

  - type: input
    id: gpu
    attributes:
      label: GPU / APU Model
      description: "Which GPU or APU are you using? You can find this in your system settings (Device Manager on Windows, `lspci | grep -i vga` on Linux, or About This Mac on macOS)."
      placeholder: "e.g. AMD Radeon RX 7900 XTX, AMD Ryzen AI 9 HX 370"
    validations:
      required: false

  - type: dropdown
    id: backend
    attributes:
      label: Component
      description: Which component is involved in this issue?
      options:
        - llama.cpp
        - stable-diffusion.cpp
        - whisper.cpp
        - Kokoro TTS
        - FastFlowLM / NPU
        - RyzenAI
        - Desktop App / UI
        - lemonade (cli)
        - lemond (server)
        - Other / Not sure
    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 went wrong..."
    validations:
      required: true

  - type: textarea
    id: steps
    attributes:
      label: Steps to Reproduce
      description: Step-by-step instructions to reproduce the issue.
      placeholder: |
        1. Load model X with `lemonade run <model>`
        2. Send a request to ...
        3. See error ...
    validations:
      required: true

  - type: textarea
    id: expected
    attributes:
      label: Expected vs Actual Behavior
      description: What did you expect to happen, and what actually happened?
      placeholder: |
        Expected: ...
        Actual: ...
    validations:
      required: false

  - type: textarea
    id: logs
    attributes:
      label: Log Output
      description: |
        Please reproduce the issue with debug logging enabled and paste the relevant log output below.

        **How to collect logs:**
        1. Set the server to debug logging:
           ```
           lemonade config set log_level=debug
           ```
        2. Reproduce the issue.
        3. Copy the relevant log output and paste it below, or attach the log file.

        **Log file locations:**
        - **Windows:** `%LOCALAPPDATA%\lemonade\logs\`
        - **Linux/macOS:** `~/.local/share/lemonade/logs/` or run `lemonade logs`

        **Additional diagnostic commands (run these and paste the output):**
        - `lemonade status` — shows server info and loaded models

        - `lemonade backends` — shows installed backends and driver status

        **Platform-specific tips:**
        - **Windows:** Check Event Viewer (Application log) if the server crashes silently.
        - **Linux:** If using systemd, check `journalctl -u lemond` for service logs.
        - **macOS:** Check Console.app or run `log show --predicate 'process == "lemond"' --last 5m`
      render: shell
    validations:
      required: false

  - type: textarea
    id: additional
    attributes:
      label: Additional Context
      description: Add any other context, screenshots, or related issues here.
    validations:
      required: false
