Skip to content

Add UI toggle for Devolutions Agent broker in Administrator settings - #5204

Merged
Marc-André Moreau (mamoreau-devolutions) merged 3 commits into
mainfrom
feat/package-broker-ui
Jul 28, 2026
Merged

Add UI toggle for Devolutions Agent broker in Administrator settings#5204
Marc-André Moreau (mamoreau-devolutions) merged 3 commits into
mainfrom
feat/package-broker-ui

Conversation

@vnikonov-devolutions

@vnikonov-devolutions Vladyslav Nikonov (vnikonov-devolutions) commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Exposes the existing UseAgentBroker setting (previously only togglable by manually creating the settings flag file) in the UI.

Changes

  • Administrator settings page: added a CheckboxCard for UseAgentBroker in the Windows-only "Change how operations request administrator rights" section, since the broker is an alternative to UAC elevation. The setting is read per-operation, so no restart is required.
  • Localization: added the new label and warning strings to lang_en.json.
  • CheckboxCard wrapping fix: warning text previously overflowed/overlapped the toggle when the window shrank, because SettingsCard measures the header with infinite width. Ported the SecureCheckboxCard behavior: constrain MaxWidth on layout and split warnings at the first sentence boundary (FormatTwoLine). This also fixes the existing "Prohibit any kind of Elevation via UniGetUI Elevator or GSudo" card.

Testing

  • dotnet build UniGetUI.Avalonia.csproj /p:Platform=x64 — 0 errors
  • Verified visually: toggle reflects and persists the setting, warning text wraps correctly at narrow window widths
image

Issue: DGW-440

- Add UseAgentBroker checkbox card to the Administrator settings page
  (Windows-only elevation section), wired to the existing setting key
- Add the new translatable strings to lang_en.json
- Fix warning-text wrapping in CheckboxCard: constrain MaxWidth on layout
  and split warnings at the first sentence boundary, matching the
  SecureCheckboxCard behavior

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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.

Pull request overview

Adds a Windows administrator-setting toggle for routing supported package operations through Devolutions Agent.

Changes:

  • Adds the UseAgentBroker settings card.
  • Improves CheckboxCard warning wrapping.
  • Localizes the new label and warning across all supported languages.

Reviewed changes

Copilot reviewed 61 out of 61 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/UniGetUI.Avalonia/Views/Pages/SettingsPages/Administrator.axaml Adds the broker toggle.
src/UniGetUI.Avalonia/Views/Controls/Settings/CheckboxCard.cs Adds warning wrapping constraints.
src/Languages/lang_zh_TW.json Adds Traditional Chinese strings.
src/Languages/lang_zh_CN.json Adds Simplified Chinese strings.
src/Languages/lang_vi.json Adds Vietnamese strings.
src/Languages/lang_ur.json Adds Urdu strings.
src/Languages/lang_uk.json Adds Ukrainian strings.
src/Languages/lang_tr.json Adds Turkish strings.
src/Languages/lang_tl.json Adds Tagalog strings.
src/Languages/lang_th.json Adds Thai strings.
src/Languages/lang_ta.json Adds Tamil strings.
src/Languages/lang_sv.json Adds Swedish strings.
src/Languages/lang_sr.json Adds Serbian strings.
src/Languages/lang_sq.json Adds Albanian strings.
src/Languages/lang_sl.json Adds Slovenian strings.
src/Languages/lang_sk.json Adds Slovak strings.
src/Languages/lang_si.json Adds Sinhala strings.
src/Languages/lang_sa.json Adds Sanskrit strings.
src/Languages/lang_ru.json Adds Russian strings.
src/Languages/lang_ro.json Adds Romanian strings.
src/Languages/lang_pt_PT.json Adds European Portuguese strings.
src/Languages/lang_pt_BR.json Adds Brazilian Portuguese strings.
src/Languages/lang_pl.json Adds Polish strings.
src/Languages/lang_nn.json Adds Norwegian Nynorsk strings.
src/Languages/lang_nl.json Adds Dutch strings.
src/Languages/lang_nb.json Adds Norwegian Bokmål strings.
src/Languages/lang_mr.json Adds Marathi strings.
src/Languages/lang_mk.json Adds Macedonian strings.
src/Languages/lang_lt.json Adds Lithuanian strings.
src/Languages/lang_ku.json Adds Kurdish strings.
src/Languages/lang_ko.json Adds Korean strings.
src/Languages/lang_kn.json Adds Kannada strings.
src/Languages/lang_ka.json Adds Georgian strings.
src/Languages/lang_ja.json Adds Japanese strings.
src/Languages/lang_it.json Adds Italian strings.
src/Languages/lang_id.json Adds Indonesian strings.
src/Languages/lang_hu.json Adds Hungarian strings.
src/Languages/lang_hr.json Adds Croatian strings.
src/Languages/lang_hi.json Adds Hindi strings.
src/Languages/lang_he.json Adds Hebrew strings.
src/Languages/lang_gu.json Adds Gujarati strings.
src/Languages/lang_gl.json Adds Galician strings.
src/Languages/lang_fr.json Adds French strings.
src/Languages/lang_fil.json Adds Filipino strings.
src/Languages/lang_fi.json Adds Finnish strings.
src/Languages/lang_fa.json Adds Persian strings.
src/Languages/lang_et.json Adds Estonian strings.
src/Languages/lang_es.json Adds Spanish strings.
src/Languages/lang_es-MX.json Adds Mexican Spanish strings.
src/Languages/lang_eo.json Adds Esperanto strings.
src/Languages/lang_en.json Adds English source strings.
src/Languages/lang_el.json Adds Greek strings.
src/Languages/lang_de.json Adds German strings.
src/Languages/lang_da.json Adds Danish strings.
src/Languages/lang_cs.json Adds Czech strings.
src/Languages/lang_ca.json Adds Catalan strings.
src/Languages/lang_bn.json Adds Bengali strings.
src/Languages/lang_bg.json Adds Bulgarian strings.
src/Languages/lang_be.json Adds Belarusian strings.
src/Languages/lang_ar.json Adds Arabic strings.
src/Languages/lang_af.json Adds Afrikaans strings.
Comments suppressed due to low confidence (1)

src/UniGetUI.Avalonia/Views/Controls/Settings/CheckboxCard.cs:165

  • This recomputes the warning width only when the card itself changes size, not when the right-side content changes width. Toggling updates the localized Enabled/Disabled label, whose widths differ substantially in locales such as Finnish and Spanish; if the card bounds stay fixed, MaxWidth remains based on the old label and the overlap this change targets can return. Also update the constraint when the content control changes size.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Languages/lang_ku.json Outdated
Comment thread src/UniGetUI.Avalonia/Views/Controls/Settings/CheckboxCard.cs Outdated
Comment thread src/Languages/lang_en.json Outdated
- Move the two-line warning formatter from CheckboxCard/SecureCheckboxCard
  to CoreTools.FormatAsTwoLines alongside the localization helpers
- Preserve translator-provided line breaks: skip splitting when the string
  already contains a newline (fixes double blank line in e.g. Japanese)
- Reword the broker warning to 'Operations will fail unless the agent is
  installed and running' to remove the logical ambiguity, and update the
  key and affected translations in all language files
- Retranslate the Kurdish strings into Sorani (Arabic script) to match the
  rest of lang_ku.json instead of Kurmanji (Latin script)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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.

Pull request overview

Copilot reviewed 63 out of 63 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

src/UniGetUI.Core.Tools/Tools.cs:95

  • Add focused unit coverage for this formatter’s Latin split, CJK split, existing-newline preservation, and no-boundary behavior. CoreTools already has unit coverage in UniGetUI.Core.Tools.Tests/ToolsTests.cs, and the newline case is a regression-sensitive contract used by every checkbox warning; without tests, a small future change can reintroduce blank lines or corrupt translated text.
    src/UniGetUI.Avalonia/Views/Controls/Settings/CheckboxCard.cs:151
  • The same infinite-width measurement also applies to _textblock, but only the warning receives a MaxWidth. The new broker label (and the existing long elevation label) can therefore still retain its unconstrained desired width and overlap the toggle at narrow widths even though TextWrapping is enabled. Apply the computed header width to both text blocks.

@mamoreau-devolutions
Marc-André Moreau (mamoreau-devolutions) merged commit 941d419 into main Jul 28, 2026
7 checks passed
@mamoreau-devolutions
Marc-André Moreau (mamoreau-devolutions) deleted the feat/package-broker-ui branch July 28, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants