impl LauncherState {
    pub fn status_line(&self) -> String {
        format!(
            "server={} mode={} view={} active={} power={} source={}x{} d1={} d2={} s1={} s2={} camera={} camera_quality={} camera_transport={} mic={} mic_transport={} noise_suppression={} speaker={} channels=cam:{}/mic:{}/audio:{} remote_caps=cam:{:?}/mic:{:?}/output:{:?}/codec:{:?} cal={}:{:+.1}ms audio_gain={} mic_gain={} kbd={} mouse={} swap={}",
            self.server_available,
            match self.routing {
                InputRouting::Local => "local",
                InputRouting::Remote => "remote",
            },
            match self.view_mode {
                ViewMode::Unified => "unified",
                ViewMode::Breakout => "breakout",
            },
            self.remote_active,
            if self.capture_power.enabled {
                "on"
            } else {
                "off"
            },
            self.preview_source.width,
            self.preview_source.height,
            self.displays[0].label(),
            self.displays[1].label(),
            self.feed_source_preset(0).as_id(),
            self.feed_source_preset(1).as_id(),
            media_status_label(self.channels.camera, self.devices.camera.as_deref()),
            self.camera_quality
                .map(CameraMode::short_label)
                .unwrap_or_else(|| "default".to_string()),
            self.effective_webcam_transport().label(),
            media_status_label(self.channels.microphone, self.devices.microphone.as_deref()),
            self.upstream_audio_transport.label(),
            self.mic_noise_suppression,
            media_status_label(self.channels.audio, self.devices.speaker.as_deref()),
            self.channels.camera,
            self.channels.microphone,
            self.channels.audio,
            self.server_camera,
            self.server_microphone,
            self.server_camera_output,
            self.server_camera_codec,
            self.calibration.source,
            self.calibration.active_audio_offset_us as f64 / 1000.0,
            self.audio_gain_label(),
            self.mic_gain_label(),
            self.devices.keyboard.as_deref().unwrap_or("all"),
            self.devices.mouse.as_deref().unwrap_or("all"),
            self.swap_key,
        )
    }
}
