summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-20 21:07:36 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-20 21:07:36 -1000
commita38ce269cc9283556621b5447eb3a0caf697eae9 (patch)
tree28727aada058e8ec4c01d170f79bf7aaa2ab1201 /web
parent093ad56d8cb7274627a43004c95f4a5dd6b94fb7 (diff)
Add in-app bug reporting feature
- New bugs table in SQLite (migration 005) - Store methods for saving and retrieving bugs - Handlers for GET/POST /bugs - Floating bug button with modal UI - Shows recent bug reports in modal Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'web')
-rw-r--r--web/templates/index.html42
1 files changed, 42 insertions, 0 deletions
diff --git a/web/templates/index.html b/web/templates/index.html
index 617ccfe..2cd4c59 100644
--- a/web/templates/index.html
+++ b/web/templates/index.html
@@ -84,6 +84,48 @@
</div>
</div>
+ <!-- Bug Report Button -->
+ <button onclick="document.getElementById('bug-modal').classList.remove('hidden')"
+ class="fixed bottom-4 right-4 bg-red-500 hover:bg-red-600 text-white p-3 rounded-full shadow-lg no-print"
+ title="Report a bug">
+ 🐛
+ </button>
+
+ <!-- Bug Report Modal -->
+ <div id="bug-modal" class="hidden fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50">
+ <div class="bg-white rounded-lg shadow-xl max-w-md w-full max-h-[80vh] overflow-hidden">
+ <div class="p-4 border-b border-gray-200 flex justify-between items-center">
+ <h2 class="font-semibold text-gray-900">Report Bug</h2>
+ <button onclick="document.getElementById('bug-modal').classList.add('hidden')"
+ class="text-gray-400 hover:text-gray-600">✕</button>
+ </div>
+ <div class="p-4">
+ <form hx-post="/bugs"
+ hx-target="#bug-list"
+ hx-swap="innerHTML"
+ hx-on::after-request="if(event.detail.successful) this.reset()">
+ <textarea name="description"
+ placeholder="Describe the bug..."
+ class="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm mb-3 h-24"
+ required></textarea>
+ <button type="submit"
+ class="w-full bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg text-sm font-medium">
+ Submit Bug Report
+ </button>
+ </form>
+ <div class="mt-4 border-t border-gray-200 pt-4">
+ <h3 class="text-sm font-medium text-gray-700 mb-2">Recent Reports</h3>
+ <div id="bug-list"
+ class="max-h-48 overflow-y-auto"
+ hx-get="/bugs"
+ hx-trigger="load">
+ <p class="text-gray-400 text-sm">Loading...</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
<script src="/static/js/htmx.min.js"></script>
<script src="/static/js/app.js"></script>
</body>