refactor: extract device_detector from snapshot