Repository navigation
Prefer mute over device class for the audio bar glyph - #8883
Closed
chessing234 wants to merge 3 commits into
Closed
chessing234 wants to merge 3 commits into
chessing234 wants to merge 3 commits into
Conversation
Headphones returned early, so a muted headset never showed as muted. An unbound sink (.audio null) reused the muted speaker glyph, so a Bluetooth output connected after shell start looked silenced.
PwObjectTracker only saw candidateSinks from nodes.values. Keep the current default sink/source in the set so .audio populates without a shell restart.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates audio glyph selection and PipeWire tracking for dynamically connected devices.
Changes:
- Prioritizes mute state over headphone glyphs.
- Tracks late-appearing default audio devices.
- Adds glyph and tracker regression checks.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
shell/plugins/panels/audio/Model.js |
Centralizes output glyph selection. |
shell/plugins/panels/audio/Panel.qml |
Tracks default sink/source and delegates glyph selection. |
test/shell.d/audio-test.sh |
Adds regression checks for audio glyph behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+32
to
+33
| assertEqual(audio.outputBarIcon(headphones, 0.4, true), '', 'audio shows muted glyph for muted headphones') | ||
| assertEqual(audio.outputBarIcon(headphones, 0.4, false), '', 'audio shows headphones glyph when unmuted') |
|
|
||
| // Default sink/source can appear after shell start (Bluetooth). Keep them | ||
| // in the tracker set even if they are briefly missing from nodes.values, | ||
| // otherwise .audio stays null and the bar paints the muted glyph. |
| nodeProps: nodeProps, | ||
| nodeLabel: nodeLabel, | ||
| isHeadphones: isHeadphones, | ||
| outputBarIcon: outputBarIcon, |
Comment on lines
+107
to
+110
| if (!node) return "" | ||
| if (muted) return "" | ||
| if (!node.audio) return sinkGlyph(node) | ||
| if (isHeadphones(node)) return "" |
Contributor
Author
|
@dhh @ryanrhughes ready for review |
1 task
Contributor
Author
|
folding into #12115 with the other bar panel fixes |
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.
Summary
.audionull, common for Bluetooth connected after shell start) uses the device glyph instead of the muted speaker.PwObjectTrackerso mid-session devices bind without a shell restart.Fixes #8744.
Test plan
bash test/shell.d/audio-test.sh