Skip to content

Convert Management Client UI to WPF and fix Hide address regression - #51

Merged
joshooaj merged 7 commits into
mainfrom
chore/update-admin-ui
Oct 30, 2026
Merged

joshooaj merged 7 commits into
mainfrom
chore/update-admin-ui

Conversation

@joshooaj

Copy link
Copy Markdown
Owner

Summary

Two changes to the Management Client surface and one regression fix:

  1. MC UI → hosted WPF. The WinForms item-configuration page and the "Web Content Workspaces" overview page are now WPF pages hosted in an ElementHost (Dock=Fill), with plugin-owned styles — the Management Client supplies no WPF theme resources.
  2. Hide address regression. AddressVisibility was a getter-only binding evaluated during InitializeComponent() before the ViewItemManager was attached, so it returned Visible and only property-change events (ReloadProperties) ever re-raised it. The manager setter now raises the notification when it attaches.
 WebContentUserControl (WinForms wrapper)
-  Designer.cs: label/textbox/checkbox grid (WinForms)
+  ElementHost (Dock=Fill)
+    WorkspaceConfigPage.xaml (WPF; same public surface, Strings shared with SC)
 WorkspaceItemManager
-  GenerateOverviewUserControl => WinForms overview
+  GenerateOverviewUserControl => WorkspaceOverviewUserControl (ElementHost + WPF help page)

 WebContentViewModel
  AddressVisibility => settings.HideAddress ? Collapsed : Visible
  ViewItemManager setter
+    if (value != null) OnPropertyChanged(nameof(AddressVisibility))  # binding was stale until first property change

Evidence

  • Before: user-reported — "Hide address" checked in Demo Workspace, yet the Smart Client still showed the address textbox; only "Hide toolbar" worked.
  • After (live Smart Client, Demo Workspace with toolbar visible + hide address): address bar gone, NavHome/NavBack/NavReload remain — UIA contract test asserts addressBar == null, buttons present.

hide-address-contract — live Smart Client with toolbar visible + hide address: address bar gone, NavHome/NavBack/NavReload remain (from artifacts/ux/20261030-083507).

  • dotnet test src/WebContent.Tests — 217/217 passed.
  • dotnet test tests/ux --filter SmartClientWorkspaceTests — 2/2 passed (hide-address contract branch: address bar absent, home reachable via NavHome + CDP).
  • ToolbarOptionsTests.HideAddress_WithVisibleToolbar_RemovesAddressBar drives the MC checkboxes (chkHideToolbar off, chkHideAddress on) via the new WPF page and verifies the resulting SC toolbar shape.

Merge Danger

Door: two-way — pure UI + binding-notification change; the deleted WinForms Designer.cs/resx return on revert.

Blast Radius: Management Client plugin pages (config + overview) and the Smart Client address bar only. No server-side or protocol changes; property dictionary shape is unchanged.

Smart Client toolbar with Hide address: no address bar, nav buttons remain

AddressVisibility evaluated during InitializeComponent() while the
ViewItemManager was still unattached, so the getter returned Visible
and nothing re-raised the notification when the manager attached.
The setter now raises OnPropertyChanged for AddressVisibility.

UX tests: ToolbarOptionsTests regression (MC sets toolbar-visible/
address-hidden state via the WPF checkboxes, SC asserts the address
bar is absent and NavHome/NavBack/NavReload remain); SmartClient-
WorkspaceTests asserts the hide-address contract from uxconfig;
ManagementClientUi gains EnsureCheckBox/DeleteWorkspaceIfPresent
harness helpers.
…d workspace security tree

MC's tree has LabelEdit active: clicking the label of an already-selected
node arms the inline rename editor (and renaming can raise the modal
'ItemName.set ...: Not valid to set dirty state at the line' dialog).
SelectNode now cancels arming with ESC; ExitTreeEditMode detects a live
edit control inside the PlatformTree column and cancels it without
re-clicking; DismissItemNameSetErrors closes the modal dialog before
each capture. The role-security shot also expands the Web Content
Workspaces node so each workspace shows its own permission row.
User-provided PowerShell strategy ported to CollapseTreeToRoot: one
snapshot of realized TreeItems classifies every visible level-1 node
(rows share the X of the first row below Home; the next row's X being
deeper means the node is expanded), and label double-clicks collapse
it. Far faster than the old per-node keyboard LEFT walk: whole tree in
one classification round + a verification round. Nodes that survive 4
rounds fall back to the proven keyboard walk. Enumeration is scoped to
TreeNavigation so foreign detail-pane trees can't skew the X math.
WaitForTreeReady polls TreeNavigation+first TreeItem instead of a
fixed sleep; WheelTree sleeps shortened. README shots refreshed.
@joshooaj
joshooaj merged commit b012836 into main Oct 30, 2026
2 checks passed
@joshooaj
joshooaj deleted the chore/update-admin-ui branch October 30, 2026 19:14
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.

1 participant