Skip to content

RDKEAPPRT-649 [RefUI] Focus is sometimes missing after DUT reboot - #241

Open
suryag23 wants to merge 2 commits into
developfrom
649
Open

RDKEAPPRT-649 [RefUI] Focus is sometimes missing after DUT reboot#241
suryag23 wants to merge 2 commits into
developfrom
649

Conversation

@suryag23

Copy link
Copy Markdown
Contributor

No description provided.

@suryag23
suryag23 requested review from yashaswini-rk and a lite review from Copilot August 10, 2026 10: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

This PR aims to prevent the RefUI home screen from ending up without a focused/Focusable row after returning to MainView (e.g., after uninstall flows and on state restoration), and bumps the application version to 6.0.33.

Changes:

  • Adds focus/state recovery logic in MainView to redirect focus when the currently selected row has no items and to refocus after list updates.
  • Clamps the My Apps (AppList) index after app list changes (e.g., uninstall) and re-applies focus where appropriate.
  • Updates RefUI version strings from 6.0.32 to 6.0.33.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
bolt/package-configs/com.rdkcentral.refui.json Bumps package version/versionName to 6.0.33.
accelerator-home-ui/src/views/MainView.js Adds focus recovery, index clamping, and refocus logic around AppList/DacApps.
accelerator-home-ui/settings.json Bumps UI settings version to 6.0.33.
Suppressed comments (2)

accelerator-home-ui/src/views/MainView.js:599

  • The new focus corrections in set appItems() depend on this.state === 'AppList' / 'DacApps'. If the current state has a substate suffix (e.g. AppList.0), the refocus/redirect logic won’t execute and focus can still be lost after app list changes.
    // Clamp AppList index if it's now beyond bounds (e.g. after uninstall)
    if (this.tag('AppList').length && this.tag('AppList').index >= this.tag('AppList').length) {
      this.tag('AppList').setIndex(this.tag('AppList').length - 1)
    }

    // Re-apply focus if the AppList row is currently focused
    if (this.state === 'AppList' && this.tag('AppList').length) {
      this._refocus()
    }

    // If My Apps became empty while focused, move focus to DacApps
    if (this.myAppsEmpty && this.state === 'AppList') {
      this._setState('DacApps')
    }

    // If My Apps just became available but focus is on DacApps (wrong initial focus), correct it
    if (!this.myAppsEmpty && this.state === 'DacApps' && !this.gracenote && !this.inputSelect) {
      this._setState('AppList')
    }

accelerator-home-ui/src/views/MainView.js:707

  • Similar to the My Apps handling: set dacApps() checks this.state === 'DacApps', which won’t match if a substate suffix is ever introduced (or if this.state is persisted/restored with one). Normalizing state before comparison makes the refocus logic resilient.
    // Re-apply focus if the DacApps row is currently focused
    if (this.state === 'DacApps' && this.tag('DacApps').length) {
      this._refocus()
    }

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread accelerator-home-ui/src/views/MainView.js
Copilot AI review requested due to automatic review settings August 11, 2026 09:20

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 3 out of 3 changed files in this pull request and generated no new comments.

Suppressed comments (1)

accelerator-home-ui/src/views/MainView.js:601

  • The appItems setter always switches focus from DacApps to AppList when My Apps is non-empty and there’s no Gracenote/Inputs. Since $refreshMyAppsRow() is triggered by package changes (install/uninstall) and connectivity events, this can steal focus from a user who intentionally navigated to DacApps, causing an unexpected focus jump on any subsequent refresh.
    // If My Apps just became available but focus is on DacApps (wrong initial focus), correct it
    if (!this.myAppsEmpty && baseState === 'DacApps' && !this.gracenote && !this.inputSelect) {
      this._setState('AppList')
    }

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.

2 participants