From 5eb90dbbd18cf9b22d83fe31303fbb09099088ed Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 26 Feb 2026 18:12:59 -0600 Subject: feat(recording): replace icons with text state labels in quick-setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace hard-to-distinguish nerd font icons with clear text labels: Jabra SPEAK 510 Mono [active - running] Shure MV7+ Analog Stereo [active - idle] Ryzen HD Audio Controller [inactive - suspended] Both mic and sink steps use the same labeling. Devices sorted running → idle → suspended. Removed mic-active-p and sink-active-p helpers — state now comes directly from the verbose pactl parsers via get-available-mics/sinks which return (name description state). --- tests/test-video-audio-recording--get-available-sinks.el | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'tests/test-video-audio-recording--get-available-sinks.el') diff --git a/tests/test-video-audio-recording--get-available-sinks.el b/tests/test-video-audio-recording--get-available-sinks.el index 540c4f0f..a8e7ad6a 100644 --- a/tests/test-video-audio-recording--get-available-sinks.el +++ b/tests/test-video-audio-recording--get-available-sinks.el @@ -5,6 +5,7 @@ ;; Verifies that available sinks are discovered correctly: ;; - Muted sinks are excluded ;; - Friendly descriptions from PulseAudio are used +;; - PulseAudio state is included ;;; Code: @@ -37,16 +38,25 @@ Each sink is (name description mute state)." ("muted-sink" "Muted Sink" "yes" "SUSPENDED")))))) (let ((sinks (cj/recording--get-available-sinks))) (should (= 1 (length sinks))) - (should (equal "active-sink" (car (car sinks))))))) + (should (equal "active-sink" (nth 0 (car sinks))))))) (ert-deftest test-get-available-sinks-normal-uses-descriptions () - "Test that friendly descriptions are returned as cdr." + "Test that friendly descriptions are returned as second element." (cl-letf (((symbol-function 'shell-command-to-string) (lambda (_cmd) (test-sinks--make-pactl-output '(("raw-sink-name" "Friendly Sink Name" "no" "IDLE")))))) (let ((sinks (cj/recording--get-available-sinks))) - (should (equal "Friendly Sink Name" (cdr (car sinks))))))) + (should (equal "Friendly Sink Name" (nth 1 (car sinks))))))) + +(ert-deftest test-get-available-sinks-normal-includes-state () + "Test that PulseAudio state is returned as third element." + (cl-letf (((symbol-function 'shell-command-to-string) + (lambda (_cmd) + (test-sinks--make-pactl-output + '(("sink-a" "Sink A" "no" "RUNNING")))))) + (let ((sinks (cj/recording--get-available-sinks))) + (should (equal "RUNNING" (nth 2 (car sinks))))))) (ert-deftest test-get-available-sinks-normal-multiple-sinks () "Test that multiple non-muted sinks are returned." -- cgit v1.2.3