Skip to content

Add restart device and software update commands to Devices panel#829

Merged
chrisdp merged 21 commits into
masterfrom
copilot/add-restart-device-software-update-callbacks
Jun 25, 2026
Merged

Add restart device and software update commands to Devices panel#829
chrisdp merged 21 commits into
masterfrom
copilot/add-restart-device-software-update-callbacks

Conversation

Copilot AI commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Adds Restart Device and Check for Software Updates actions to the Devices panel.

Both actions are available as items under each device and from the command palette. They are only offered for devices running Roku OS 15.0.4 or later, which is required for the reboot and update endpoints.

Each action confirms before contacting the device. The target is the device whose item was clicked, or, when run from the command palette, the device chosen from the picker. The developer password is resolved and validated against the device the same way a debug launch is: stored, configured, and default passwords are tried in order, and the user is prompted (and re-prompted on rejection) when none are accepted.

Example

Expanding a device in the Devices panel (Roku OS 15.0.4+):

📱 Roku Device (192.168.1.100)
  ├── 🔗 Open device web portal
  ├── 🔁 Restart Device
  ├── 🔄 Check for Software Updates
  ├── 📋 View Registry
  ├── 🔑 Set Device Password
  ├── ⭐ Set as Active Device
  └── 📷 Capture Screenshot

Copilot AI changed the title [WIP] Add restart device and software update callbacks to device view panel Add device restart and software update controls to Device View Panel Jun 23, 2026
Copilot AI requested a review from chrisdp June 23, 2026 12:09
Copilot AI changed the title Add device restart and software update controls to Device View Panel Move device restart and software update actions to DevicesViewProvider Jun 23, 2026
Copilot AI changed the title Move device restart and software update actions to DevicesViewProvider Remove accidental RTA/RDB view changes from device restart feature Jun 23, 2026
Copilot AI changed the title Remove accidental RTA/RDB view changes from device restart feature Add restart device and software update commands to Devices panel Jun 23, 2026

@chrisdp chrisdp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot see review feedback.

Comment thread src/commands/VscodeCommand.ts Outdated
Comment thread src/viewProviders/DevicesViewProvider.ts Outdated
Comment thread src/viewProviders/DevicesViewProvider.ts Outdated
Copilot AI added 2 commits June 23, 2026 13:57
- Remove leftover rokuDeviceView command entries from VscodeCommand.ts
- Move restartDevice and checkForUpdates from DevicesViewProvider to BrightScriptCommands
- Commands now accept optional host parameter instead of DeviceTreeItem
- Commands look up password via credentialStore using device serial number
- Commands display device picker if no host provided
- Update tree item arguments to pass device key for lookup
- Remove corresponding tests from DevicesViewProvider.spec.ts
Add explicit device existence checks in command handlers before calling
restartDevice and checkForUpdates to provide clear error messages when
device is not found, instead of falling back to device picker.
Copilot AI requested a review from chrisdp June 23, 2026 14:02
chrisdp added 2 commits June 24, 2026 11:11
Restart Device and Check for Software Updates now resolve the developer
password from all known sources and validate each against the device,
prompting and re-prompting on rejection, the same way a debug launch does.
They previously read only the credential store, leaving the password
undefined and causing auth failures.

- Always prompt for the target device via the picker when invoked without one
- Remove the redundant Devices view context-menu entries; the commands remain
  as tree items and in the command palette
- Add unit tests
Comment thread src/BrightScriptCommands.ts Outdated
Comment thread src/BrightScriptCommands.ts Outdated
Comment thread src/BrightScriptCommands.ts
chrisdp added 2 commits June 25, 2026 10:19
Wrap the reboot and update requests in an indeterminate progress
notification while they're in flight, and report success with a timed
notification that auto-dismisses.
Move candidate collection, the validation loop, the prompt, and credential-store
persistence into UserInputManager.resolveDevicePassword. The debug configuration
provider and the restart/update commands both delegate to it, passing their own
extra candidate passwords. The provider keeps its legacy-password migration and
sets the remotePassword fallback itself.
Use a concise title + detail modal for the restart and update confirmations,
and drop the success notification now that the in-progress indicator covers
that feedback.
@chrisdp
chrisdp marked this pull request as ready for review June 25, 2026 15:50
@chrisdp
chrisdp enabled auto-merge (squash) June 25, 2026 15:51
@chrisdp
chrisdp merged commit d7c8e3d into master Jun 25, 2026
8 checks passed
@chrisdp
chrisdp deleted the copilot/add-restart-device-software-update-callbacks branch June 25, 2026 15:53
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.

Add "Restart Device" & "Software Update" callbacks to Device View Panel

3 participants