Skip to content

Fix dead device clicks in the default-device selector - #25

Closed
duketopceo wants to merge 1 commit into
ssupt:mainfrom
duketopceo:fix/dead-device-clicks
Closed

duketopceo wants to merge 1 commit into
ssupt:mainfrom
duketopceo:fix/dead-device-clicks

Conversation

@duketopceo

Copy link
Copy Markdown
Contributor

Summary

setDefaultDevice() silently returned false whenever the current default
could not be resolved to a backend identity — a routine state after device
churn (dock replug, USB audio flap, Bluetooth reconnect, suspend/resume).
The rows stayed visually enabled and the pointer still showed, but every
click was a no-op until something else changed the default. The backend
already recomputes the previous default from routing state when it isn't
supplied, so the panel now passes previous: null instead of aborting.

  • Surface each early return as the direction's error text so a failed
    click reports why instead of no-opping.
  • Narrow row disabling to an actual in-flight default.set or scene apply;
    the backend busy flag flaps during unrelated PipeWire churn and left
    rows unclickable for stretches at a time.

Test plan

  • default.set with previous: null → {"outcome":"applied"} against
    a live backend (aarch64)
  • Select sink/source from the panel while the current default is absent
    from the graph

Generated with Devin

setDefaultDevice() silently returned false whenever the *current*
default could not be resolved to a backend identity — a routine state
after device churn (dock replug, USB audio flap, BT reconnect,
suspend/resume) — leaving every row visually enabled but dead until
something else changed the default. The backend recomputes the
previous default from routing state on its own, so pass
previous:null instead of aborting.

Also:
- Surface every early-return as the direction's error text so a dead
  click reports *why* instead of no-opping.
- Narrow row disabling to an actual in-flight default.set or scene
  apply; the backend 'busy' flag flaps during unrelated PipeWire
  churn and left rows unclickable for long stretches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants