Live monitoring of tray items in the open popup#2
Open
heath-toby wants to merge 1 commit into
Open
Conversation
Adds end-to-end live updates for every tray module item while the WayTray
popup is open. Previously the popup only reflected state captured when the
window was first opened — changes from SNI apps (Bluetooth state, NM
network state, etc.) and from internal modules (volume sliders, brightness)
were invisible until the popup was closed and reopened.
Three concerns are addressed:
* Worker-thread signal consumer (client). The previous approach awaited
zbus signal streams directly under `glib::spawn_future_local`, which
silently failed to deliver `ItemsChanged` events on this stack (the
cross-runtime waker didn't reliably re-enter GLib's main loop). The new
`daemon_proxy::spawn_change_listener` owns the zbus subscription on a
dedicated tokio runtime in its own thread and forwards each notification
through an `async_channel`. The main GTK thread just `recv().await`s on
that channel — no executor coupling, no foreign-waker plumbing.
* AT-SPI Description gating (client). `update_item_if_changed` used to
gate both `accessible::Property::Label` and
`accessible::Property::Description` on `label_changed`. For SNI items
like Blueman whose title is the constant string "blueman" while their
tooltip ("Bluetooth Active" → "Bluetooth Disabled") tracks the state,
this meant Orca never heard new state because the gate never fired.
Description is now gated independently on `tooltip_changed`.
* IconAccessibleDesc fallback (daemon). nm-applet (and other Ayatana SNI
apps) publish their human-readable state in `IconAccessibleDesc` and
emit no `NewToolTip`. The daemon now reads `IconAccessibleDesc` as a
fallback when `ToolTip` is missing or unhelpful, and re-fetches the
tooltip on every `NewIcon` signal so apps that update the description
alongside the icon stay current.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
Adds end-to-end live updates for every tray module item while the WayTray popup is open. Previously the popup only reflected state captured when the window was first opened — changes from SNI apps (Bluetooth state, NM network state, etc.) and from internal modules (volume sliders, brightness) were invisible until the popup was closed and reopened.
Three concerns addressed
Worker-thread signal consumer (client). The previous approach awaited zbus signal streams directly under
glib::spawn_future_local, which silently failed to deliverItemsChangedevents on this stack (the cross-runtime waker didn't reliably re-enter GLib's main loop). The newdaemon_proxy::spawn_change_listenerowns the zbus subscription on a dedicated tokio runtime in its own thread and forwards each notification through anasync_channel. The main GTK thread justrecv().awaits on that channel — no executor coupling, no foreign-waker plumbing.AT-SPI
Descriptiongating (client).update_item_if_changedused to gate bothaccessible::Property::Labelandaccessible::Property::Descriptiononlabel_changed. For SNI items like Blueman whose title is the constant string"blueman"while their tooltip ("Bluetooth Active"→"Bluetooth Disabled") tracks the state, this meant Orca never heard new state because the gate never fired. Description is now gated independently ontooltip_changed.IconAccessibleDescfallback (daemon). nm-applet (and other Ayatana SNI apps) publish their human-readable state inIconAccessibleDescand emit noNewToolTip. The daemon now readsIconAccessibleDescas a fallback whenToolTipis missing or unhelpful, and re-fetches the tooltip on everyNewIconsignal so apps that update the description alongside the icon stay current.Test plan
🤖 Generated with Claude Code