Add read-only package broker policy inspector - #5292
Draft
Benoît Cortier (CBenoit) wants to merge 2 commits into
Draft
Add read-only package broker policy inspector#5292Benoît Cortier (CBenoit) wants to merge 2 commits into
Benoît Cortier (CBenoit) wants to merge 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Aug 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a Windows-only, read-only Devolutions Agent package-policy inspector integrated into Administrator settings.
Changes:
- Adds broker policy retrieval, validation, status mapping, and centralized client creation.
- Adds searchable, localized UI for policy metadata, rules, constraints, and canonical JSON.
- Adds coverage for broker responses, cancellation, stale refreshes, and search visibility.
The unpublished 0.4.0 dependencies remain a merge blocker.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/UniGetUI.Tests/UniGetUI.Tests.csproj |
Adds inspector test dependencies. |
src/UniGetUI.Tests/SettingsSearchIndexTests.cs |
Tests platform-aware search. |
src/UniGetUI.Tests/AgentPolicyInspectorViewModelTests.cs |
Tests presentation and refresh behavior. |
src/UniGetUI.PackageEngine.Tests/BrokerPolicyInspectorTests.cs |
Tests policy transport and validation. |
src/UniGetUI.PackageEngine.Operations/PackageOperations.cs |
Uses centralized broker creation. |
src/UniGetUI.PackageEngine.AgentBroker/UniGetUI.PackageEngine.AgentBroker.csproj |
Updates policy dependencies. |
src/UniGetUI.PackageEngine.AgentBroker/BrokerPolicyInspector.cs |
Implements policy inspection. |
src/UniGetUI.PackageEngine.AgentBroker/BrokerClientFactory.cs |
Centralizes broker configuration. |
src/UniGetUI.Avalonia/Views/Pages/SettingsPages/SettingsBasePage.axaml.cs |
Registers the inspector page. |
src/UniGetUI.Avalonia/Views/Pages/SettingsPages/AgentPolicyInspector.axaml.cs |
Connects view model and clipboard. |
src/UniGetUI.Avalonia/Views/Pages/SettingsPages/AgentPolicyInspector.axaml |
Defines the inspector UI. |
src/UniGetUI.Avalonia/Views/Pages/SettingsPages/Administrator.axaml.cs |
Forwards inspector navigation. |
src/UniGetUI.Avalonia/Views/Pages/SettingsPages/Administrator.axaml |
Adds the Windows-only entry. |
src/UniGetUI.Avalonia/ViewModels/Pages/SettingsPages/AgentPolicyInspectorViewModel.cs |
Formats policy data and manages refreshes. |
src/UniGetUI.Avalonia/ViewModels/Pages/SettingsPages/AdministratorViewModel.cs |
Adds navigation command. |
src/UniGetUI.Avalonia/UniGetUI.Avalonia.csproj |
References the broker project. |
src/UniGetUI.Avalonia/InternalsVisibleTo.cs |
Exposes internals to tests. |
src/UniGetUI.Avalonia/Infrastructure/SettingsSearchIndex.cs |
Indexes the Windows-only inspector. |
src/Languages/lang_en.json |
Adds inspector localization strings. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+40
to
+51
| <Grid ColumnDefinitions="*,Auto" Margin="40,0,40,8"> | ||
| <TextBlock Text="{t:Translate Active package broker policy}" | ||
| FontSize="20" | ||
| FontWeight="SemiBold" | ||
| VerticalAlignment="Center" | ||
| automation:AutomationProperties.HeadingLevel="1"/> | ||
| <Button Grid.Column="1" | ||
| Command="{Binding RefreshCommand}" | ||
| IsEnabled="{Binding !IsLoading}" | ||
| Content="{t:Translate Refresh}" | ||
| automation:AutomationProperties.Name="{t:Translate Refresh active policy}"/> | ||
| </Grid> |
Reject malformed required policy data using schema-aligned validation and cover missing, defaulted, nested, and wire-invalid responses. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Summary
BrokerClient.GetPolicyand sharedPolicyDocument/PolicyJsonwithout raw transport, duplicate DTOs, filesystem access, or mutationUseAgentBroker, cancellable, stale-safe, localized, searchable, accessible, and NativeAOT-safeInvalidResponseCoordinated Phase 1 work
Exact local integration evidence
Validated against now-libraries PR #93 head
61a1af21d6771a1c85d48dcdb033f8e912651d78using matching local0.4.0artifacts supplied through command-lineRestoreAdditionalProjectSourcesand an isolated package cache. No local feed path, NuGet configuration, or cache is committed.Devolutions.Now.Policy.Model.0.4.0.nupkg59f1d1f2357d4bda83b9a505174fbc14f1ca927ba32cedfcecf2b75b462e734Devolutions.Now.Policy.Api.0.4.0.nupkg5204f8dab94bdfbfe4c8e6ed226052f78815a4eb60f94ea38da3978714424d5fDevolutions.Now.Policy.Client.0.4.0.nupkg95dc0c3b5503897aec1451839c33e1c0c5528b901ddcc6b73e82476329255be9Dependency/publication gate
This PR intentionally remains draft.
Devolutions.Now.Policy.Model,.Api, and.Client0.4.0are not yet published to the configured public NuGet feed. Final readiness is blocked on publishing the exact packages produced from now-libraries#93 head61a1af21d6771a1c85d48dcdb033f8e912651d78, updating the committed package references if the published identity changes, and rerunning restore/tests/NativeAOT from the public feed.The non-Windows runtime matrix remains a runner gap; defensive platform guards and Windows-only settings-search filtering are covered by unit tests. Do not mark ready or merge until the coordinated dependency gate is cleared.