Because:
- We want to record when a device/account signs out of the browser,
including which account and platform (desktop/iOS/Android). The
existing frontend account_pref.device_signout event only covers
web-settings disconnects and carries no platform, so browser- and
app-initiated sign-outs go unrecorded.
This commit:
- Adds two server-side Glean events: account.device_disconnected (on
/account/device/destroy) and account.session_destroyed (on
/session/destroy), each with a platform extra key.
- Adds a pure platformFromOS helper in fxa-shared/lib/user-agent that
maps a parsed user-agent OS to desktop/ios/android/unknown.
- Threads glean into the devices factory and emits at both destroy
paths; platform is derived from the disconnected device uaOS and the
session user-agent OS respectively.
- Regenerates server_events.ts and adds unit tests for the helper and
both emission sites.