Skip to content

Port OpenClawTray.FunctionalUI to Reactor to stop hand-maintaining bespoke UI primitives #996

Description

@karkarl

Problem

OpenClawTray.FunctionalUI is an in-house MVU/reconciler with a hand-maintained set of primitives and element modifiers. Every new control need has to be added and maintained by hand, and non-trivial chat/UI features keep extending it:

Both are maintenance we take on only because FunctionalUI is bespoke. Porting to Microsoft.UI.Reactor (or the agreed Reactor-style MVU library) would let us bypass hand-rolling and maintaining these primitives and lean on an upstream-maintained component surface.

Goal

Migrate the tray UI from OpenClawTray.FunctionalUI to Reactor, so:

  • New controls come from the upstream library instead of bespoke primitives + modifiers.
  • Existing screens (chat/canvas, Connection, onboarding, Command Center, Settings) keep current behavior and tests.
  • The selection-preservation and inert-markdown invariants from the chat work are preserved (or re-expressed) under Reactor.

Suggested phasing

  1. Spike: stand up Reactor alongside FunctionalUI; port one leaf screen to validate patterns, testing, and reconcile/selection behavior.
  2. Port primitives currently unique to FunctionalUI (ComboBox from fix(chat): replace NativeElement escape hatch with FunctionalUI ComboBox primitive (supersedes #973) #991, RichTextBlock from this branch, etc.) to Reactor equivalents.
  3. Migrate screens incrementally behind the existing god-file-reduction guardrails (App.xaml.cs / ConnectionPage.xaml.cs) — one seam per PR with characterization tests.
  4. Remove FunctionalUI once no consumers remain.

Constraints / guardrails

  • Follow AGENTS.md architecture guardrails: small, reviewable, one seam per PR; characterization tests before moving behavior.
  • Keep the chat inert-markdown security posture and the RichTextBlock selection-preservation cache invariant.
  • Preserve accessibility (UIA names/roles, live regions) and existing UI/MCP proof requirements.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions