Browse Source

chore(triage): tighten bug-report template + add Area dropdown to cut invalid-issue load

  170 issues have been closed with the `invalid` label (61 of them in
  the last 30 days alone — ~1 in 5 of all closed issues), almost always
  because the reporter hadn't run the in-app Connection Diagnostic or
  checked the documented troubleshooting page. The Connection Diagnostic
  shipped weeks ago but the bug-report form let people skip it: the
  "I ran it" checkbox was `required: false` and the Support Package
  field was optional. Tighten both.

  Form changes (.github/ISSUE_TEMPLATE/bug_report.yml):

  - Connection Diagnostic checkbox: required: false → true
  - Support Package field: required: false → true ("drag the .zip
    or explain why you cannot attach one")
  - New required textarea "Troubleshooting steps already taken" —
    forces the reporter to type WHAT they tried and WHICH wiki pages
    they checked before submitting. Empty answers can't submit.
  - Pre-form intro spells out the search → wiki → diagnostic →
    support package sequence and cites the 1-in-5 stat
  - Final-checks list grew from one to three required confirmations
    (searched issues + checked troubleshooting wiki + ran Connection
    Diagnostic for any connection/printing/camera issue)

  Bug categorization (the gap that motivated this):

  - Old `Component` dropdown was Bambuddy / SpoolBuddy / Both — no
    area triage signal
  - Replaced with two required dropdowns:
    - Product: Bambuddy / SpoolBuddy
    - Area: 15 options covering the actual feature surface +
      Other / not sure
  - Auto-label workflow (.github/workflows/auto-label-area.yml)
    reads the Area dropdown from the rendered issue body on
    open/edit and applies the matching area:* label. Tolerant of
    CRLF and the _No response_ placeholder, won't re-add on edit
    re-fires, warns on unknown Area values

  Maintainer hand-off — labels must exist BEFORE the workflow runs,
  since github-script's addLabels throws on missing labels. Create the
  16 labels (15 area:* + 1 area:unsorted) once via the `gh label create`
  commands captured in CHANGELOG / commit context.

  OS dropdown left untouched (Docker stays — per Martin).

  Printer Model dropdown verified against backend/app/utils/printer_models.py
  PRINTER_MODEL_MAP: all 13 current models present (X1 Carbon, X1, X1E,
  X2D, P1S, P1P, P2S, A1, A1 Mini, H2D, H2D Pro, H2C, H2S).
maziggy 3 days ago
parent
commit
5d248e16ba
3 changed files with 164 additions and 19 deletions
  1. 70 19
      .github/ISSUE_TEMPLATE/bug_report.yml
  2. 94 0
      .github/workflows/auto-label-area.yml
  3. 0 0
      CHANGELOG.md

+ 70 - 19
.github/ISSUE_TEMPLATE/bug_report.yml

@@ -6,17 +6,47 @@ body:
   - type: markdown
     attributes:
       value: |
-        Thanks for taking the time to report a bug! Please fill out the form below.
+        Thanks for taking the time to report a bug!
+
+        **Before you submit, please:**
+        1. Search [existing issues](https://github.com/maziggy/bambuddy/issues?q=is%3Aissue) — your problem may already be reported or resolved.
+        2. Skim the [Troubleshooting wiki](https://wiki.bambuddy.cool/reference/troubleshooting/) — roughly 1 in 5 closed bug reports turn out to be setup or configuration issues already documented there.
+        3. If your printer won't connect / won't print / camera won't load, run the in-app **Connection Diagnostic** (printer card or System → Diagnostics) FIRST. Most connection bugs are diagnosed in 30 seconds by the diagnostic and need no GitHub issue.
+        4. Generate a **Support Package** from System → Download Support Package — without it, most bugs cannot be investigated.
 
   - type: dropdown
-    id: component
+    id: product
     attributes:
-      label: Component
-      description: Which part of the project is affected?
+      label: Product
+      description: Which product is affected?
       options:
         - Bambuddy
         - SpoolBuddy
-        - Both
+    validations:
+      required: true
+
+  - type: dropdown
+    id: area
+    attributes:
+      label: Area
+      description: Which part of the product is affected? Pick the closest match — picking "Other" makes triage slower.
+      options:
+        - Printer connection / setup
+        - Print start / dispatch
+        - Filament / AMS / Spoolman
+        - Slicer integration (Bambu Studio / OrcaSlicer)
+        - Virtual Printer (VP)
+        - Camera / live view / timelapse
+        - Archives / library / files
+        - Statistics
+        - Print Queue / scheduling
+        - Notifications
+        - Authentication / users / permissions
+        - Updates / firmware check
+        - UI / display / theme / i18n
+        - API / integrations (Home Assistant, MQTT export, Obico, ...)
+        - SpoolBuddy kiosk / display
+        - Other / not sure
     validations:
       required: true
 
@@ -50,6 +80,22 @@ body:
     validations:
       required: true
 
+  - type: textarea
+    id: troubleshooting_tried
+    attributes:
+      label: Troubleshooting steps already taken
+      description: |
+        What did you try BEFORE opening this issue? Which wiki pages did you check? Which in-app diagnostics did you run?
+
+        This is required because roughly 1 in 5 issues opened turn out to be already-documented setup problems. A meaningful answer here saves a round-trip and helps everyone.
+      placeholder: |
+        - Ran the in-app Connection Diagnostic — result: ...
+        - Checked wiki page: <paste URL or page name>
+        - Tried restarting / re-adding the printer
+        - Searched closed issues for: "<keywords>"
+    validations:
+      required: true
+
   - type: dropdown
     id: printer
     attributes:
@@ -79,7 +125,7 @@ body:
     attributes:
       label: Bambuddy Version
       description: Which version of Bambuddy are you running? (Check Settings page)
-      placeholder: e.g., 0.1.5
+      placeholder: e.g., 0.2.5
     validations:
       required: true
 
@@ -128,22 +174,25 @@ body:
     attributes:
       value: |
         ---
-        ### 📦 Support Package
+        ### 📦 Support Package — REQUIRED
 
-        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).
+        Create and attach a **Support Package** from **System → Download Support Package**.
+        It bundles logs, system info, and configuration (sensitive data redacted) — without it, most bugs cannot be reproduced or investigated.
 
-        For detailed instructions on enabling debug logging, see: [Debug Logging Guide](https://wiki.bambuddy.cool/features/system-info/?h=debug#enable-debug-logging)
+        Detailed instructions: [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
+      label: Support Package (.zip) and / or relevant logs
       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.
+        Drag and drop your support package .zip here, or paste relevant logs. Enable DEBUG mode for verbose logging.
+
+        Reports without a Support Package or logs almost always go back-and-forth for a week before any progress is made. If you genuinely cannot generate one (e.g. Bambuddy itself won't start), write WHY here.
       placeholder: |
-        Drag and drop your support package .zip file here, or paste logs...
+        Drag and drop your support package .zip file here, or paste logs / explain why you cannot attach one...
+    validations:
+      required: true
 
   - type: textarea
     id: screenshots
@@ -162,15 +211,17 @@ body:
   - type: checkboxes
     id: checklist
     attributes:
-      label: Checklist
+      label: Final checks
       options:
-        - label: I have searched existing issues to ensure this bug hasn't already been reported
+        - label: I searched existing (open AND closed) issues and this bug hasn't already been reported or resolved
           required: true
-        - label: I am using the latest version of Bambuddy
+        - label: I checked the [Troubleshooting wiki](https://wiki.bambuddy.cool/reference/troubleshooting/) and the relevant feature page for my issue
+          required: true
+        - label: I am using the latest version of Bambuddy (or the latest daily build)
           required: true
         - label: My printer is set to LAN Only mode
           required: true
         - label: My printer has Developer Mode enabled
           required: true
-        - label: For a connection or printing problem, I ran the in-app Connection Diagnostic (printer card or System page) and included the result above
-          required: false
+        - label: For any connection / printing / camera issue, I ran the in-app Connection Diagnostic and included the result above
+          required: true

+ 94 - 0
.github/workflows/auto-label-area.yml

@@ -0,0 +1,94 @@
+# Auto-apply area:* label from the "Area" dropdown in bug_report.yml.
+#
+# The bug-report issue form renders dropdown values into the issue body as a
+# section like:
+#
+#   ### Area
+#
+#   Printer connection / setup
+#
+# This workflow parses that section after issue creation/edit and adds the
+# matching area:* label. Frees the maintainer from typing the same label on
+# every new bug.
+#
+# Labels referenced here must already exist in the repo — see the
+# `gh label create` commands in CHANGELOG for [0.2.5b1].
+name: Auto-label Issue Area
+
+on:
+  issues:
+    types: [opened, edited]
+
+permissions:
+  issues: write
+
+jobs:
+  apply-area-label:
+    runs-on: ubuntu-latest
+    if: github.event.issue.pull_request == null
+    steps:
+      - name: Apply area:* label from Area dropdown
+        uses: actions/github-script@v7
+        with:
+          script: |
+            const body = context.payload.issue.body || '';
+
+            // Map of Area dropdown value (lowercased, trimmed) → area:* label.
+            // Keep in lockstep with .github/ISSUE_TEMPLATE/bug_report.yml.
+            const areaMap = {
+              'printer connection / setup':                    'area:connection',
+              'print start / dispatch':                        'area:print-dispatch',
+              'filament / ams / spoolman':                     'area:filament',
+              'slicer integration (bambu studio / orcaslicer)': 'area:slicer',
+              'virtual printer (vp)':                          'area:vp',
+              'camera / live view / timelapse':                'area:camera',
+              'archives / library / files':                    'area:archives',
+              'statistics':                                    'area:stats',
+              'print queue / scheduling':                      'area:queue',
+              'notifications':                                 'area:notifications',
+              'authentication / users / permissions':          'area:auth',
+              'updates / firmware check':                      'area:updates',
+              'ui / display / theme / i18n':                   'area:ui',
+              'api / integrations (home assistant, mqtt export, obico, ...)': 'area:integrations',
+              'spoolbuddy kiosk / display':                    'area:spoolbuddy',
+              'other / not sure':                              'area:unsorted',
+            };
+
+            // GitHub issue forms render dropdown answers under a level-3 heading
+            // matching the field label. Capture the first non-blank line of the
+            // section. Tolerant of trailing whitespace and CRLF endings.
+            const match = body.match(/###\s+Area\s*\r?\n\s*\r?\n\s*([^\r\n]+)/i);
+            if (!match) {
+              core.info('No "Area" section found in issue body — skipping.');
+              return;
+            }
+            const picked = match[1].trim().toLowerCase();
+
+            // Strip any markdown bold the form might add (rare) and tolerate
+            // a "_No response_" placeholder some renderers insert for required-
+            // but-empty fields (shouldn't happen, the field is required).
+            if (picked === '_no response_' || picked === '') {
+              core.info('Area field empty — skipping.');
+              return;
+            }
+
+            const label = areaMap[picked];
+            if (!label) {
+              core.warning(`Unrecognised Area value: "${picked}". Update areaMap in auto-label-area.yml.`);
+              return;
+            }
+
+            // Don't re-add if already present (issue edit path).
+            const existing = (context.payload.issue.labels || []).map(l => l.name);
+            if (existing.includes(label)) {
+              core.info(`Label "${label}" already present — nothing to do.`);
+              return;
+            }
+
+            await github.rest.issues.addLabels({
+              owner: context.repo.owner,
+              repo:  context.repo.repo,
+              issue_number: context.payload.issue.number,
+              labels: [label],
+            });
+            core.info(`Applied label "${label}" to issue #${context.payload.issue.number}.`);

File diff suppressed because it is too large
+ 0 - 0
CHANGELOG.md


Some files were not shown because too many files changed in this diff