Commit graph

3 commits

Author SHA1 Message Date
jedarden
16462e7671 test: improve HelpOverlay test mocking
- Add dispatchEvent and classList mocks for more complete DOM element simulation
- Fix help_articles.json path expectation (relative, not absolute)
- Ensure window.HelpOverlay is properly loaded from module
2026-05-04 04:55:33 -04:00
jedarden
4c221418c1 test(proactive): fix localStorage state isolation between tests
Move localStorage.clear() to parent beforeEach to ensure module
initialization always starts with clean state. This fixes test
isolation where localStorage data from previous tests was being
loaded by the module before the nested beforeEach could clear it.

The repeated-setting change detection feature is already fully
implemented in proactive.js with:
- Setting change tracking in localStorage (24h window)
- Help prompt after 3+ changes for qualifying settings
- Guided calibration flow with false positive and missed motion tests
- Value suggestions based on diurnal baseline SNR and link health
- Apply suggested value button

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 00:37:50 -04:00
jedarden
f0798edc6b feat: implement repeated-setting change detection with guided calibration
Detect when a user changes the same configuration setting more than 3
times within 24 hours and show a non-intrusive prompt offering help.

Features:
- Track qualifying setting changes (delta_rms_threshold, breathing_sensitivity,
  tau_s, fresnel_decay, n_subcarriers) in localStorage
- Non-intrusive help prompt with "Help me tune this" button
- Guided calibration flow with:
  - False positive test: walk around room for 15 seconds
  - Missed motion test: sit still for 10 seconds
  - Suggest optimal value based on diurnal baseline SNR and link health
  - Apply suggested value button
- Full modal UI with progress indicators and countdown timers
- Integration with settings-panel.js for automatic tracking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 00:05:52 -04:00