fix(sensors): update system microphone level chart#257
Conversation
|
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 |
PR Build Artifacts
Full workflow run: https://github.com/OpenEarable/app/actions/runs/26286855121 |
There was a problem hiding this comment.
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
microphoneConfigurationRevisionsignal. - 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.
| final audioMicrophoneSourcesFuture = | ||
| _audioMicrophoneSourcesFutureFor( | ||
| groups, | ||
| microphoneConfigurationRevision: | ||
| recorderProvider.microphoneConfigurationRevision, |
| selected: true, | ||
| onSelected: (_) {}, | ||
| showCheckmark: false, | ||
| visualDensity: const VisualDensity( |
There was a problem hiding this comment.
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.
df8198c to
dc1ca85
Compare
Summary
%as the visual unitInner (L)/Outer (R)and refresh them when microphone configuration changesRoot 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
recordpackage 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-changedon the touched filesflutter analyzepassedflutter test test/widget_test.dartpassedflutter testcurrently 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-rebasedper request.