spaxel/dashboard/node_modules/caniuse-lite/dist/unpacker/agents.js
jedarden c817e96802 feat: implement repeated-setting change detection with guided calibration
Detects when user changes same config setting 3+ times within 24 hours.
Shows non-intrusive prompt offering help with guided calibration flow.

Guided calibration features:
- Test for false positives (walk around room)
- Test for missed motion (sit still)
- Suggest optimal value based on diurnal baseline SNR and link health
- Apply suggested value button

Files:
- dashboard/js/proactive.js: Complete implementation with localStorage tracking

Acceptance:
- Help prompt fires after 3+ changes in 24h
- Calibration flow tests both directions
- Suggests value based on system data
- Apply button works
2026-04-11 00:18:19 -04:00

47 lines
1.4 KiB
JavaScript

'use strict'
const browsers = require('./browsers').browsers
const versions = require('./browserVersions').browserVersions
const agentsData = require('../../data/agents')
function unpackBrowserVersions(versionsData) {
return Object.keys(versionsData).reduce((usage, version) => {
usage[versions[version]] = versionsData[version]
return usage
}, {})
}
module.exports.agents = Object.keys(agentsData).reduce((map, key) => {
let versionsData = agentsData[key]
map[browsers[key]] = Object.keys(versionsData).reduce((data, entry) => {
if (entry === 'A') {
data.usage_global = unpackBrowserVersions(versionsData[entry])
} else if (entry === 'C') {
data.versions = versionsData[entry].reduce((list, version) => {
if (version === '') {
list.push(null)
} else {
list.push(versions[version])
}
return list
}, [])
} else if (entry === 'D') {
data.prefix_exceptions = unpackBrowserVersions(versionsData[entry])
} else if (entry === 'E') {
data.browser = versionsData[entry]
} else if (entry === 'F') {
data.release_date = Object.keys(versionsData[entry]).reduce(
(map2, key2) => {
map2[versions[key2]] = versionsData[entry][key2]
return map2
},
{}
)
} else {
// entry is B
data.prefix = versionsData[entry]
}
return data
}, {})
return map
}, {})