name: Bug Report
description: File a bug report to help us improve the library
title: "[Bug]: "
labels: ["bug", "triage"]
assignees: []
body:
  - type: markdown
    attributes:
      value: |
        Thanks for taking the time to fill out this bug report! Please provide as much detail as possible to help us diagnose and fix the issue.

  - type: input
    id: version
    attributes:
      label: Library Version
      description: What version of the library are you using?
      placeholder: "v1.0.0"
    validations:
      required: true

  - type: dropdown
    id: go-version
    attributes:
      label: Go Version
      description: What version of Go are you using?
      options:
        - "1.25.5+"
        - "1.25"
        - "1.24"
        - "1.23"
        - "Other (please specify in description)"
    validations:
      required: true

  - type: dropdown
    id: operating-system
    attributes:
      label: Operating System
      description: What operating system are you running on?
      options:
        - "Linux"
        - "macOS"
        - "Windows"
        - "FreeBSD"
        - "Other (please specify in description)"
    validations:
      required: true

  - type: input
    id: device-model
    attributes:
      label: Bose Device Model
      description: What Bose SoundTouch device are you trying to control?
      placeholder: "SoundTouch 10, SoundTouch 20, etc."
    validations:
      required: true

  - type: input
    id: device-firmware
    attributes:
      label: Device Firmware Version
      description: What firmware version is your device running? (Check in Bose app or via /info endpoint)
      placeholder: "4.8.1.4567.891234567"

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

  - type: textarea
    id: reproduction-steps
    attributes:
      label: Steps to Reproduce
      description: Steps to reproduce the behavior
      placeholder: |
        1. Go to '...'
        2. Click on '....'
        3. Scroll down to '....'
        4. See error
    validations:
      required: true

  - type: textarea
    id: expected-behavior
    attributes:
      label: Expected Behavior
      description: A clear and concise description of what you expected to happen.
      placeholder: "What should have happened instead?"
    validations:
      required: true

  - type: textarea
    id: code-sample
    attributes:
      label: Code Sample
      description: Please provide a minimal code sample that reproduces the issue
      render: go
      placeholder: |
        package main

        import (
            "fmt"
            "github.com/gesellix/bose-soundtouch/pkg/client"
        )

        func main() {
            // Your code that demonstrates the issue
        }
    validations:
      required: false

  - type: textarea
    id: logs
    attributes:
      label: Error Messages / Logs
      description: Please include any relevant error messages, stack traces, or log output
      render: shell
      placeholder: |
        Error: connection refused
        at github.com/gesellix/bose-soundtouch/pkg/client.(*Client).makeRequest
        ...
    validations:
      required: false

  - type: dropdown
    id: component
    attributes:
      label: Component
      description: Which component is affected?
      multiple: true
      options:
        - "Client Library (pkg/client)"
        - "WebSocket Events"
        - "Device Discovery"
        - "CLI Tool"
        - "Models/XML Parsing"
        - "Documentation"
        - "Examples"
        - "Build/Release"
    validations:
      required: false

  - type: dropdown
    id: severity
    attributes:
      label: Severity
      description: How severe is this bug?
      options:
        - "Low - Minor inconvenience"
        - "Medium - Affects functionality but workaround exists"
        - "High - Blocks major functionality"
        - "Critical - Application crashes or data loss"
    validations:
      required: true

  - type: textarea
    id: network-info
    attributes:
      label: Network Configuration
      description: Details about your network setup (if relevant to the issue)
      placeholder: |
        - Device IP: 192.0.2.100
        - Network type: WiFi/Ethernet
        - Router model:
        - Any firewalls or network restrictions:
    validations:
      required: false

  - type: textarea
    id: additional-context
    attributes:
      label: Additional Context
      description: Add any other context about the problem here
      placeholder: "Screenshots, network traces, related issues, etc."
    validations:
      required: false

  - type: checkboxes
    id: troubleshooting
    attributes:
      label: Troubleshooting Steps
      description: Have you tried these troubleshooting steps?
      options:
        - label: "I have checked the [Troubleshooting Guide](docs/TROUBLESHOOTING.md)"
        - label: "I have verified my device is reachable (ping test)"
        - label: "I have tested with the CLI tool"
        - label: "I have checked for similar existing issues"
        - label: "I am using the latest version of the library"

  - type: checkboxes
    id: terms
    attributes:
      label: Code of Conduct
      description: By submitting this issue, you agree to follow our Code of Conduct
      options:
        - label: "I agree to follow this project's Code of Conduct"
          required: true
