Skip to content

Add volume dashboard widget and extract shared volume helpers#654

Merged
multiplex55 merged 2 commits intomasterfrom
codex/extract-helper-functions-and-build-volume-widget
Jan 8, 2026
Merged

Add volume dashboard widget and extract shared volume helpers#654
multiplex55 merged 2 commits intomasterfrom
codex/extract-helper-functions-and-build-volume-widget

Conversation

@multiplex55
Copy link
Copy Markdown
Owner

Motivation

  • Share system/process volume enumeration and helpers so both the volume dialog and dashboard widget can reuse the same code.
  • Provide a dashboard widget to control system volume and per-process audio sessions with mute toggles and periodic/manual refresh.
  • Cache volume data and make refresh behavior configurable to avoid frequent expensive enumeration.

Description

  • Extracted ProcessVolume, get_system_volume and get_process_volumes into a reusable module at src/gui/volume_data.rs and exported it via pub(crate) mod volume_data in src/gui/mod.rs.
  • Updated src/gui/volume_dialog.rs to use the new volume_data helpers instead of duplicating enumeration/mute logic.
  • Added a new dashboard widget src/dashboard/widgets/volume.rs that exposes a VolumeConfig, caches a VolumeSnapshot, shows a system volume slider + mute button, lists audio sessions with sliders and mute buttons, and emits existing launcher actions like volume:set:<n>, volume:mute_active, volume:pid:<pid>:<level>, and volume:pid_toggle_mute:<pid>.
  • Registered the widget in the default registry in WidgetRegistry::with_defaults (src/dashboard/widgets/mod.rs).

Testing

  • No automated test suite was executed as part of this change.
  • A unit test slider_change_unmutes was added to src/gui/volume_data.rs to verify ProcessVolume::slider_changed behavior but it was not run here.
  • Project build and integration testing were not performed in this rollout.
  • Manual verification steps (UI run) were not executed in the CI environment.

Codex Task

@multiplex55 multiplex55 merged commit 6a69ceb into master Jan 8, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/extract-helper-functions-and-build-volume-widget branch January 9, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant