Skip to content

fix(sensors): update system microphone level chart#257

Draft
TobiasRoeddiger wants to merge 1 commit into
ui-redesign-rebasedfrom
fix/system-microphone-level-chart
Draft

fix(sensors): update system microphone level chart#257
TobiasRoeddiger wants to merge 1 commit into
ui-redesign-rebasedfrom
fix/system-microphone-level-chart

Conversation

@TobiasRoeddiger
Copy link
Copy Markdown
Member

Summary

  • replace the Android system microphone warning/waveform card with a chart that matches the live sensor chart styling
  • show the system microphone chart at the end of the Live Data charts with normalized -100..100 level bars and % as the visual unit
  • show current microphone source pills like Inner (L) / Outer (R) and refresh them when microphone configuration changes
  • keep the top-right device/side metadata aligned with the other sensor cards

Root Cause

The system microphone graph was using a bespoke waveform painter and a warning/streaming state card. Its displayed range was derived from an intermediate normalization of record package dBFS amplitude values, then mirrored visually. The UI also cached microphone source labels without a direct invalidation path when Inner/Outer selection changed.

Validation

  • dart format --set-exit-if-changed on the touched files
  • flutter analyze passed
  • flutter test test/widget_test.dart passed
  • flutter test currently fails in an unrelated existing test: test/widgets/connector_activity_indicator_test.dart (describes missing Wi-Fi in tooltip semantics, expected one matching semantics candidate but found none)

Notes

Base branch is ui-redesign-rebased per request.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

Visit the preview URL for this PR (updated for commit dc1ca85):

https://open-earable-web--pr257-fix-system-microphon-mc7qq106.web.app

(expires Fri, 19 Jun 2026 12:09:58 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c7397c11177c71d8d81172cea9365829823fb41c

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

PR Build Artifacts

Full workflow run: https://github.com/OpenEarable/app/actions/runs/26286855121

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Sensors “Live Data” UI by replacing the legacy Android system-microphone waveform/warning card with a chart that matches the app’s existing live sensor chart styling, and adds a mechanism to refresh the displayed microphone source labels when microphone configuration changes.

Changes:

  • Replace the bespoke waveform painter card with an fl_chart-based system microphone level chart (normalized, mirrored bars, % axis unit).
  • Add microphone-source “pills” (e.g., Inner/Outer with L/R) and refresh logic via a new microphoneConfigurationRevision signal.
  • Wire microphone-configuration change notifications from configuration apply + microphone selection UI into the recorder providers (IO/Web).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
open_wearable/lib/widgets/sensors/values/sensor_values_page.dart Replaces waveform painter card with an fl_chart chart, adds header metadata + microphone source pills and refresh caching.
open_wearable/lib/widgets/sensors/configuration/sensor_configuration_view.dart Notifies the recorder provider when microphone-related configurations are applied.
open_wearable/lib/widgets/devices/device_detail/microphone_selection_widget.dart Triggers microphone configuration change notification after applying a mic selection.
open_wearable/lib/view_models/sensor_recorder_provider_web.dart Adds microphone configuration revision tracking + change notifier (web stub).
open_wearable/lib/view_models/sensor_recorder_provider_io.dart Adds microphone configuration revision tracking + change notifier and aligns waveform normalization to 0..1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +99 to +103
final audioMicrophoneSourcesFuture =
_audioMicrophoneSourcesFutureFor(
groups,
microphoneConfigurationRevision:
recorderProvider.microphoneConfigurationRevision,
Comment on lines +1152 to +1155
selected: true,
onSelected: (_) {},
showCheckmark: false,
visualDensity: const VisualDensity(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in df8198c. Removed the IgnorePointer wrapper and replaced it with a truly disabled FilterChip by setting onSelected: null. Visual styling is preserved by using disabledColor: axisColor.withValues(alpha: 0.18) (same value as the former selectedColor) and setting selected: false since the selected state is no longer meaningful for a disabled chip.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 22, 2026

CLA assistant check
All committers have signed the CLA.

Copilot AI requested a review from DennisMoschina May 22, 2026 12:00
@DennisMoschina DennisMoschina force-pushed the fix/system-microphone-level-chart branch from df8198c to dc1ca85 Compare May 22, 2026 12:07
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.

4 participants