Skip to content

Leave unplugged inputs out of the audio panel, like unplugged outputs - #18725

Merged
dhh merged 3 commits into
omacom:quattrofrom
jasasonc:hide-unplugged-audio-inputs
Nov 20, 2026
Merged

dhh merged 3 commits into
omacom:quattrofrom
jasasonc:hide-unplugged-audio-inputs

Conversation

@jasasonc

Copy link
Copy Markdown
Contributor

The audio panel leaves unplugged outputs out of its list, but not unplugged inputs. A headset microphone with nothing in the jack still shows up under Input, and clicking it makes a dead input the default.

The panel already reads source availability (omarchy-audio-sink-availability sources), so this applies it to the input list the same way the output list uses sink availability: an input whose ports are all unavailable is left out, unless it is the current default. Both lists now share one helper in Model.js.

Screenshots

In an Omarchy VM with two test inputs, the headset one reported unplugged.

Before After
Input list shows the unplugged Headset Input list shows only Microphone

Closes #18724

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

The audio panel now hides unplugged inputs using the same rule as outputs, while keeping the current default visible.

  • The audio panel hides unplugged inputs unless one is already selected.

No actionable issues found.

Reviews (2) · Last reviewed commit: "Drop the availability guard no caller ne..." · Reviewed by Greptile

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Nov 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 73cc376. I found nothing wrong, and the fix does what the description says.

What ran, on a disposable Omarchy VM with the shell linked to this branch: two virtual inputs, Microphone (the default) and Headset, with omarchy-audio-sink-availability sources wrapped so that Headset reports 0, the way an empty headset jack does in #18724. The VM has no sound card, so the wrapper is what makes it "unplugged"; the panel code under test is the real code.

  • On quattro's panel the Input list shows both, including the unplugged Headset. On this branch it shows only Microphone.
  • With Headset made the default, this branch keeps it in the list, first, then Microphone.
  • An unplugged virtual HDMI output is still left out of Output, so moving the sink filter into Model.availableDevices didn't change outputs. Before the first availability listing arrives, the empty map lets every device through, as sinkAvailabilityLoaded did. Nothing else in the repository reads the removed members.
  • ./test/cli passes, and so do audio-test.sh, audio-pactl-test.sh, audio-output-sink-test.sh, panel-open-budgets-test.sh, qml-text-format-test.sh, plugins-test.sh and panel-command-path-test.sh. The new assertion fails when the availability check in availableDevices is disabled, so it tests the filter and not just that the helper exists.

Before, on quattro: the Input list shows Microphone and the unplugged Headset
After, on this branch: the Input list shows only Microphone

Second opinion: Codex Medium found no defects; it agreed with the above, and its independence isn't guaranteed. muse-wonder (thinking high) raised three points. One doesn't hold: it said keeping the current device could bring back a platform-hidden source, but quattro already put the current source back into the list the same way. The other two are noted for the maintainer, not asked of you. First, if there is no default source and every input is unplugged, the panel falls back to its cached list, the same as for outputs. Second, an input whose jack detection wrongly says "not available" now only appears in the panel once it is the default.

Nothing is left for you to do. It now waits on the maintainer.

omarchybot and others added 2 commits November 18, 2026 14:21
Both callers always pass an availability object, never null.

Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

I merged current quattro into this branch; it was 180 commits behind. I also dropped an !availability guard: both callers always pass an object.

What was checked, on an Omarchy worker, against the merged branch:

  • audio-test.sh passes, and fails against quattro's code.
  • ./test/cli passes, 136 checks.

Claude Opus 5.5 at high effort reviewed the changes as a second opinion; its findings are folded in. Its independence from my review isn't guaranteed. Greptile scores the new head 5/5 with no open findings.

This waits on the maintainer.

@dhh
dhh merged commit eda4adb into omacom:quattro Nov 20, 2026
3 checks passed
@emirb emirb added this to the 4.6.0 milestone Dec 1, 2026
@jasasonc
jasasonc deleted the hide-unplugged-audio-inputs branch December 2, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audio panel lists unavailable input devices — sources are not availability-filtered (unplugged headset mic shown and selectable)

4 participants