Skip to content

RDKEAPPRT-866: fix NaN display on volume overlay#211

Open
arun-madhavan-013 wants to merge 10 commits into
developfrom
feature/RDKEAPPRT-866-volume-fix
Open

RDKEAPPRT-866: fix NaN display on volume overlay#211
arun-madhavan-013 wants to merge 10 commits into
developfrom
feature/RDKEAPPRT-866-volume-fix

Conversation

@arun-madhavan-013

Copy link
Copy Markdown
Contributor

No description provided.

…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

Copilot AI left a comment

Copy link
Copy Markdown

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 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 Volume component to avoid resolving NaN volume levels.
  • Hardened Alexa AdjustVolume / SetVolume handling in App.js by 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.json version to 6.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.

Comment thread accelerator-home-ui/src/api/AppApi.js
Copilot AI review requested due to automatic review settings June 26, 2026 07:09
@suryag23 suryag23 requested a review from yashaswini-rk June 26, 2026 07:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread accelerator-home-ui/src/tvOverlay/components/Volume.js Outdated
Comment thread accelerator-home-ui/src/App.js Outdated
Copilot AI review requested due to automatic review settings June 26, 2026 15:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread accelerator-home-ui/src/tvOverlay/components/Volume.js
Comment thread accelerator-home-ui/src/tvOverlay/components/Volume.js
Comment thread accelerator-home-ui/src/App.js
Comment thread accelerator-home-ui/src/App.js Outdated
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.

3 participants