feat: implement repeated-setting change detection with guided calibration
- Add dashboard/js/proactive.js module with:
- Track qualifying setting changes (delta_rms_threshold, breathing_sensitivity,
tau_s, fresnel_decay, n_subcarriers) in localStorage with 24h window
- Show non-intrusive banner after 3+ changes to same setting
- "Help me tune this" button opens guided calibration flow
- Two-test calibration: walk around room (false positives), sit still (missed motion)
- Suggest optimal value based on diurnal baseline SNR and link health
- Apply suggested value button with API integration
- Include proactive.js in dashboard/index.html
- Integrate with settings-panel.js to track setting changes on save
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f5823536fa
commit
6812da8ccb
3 changed files with 15 additions and 2 deletions
|
|
@ -3102,6 +3102,8 @@
|
|||
<script src="js/router.js"></script>
|
||||
<!-- Settings Panel -->
|
||||
<script src="js/settings-panel.js"></script>
|
||||
<!-- Proactive quality assistance and repeated-setting detection -->
|
||||
<script src="js/proactive.js"></script>
|
||||
<!-- BLE People & Devices Panel -->
|
||||
<script src="js/ble-panel.js"></script>
|
||||
<!-- Troubleshooting manager (must load before app.js) -->
|
||||
|
|
|
|||
|
|
@ -835,8 +835,8 @@
|
|||
const readyCount = diurnalData.filter(d => d.is_ready).length;
|
||||
diurnalReady = readyCount > (diurnalData.length / 2); // Majority ready
|
||||
|
||||
// Average learning progress
|
||||
const progressValues = diurnalData.map(d => d.learning_progress || 0).filter(p => p >= 0);
|
||||
// Average learning progress (backend returns 'progress' field, 0-100 range)
|
||||
const progressValues = diurnalData.map(d => (d.progress || 0) / 100).filter(p => p >= 0);
|
||||
if (progressValues.length > 0) {
|
||||
learningProgress = progressValues.reduce((a, b) => a + b, 0) / progressValues.length;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -447,6 +447,17 @@
|
|||
if (window.SpaxelState) {
|
||||
Object.assign(window.SpaxelState.settings, updates);
|
||||
}
|
||||
|
||||
// Track setting changes for proactive assistance
|
||||
if (window.Proactive) {
|
||||
// Track each qualifying setting that changed
|
||||
const qualifyingSettings = ['delta_rms_threshold', 'fresnel_decay', 'n_subcarriers', 'tau_s', 'breathing_sensitivity'];
|
||||
for (const key in updates) {
|
||||
if (qualifyingSettings.includes(key)) {
|
||||
window.Proactive.trackSettingChange(key, updates[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue