RDKEAPPRT-866: fix NaN display on volume overlay#211
Open
arun-madhavan-013 wants to merge 10 commits into
Open
RDKEAPPRT-866: fix NaN display on volume overlay#211arun-madhavan-013 wants to merge 10 commits into
arun-madhavan-013 wants to merge 10 commits into
Conversation
…splaySettings add safe fallback in volume overlay read path when getVolumeLevel is invalid/failed guard overlay setVolume to skip invalid numeric values harden Speaker AdjustVolume/SetVolume flow to parse and clamp values before write add final validation and clamping in AppApi setVolumeLevel (0..100) prevents NaN overlay text and avoids crash/restart risk on volume-up after mute/down sequence
There was a problem hiding this comment.
Pull request overview
This PR addresses cases where invalid/undefined volume values propagate through the volume overlay and voice volume handlers, leading to NaN being displayed or used in calculations.
Changes:
- Added parsing/validation fallback behavior in the TV overlay
Volumecomponent to avoid resolvingNaNvolume levels. - Hardened Alexa
AdjustVolume/SetVolumehandling inApp.jsby parsing inputs, rejecting invalid values, and clamping target volume to[0, 100]. - Added parsing + clamping inside
AppApi.setVolumeLevel()to prevent invalid volume levels from reaching the Thunder call. - Bumped
settings.jsonversion to6.0.20.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| accelerator-home-ui/src/tvOverlay/components/Volume.js | Parse volume values and fall back to 0 when invalid to prevent NaN display. |
| accelerator-home-ui/src/App.js | Validate/parse volume inputs from Alexa speaker directives and clamp computed target volume. |
| accelerator-home-ui/src/api/AppApi.js | Clamp/validate setVolumeLevel() input before issuing the Thunder call; minor whitespace changes. |
| accelerator-home-ui/settings.json | Version bump. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.