- Add renderFeedbackExplanation() function to display detailed explanations
- Include contributing link name, threshold exceed ratio, and timestamp
- Add diagnostic info (root cause and advice) when available
- Add expandable UI with toggle arrow
- Add CSS styles for explanation section
- Show correction note about system learning from feedback
When user marks detection as FALSE_POSITIVE, show explanation:
'The system detected motion here because: [link]'s signal exceeded
threshold by Nx at [time]. Could be caused by: [root cause or
'ambient RF interference']. We've noted this and will apply a correction.'
Files: dashboard/js/feedback.js
Acceptance: explanation shown after any FALSE_POSITIVE feedback;
contains contributing link name; shows diagnostic result or default message.
- Add feedback_store.go with SQLite storage for detection feedback and accuracy metrics
- Add feedback_processor.go for background processing of user feedback
- Add accuracy.go for weekly precision/recall/F1 metric computation
- Add handler.go with REST API routes for feedback submission and accuracy retrieval
- Wire learning package into main_phase6.go with background processing
- Add dashboard/js/feedback.js with thumbs-up/down UI components
- Add dashboard/js/accuracy.js with accuracy panel rendering and sparkline trends
- Add comprehensive tests for feedback storage and accuracy computation
Feedback UI provides:
- Thumbs-up/down buttons for detection events
- Feedback form with false positive/negative options
- Missed detection reporting with position/zone selection
- Motivational counter showing improvement from user corrections
Accuracy panel shows:
- Circular gauge with F1 score
- Week-over-week trend sparkline
- Per-zone breakdown of precision/recall
- Total corrections count and improvement percentage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>