Skip to content

feat(devices): add enterprise Download RPC page - #3572

Open
rsdmike wants to merge 3 commits into
mainfrom
feat/download-rpc
Open

rsdmike wants to merge 3 commits into
mainfrom
feat/download-rpc

Conversation

@rsdmike

@rsdmike rsdmike commented Sep 18, 2026

Copy link
Copy Markdown
Member

Add a Download RPC page that builds an rpc-go package for activate or deactivate, with version, OS and architecture selection, and profile and domain pickers (domain required for ACM profiles). The operator sets the server URL rpc-go is pointed at, pre-filled from the Console API base, with a warning when it is a loopback address. Auth defaults to none, with an optional token whose lifetime is picked from a fixed list. The nav item is shown only in the enterprise (Console) build.

Includes the route, i18n strings, service and component specs, and the design spec and implementation plan under docs/superpowers.

Refs: #1144

PR Checklist

  • Unit Tests have been added for new changes
  • All commented code has been removed

What are you changing?

Anything the reviewer should know when reviewing this PR?

image

If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )

Depends on device-management-toolkit/console#1279 — merge that first.

Copilot AI lite review requested due to automatic review settings September 18, 2026 18:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

There are a few small but user-facing correctness issues (notably loopback URL warning missing IPv6 ::1, plus minor documentation/translation fixes) that should be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds an enterprise-only “Download RPC” page to generate a ready-to-run rpc-go zip package (activate/deactivate), including UI flow, API integration, and localization, and adjusts the authorization interceptor to avoid sending if-match headers on non-PATCH requests that happen to contain a version field.

Changes:

  • Introduces a new standalone DownloadRpcComponent + service/constants/specs and wires it into routing and enterprise navbar visibility.
  • Adds RPC packaging request/response model types and i18n strings across supported locales.
  • Fixes authorizationInterceptor to only attach if-match when the request is a PATCH with a non-empty version.
File summaries
File Description
src/models/models.ts Adds RPC-related request/response model types for the new page/service.
src/assets/i18n/en.json Adds English strings for the Download RPC page.
src/assets/i18n/ar.json Adds Arabic strings for the Download RPC page.
src/assets/i18n/de.json Adds German strings for the Download RPC page.
src/assets/i18n/es.json Adds Spanish strings for the Download RPC page.
src/assets/i18n/fi.json Adds Finnish strings for the Download RPC page.
src/assets/i18n/fr.json Adds French strings for the Download RPC page.
src/assets/i18n/he.json Adds Hebrew strings for the Download RPC page.
src/assets/i18n/it.json Adds Italian strings for the Download RPC page.
src/assets/i18n/ja.json Adds Japanese strings for the Download RPC page.
src/assets/i18n/nl.json Adds Dutch strings for the Download RPC page.
src/assets/i18n/ru.json Adds Russian strings for the Download RPC page.
src/assets/i18n/sv.json Adds Swedish strings for the Download RPC page.
src/app/routes.ts Registers the new /download-rpc route behind AuthGuard.
src/app/download-rpc/download-rpc.service.ts Implements API calls for rpc-go versions and package build/download.
src/app/download-rpc/download-rpc.service.spec.ts Adds unit tests for the new service endpoints and error routing.
src/app/download-rpc/download-rpc.constants.ts Defines form option lists (commands/auth/token TTL/OS) and fixed arch selection.
src/app/download-rpc/download-rpc.component.ts Implements the reactive-form UI logic, validation, and blob download handling.
src/app/download-rpc/download-rpc.component.html Adds the Angular Material template for selecting options and downloading the package.
src/app/download-rpc/download-rpc.component.scss Adds basic layout/styles for the new page.
src/app/download-rpc/download-rpc.component.spec.ts Adds unit tests covering form behavior, validation, and request building.
src/app/core/navbar/navbar.component.html Adds an enterprise-only nav item linking to the Download RPC page.
src/app/authorize.interceptor.ts Restricts if-match header injection to PATCH requests only.
src/app/authorize.interceptor.spec.ts Updates and extends tests to cover the new if-match behavior.
Review details
  • Files reviewed: 24/24 changed files
  • Comments generated: 3
  • Review effort level: Lite

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

Comment thread src/app/download-rpc/download-rpc.component.ts
Comment thread src/assets/i18n/en.json Outdated
Comment thread src/models/models.ts Outdated
@rsdmike
rsdmike force-pushed the feat/download-rpc branch 2 times, most recently from a03a53c to 268d12b Compare September 18, 2026 18:37
Add a Preview Feature page that builds an rpc-go package for activate
or deactivate: a zip with the x64 rpc-go binary for Windows, Linux or
both, plus a config.yaml pointed at Console. The version defaults to the
newest v3 release (the 5 most recent are offered) and the profile to the
first one; the domain is required for ACM profiles. The operator sets
the server URL rpc-go uses, pre-filled from the Console API base, with a
warning when it is a loopback address. Auth defaults to none, with an
optional token whose lifetime is picked from a fixed list. Each field
has a hint, and the page explains what the package contains and how to
run it. The nav item is shown only in the enterprise (Console) build.

The authorize interceptor now sends if-match only on PATCH, so a request
body whose "version" is not an optimistic-lock version, like the rpc-go
release here, no longer gets one.

Includes the route, i18n strings for all languages, and service and
component specs.

Refs: device-management-toolkit/console#1144
Covers the preview chip, default version and profile, x64-only OS
options, the ACM domain requirement, the loopback server URL warning,
and a token-authenticated package request for each offered OS.

Expectations come from the live responses, so the spec runs both
isolated and against a real Console; it skips on cloud builds.

Refs: device-management-toolkit/console#1144
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