79f2d79a2e
Relabel (#1204): route + player_state events fire for every output route, not just UPnP — split them into a new 'playback' kind; 'upnp_sync' now means genuinely UPnP/Sonos signal (drops, resync). Migration 0037 adds 'playback' to the kind CHECK; server whitelist, Android reporter labels, and the web kind filter updated. Web sort: the diagnostics list gains a Newest/Oldest-first sort (default newest at top); export follows the displayed order. Fix (#1205): OutputRoute.isConnected was derived from RouteInfo.connectionState, which stays DISCONNECTED for local SYSTEM routes even when active — so a connected Bluetooth device showed "Available" and reported connected:false. The picker subtitle now uses isSelected (route == selected route); the dead isConnected field is removed and the misleading `connected` field dropped from the diagnostics route event (it only ever logs the active route). Refs Scribe M9 (#119), tasks #1204 #1205. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K55iTxn95BtshocgdE1shW
20 lines
962 B
SQL
20 lines
962 B
SQL
-- Add 'playback' to the diagnostic_events kind whitelist (M9 follow-up).
|
|
--
|
|
-- `route` and `player_state` events fire for EVERY output route (phone
|
|
-- speaker, Bluetooth, UPnP/Sonos), so bucketing them under 'upnp_sync'
|
|
-- was misleading — an operator on Bluetooth earbuds saw "upnp_sync"
|
|
-- rows. 'upnp_sync' now means genuinely UPnP/Sonos-specific signal
|
|
-- (drops, and future resync/desync); general playback + route telemetry
|
|
-- moves to the new 'playback' kind.
|
|
--
|
|
-- Per the enum-CHECK-whitelist rule, the new value lands by dropping and
|
|
-- re-adding the constraint in the same change. Existing rows tagged
|
|
-- 'upnp_sync' stay as-is (debug telemetry on a 30-day retention).
|
|
|
|
ALTER TABLE diagnostic_events DROP CONSTRAINT diagnostic_events_kind_check;
|
|
ALTER TABLE diagnostic_events ADD CONSTRAINT diagnostic_events_kind_check
|
|
CHECK (kind IN (
|
|
'connectivity', 'upnp_sync', 'power', 'lifecycle',
|
|
'heartbeat', 'http', 'playback'
|
|
));
|