diff --git a/dashboard/js/feedback.js b/dashboard/js/feedback.js index 4bd9b60..aab1f10 100644 --- a/dashboard/js/feedback.js +++ b/dashboard/js/feedback.js @@ -368,17 +368,27 @@ // Create inline response element var inline = document.createElement('div'); inline.className = 'feedback-inline-response feedback-inline-' + (response.type || 'info'); - inline.innerHTML = '\ + + var content = '\
\ + The system detected motion here because:\ + ' + linkName + '\'s signal (deltaRMS: ' + deltaRMS + ') exceeded the motion threshold by\ + ' + ratio + 'x at ' + timestamp + '.\ +
\ + '; + + // Add diagnostic info if available + if (diagnosis) { + explanationHTML += '\ +\ + Possible cause: Ambient RF interference or environmental changes.\ +
\ + '; + } + + // Add additional contributing links if any + if (contributingLinks.length > 1) { + var linkNames = contributingLinks.slice(1).map(function(l) { + return this.formatLinkID(l.link_id); + }.bind(this)).join(', '); + + explanationHTML += '\ +\ + Contributing links: ' + linkNames + '\ +
\ + '; + } + + // Add correction note + explanationHTML += '\ +\ + We\'ve noted this feedback and will apply corrections to improve future detection accuracy.\ +
\ + '; + } else { + explanationHTML += '\ +\ + The system detected motion based on signal patterns across multiple links.\ + We\'ve noted this feedback to improve accuracy.\ +
\ + '; + } + + explanationHTML += '\ +