Show the uninstall button whenever there is something to uninstall - #12
Merged
rikkichy merged 1 commit intoSep 7, 2026
Merged
Conversation
Visibility was tied to service.is_running(), so the button is hidden in every state where the service is not up: never installed, installed but stopped, and failed to start. The last two are when removing it matters most, and a user in that state has no way to do it from the app. The service is also not the only thing run_uninstall() removes. The udev rule, the WirePlumber rule and the mix sinks all outlive it, so they can be present with the button hidden and nothing in the UI admitting they exist. Gate on anything_installed() instead, which is the OR of the four things run_uninstall() acts on. It is deliberately not the inverse of needs_setup(): a partial install both needs setup and has things left to remove. Also list the WirePlumber rule and the mix sinks in the confirmation dialog, which claimed only the service and USB permissions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Came out of #9, where someone who installed with the one-liner could not work out how to remove it. Part of that is the installer leaving no checkout behind, but the app makes it harder than it needs to be.
_update_service_statusties the button's visibility toservice.is_running(), so it is hidden in every state where the service is not up: never installed, installed but stopped, and failed to start. The middle two are exactly when someone wants to remove it, and from the UI there is no way to.The service is also not the only thing
run_uninstall()takes out. The udev rule, the WirePlumber rule and the mix sinks all outlive it, so they can be sitting on disk with the button hidden and nothing in the UI acknowledging they are there.This gates on
anything_installed()instead, the OR of the four thingsrun_uninstall()acts on. It is deliberately not the inverse ofneeds_setup(), since a partial install both needs setup and has things left to remove.Checked against a live install, including the case the old code got wrong:
Only two call sites and neither is on a timer, so the extra checks cost nothing.
Second commit-worthy detail folded in: the confirmation dialog said "This will remove the audio service and USB permissions", which understates it. It now names the WirePlumber rule and the mix sinks as well.
Independent of #10 and #11.