Skip to content

refactor(chat): use Reactor theme resources - #1084

Merged
bkudiess merged 8 commits into
openclaw:mainfrom
karkarl:karkarl-migrate-reactor-theme-resources
Aug 5, 2026
Merged

refactor(chat): use Reactor theme resources#1084
bkudiess merged 8 commits into
openclaw:mainfrom
karkarl:karkarl-migrate-reactor-theme-resources

Conversation

@karkarl

@karkarl karkarl commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace application-owned Windows.UI.ViewManagement.AccessibilitySettings and HighContrastChanged observation with declarative XAML ThemeResource / ThemeDictionary resources and Reactor theme bindings.
  • Use the FontIcon-targeted capability-pill style for the optional Connection status glyph.
  • Restore direct ImageIcon plus SvgImageSource navigation rendering for normal themes.
  • Preserve accessible Hub navigation in High Contrast by using an App theme-dictionary boolean to select system-foreground Fluent FontIcons without constructing or subscribing to the legacy accessibility API.
  • Add the missing composer settings-tooltip localization in every supported locale.
  • Seed the isolated UI test host with the typed chat selection, tool-card, and compaction-card styles required by the production timeline.

Why AccessibilitySettings was removed

This is a reliability fix, not only a cosmetic refactor. Previous DebugView captures on the popout path showed an unhandled COMException in the legacy accessibility lifecycle. The replacement keeps theme resolution inside WinUI/Reactor resources.

The maintainer follow-up preserves the former High Contrast navigation contract without restoring that unstable subscription. Normal themes retain the colorful SVG icons. High Contrast resolves to system-foreground Fluent glyphs.

Validation

Current head: 4b702dcd

  • git diff --check
  • .\build.ps1: all 5 projects passed
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,399 passed, 32 skipped
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 2,040 passed
  • dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -c Debug -r win-x64 --no-build --filter "Category!=Accessibility": 100 passed
  • dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -c Debug -r win-x64 --no-build --filter "Category=Accessibility": 19 passed
  • GitHub CI passed: repo hygiene, shared/tray and UI tests, setup-connect E2E, revocation-recovery E2E, network-recovery E2E, win-x64 build, win-arm64 build, dispatch, Socket checks, and the CodeQL advanced-setup gate.

Real behavior proof

The patched app was launched with isolated tray data and a dedicated MCP port while Windows High Contrast Black was active. The Hub remained responsive and exposed visible navigation for Connection, Voice & Audio, Permissions, Sandbox, Diagnostics, and Settings. The original custom Windows theme was restored afterward, and the patched process was closed.

{
  "head": "4b702dcd",
  "highContrastEnabled": true,
  "processAlive": true,
  "processResponding": true,
  "connectionStatus": "Disconnected",
  "mcpPort": 8876,
  "visibleNavigationNames": [
    "Connection",
    "Voice & Audio",
    "Permissions",
    "Sandbox",
    "Diagnostics",
    "Settings"
  ]
}

Focused WinUI behavior proof also mounts realistic User -> Assistant -> ToolCall and compaction rows under the isolated TestApp, verifies the exact typed Border styles are applied, and completes without the previous CoreMessagingXP/combase host crash.

Review

  • Initial blind Gemini and Codex reviews independently identified the High Contrast navigation regression and missing test-host styles.
  • Runtime probes rejected two false positives: WinUI converts the scalar ThemeResource into a uniform Thickness, and WinUI maps semantic success/caution/critical brushes to SystemColorWindowTextColor in High Contrast.
  • Final post-fix GPT review: MERGE, 95% confidence, no actionable findings.
  • Final post-fix Gemini review: MERGE, 100% confidence, no actionable findings.
  • Bundled autoreview was attempted but its Codex engine could not authenticate (401), so it produced no review result.

Scope

This PR starts from main and changes chat/tray theme-resource handling, Hub navigation presentation, Connection styling, localization, and focused tests. It does not include chat tail positioning or follow-tail behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed August 5, 2026, 2:07 AM ET / 06:07 UTC.

ClawSweeper review

What this changes

This PR moves chat, Connection, and Hub High Contrast presentation from manual accessibility observation to WinUI/Reactor theme resources, with localized tooltip text and focused UI tests.

Merge readiness

Blocked until stronger real behavior proof is added - 3 items remain

Keep open. The supplied current-head patch appears to address the prior High Contrast fallback finding, but the PR still needs inspectable visual proof that the active High Contrast Hub uses legible fallback icons; local retrieval of the full PR blobs was blocked by the checkout's unreachable promisor remote.

Priority: P2
Reviewed head: 4b702dcd2290fa92b130c79d9d0af2ea6bedf916

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation and focused validation claims are promising, but the current proof does not visibly establish the accessibility-sensitive result.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: The PR includes current-head diagnostic JSON, but it does not visibly show the High Contrast fallback glyphs or the changed chat presentation; add redacted native UI evidence before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The PR includes current-head diagnostic JSON, but it does not visibly show the High Contrast fallback glyphs or the changed chat presentation; add redacted native UI evidence before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Current main uses the legacy path: Current main constructs AccessibilitySettings to detect High Contrast before swapping Hub navigation icons, establishing the behavior this PR replaces.
PR scope is focused on the tray theme boundary: The branch changes 16 tray UI, localization, and focused-test files, with no dependency, workflow, or credential files in the supplied changed-file list.
Related work is distinct: The related open pull request explicitly excludes this theme and navigation resource work, so it is not a replacement for this PR.
Findings None None.
Security None None.

How this fits together

The WinUI tray renders chat, the Hub navigation rail, and Connection settings. Windows theme and High Contrast values flow through application resources into those controls and their accessibility presentation.

flowchart LR
  WindowsTheme[Windows theme and High Contrast]
  AppResources[Application theme resources]
  Chat[Chat timeline and composer]
  Hub[Hub navigation]
  Connection[Connection settings]
  UiTests[Focused UI tests]
  WindowsTheme --> AppResources
  AppResources --> Chat
  AppResources --> Hub
  AppResources --> Connection
  Chat --> UiTests
  Hub --> UiTests
  Connection --> UiTests
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The PR includes current-head diagnostic JSON, but it does not visibly show the High Contrast fallback glyphs or the changed chat presentation; add redacted native UI evidence before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P2) - The resource migration can leave High Contrast navigation icons unreadable or visually indistinguishable. The pasted JSON confirms navigation names, but not the rendered fallback glyphs or their foreground contrast.
  • Complete next step (P2) - The remaining merge gate is contributor-provided native High Contrast proof, not a narrow automated code repair.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production versus test delta production +342/-745, tests +265/-1 The patch removes a substantial amount of imperative theme handling while adding focused source and UI coverage.

Merge-risk options

Maintainer options:

  1. Verify High Contrast presentation (recommended)
    Before merge, add current-head native UI proof showing the Hub fallback glyphs and chat remain legible while High Contrast is active.
  2. Accept the visual verification gap
    Merge based on the supplied diagnostics and tests while accepting that they do not visibly establish the fallback icon rendering.

Technical review

Best possible solution:

Keep the declarative resource approach, then attach a redacted current-head High Contrast screenshot or short recording that visibly shows the Hub fallback icons and an active chat surface.

Do we have a high-confidence way to reproduce the issue?

No. The PR describes prior COM and High Contrast behavior, but this read-only review could not establish a local current-head reproduction because the partial checkout could not retrieve the PR blobs.

Is this the best way to solve the issue?

Unclear. Replacing dispatcher-affine accessibility observation with declarative theme resources is a maintainable direction, but the full branch source and visual High Contrast result still need verification.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6e225e4758e1.

Labels

Label justifications:

  • P2: This is a bounded tray accessibility and reliability change with a limited user-facing blast radius.
  • merge-risk: 🚨 compatibility: Changing High Contrast resource selection can alter whether existing Hub navigation remains visible and usable for accessibility users.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR includes current-head diagnostic JSON, but it does not visibly show the High Contrast fallback glyphs or the changed chat presentation; add redacted native UI evidence before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current main uses the legacy path: Current main constructs AccessibilitySettings to detect High Contrast before swapping Hub navigation icons, establishing the behavior this PR replaces. (src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml.cs:1435, 6e225e4758e1)
  • PR scope is focused on the tray theme boundary: The branch changes 16 tray UI, localization, and focused-test files, with no dependency, workflow, or credential files in the supplied changed-file list. (src/OpenClaw.Tray.WinUI/App.xaml:20, 4b702dcd2290)
  • Related work is distinct: The related open pull request explicitly excludes this theme and navigation resource work, so it is not a replacement for this PR. (4b702dcd2290)
  • Feature-history routing: Current-main history includes the Reactor chat migration commit by karkarl and nearby tray refactor work by Barbara Kudiess. (src/OpenClaw.Tray.WinUI/Chat/OpenClawReactorChatRoot.cs, 9acafa606a4d)
  • Full branch-source inspection was blocked: The partial checkout has the PR commit metadata and changed-file names, but fetching omitted PR blobs failed because the promisor remote could not resolve github.com. The review therefore relies on supplied patches and local main inspection for the remaining assessment. (4b702dcd2290)

Likely related people:

  • karkarl: Authored the current-main Reactor chat migration that owns the chat surface this PR refactors. (role: recent chat feature contributor; confidence: high; commits: 9acafa606a4d; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawReactorChatRoot.cs)
  • Barbara Kudiess: Recent history ties this contributor to tray refactoring across the Connection and UI surfaces adjacent to this change. (role: recent adjacent tray contributor; confidence: medium; commits: d2638ddbef57; files: src/OpenClaw.Tray.WinUI/Pages/ConnectionPage.xaml.cs, src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml.cs)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach a redacted current-head screenshot or short recording with High Contrast active, showing the Hub fallback icons and chat surface.
  • Include any matching UI-inspection or runtime diagnostic output with the capture, while redacting private endpoints and identifiers.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (8 earlier review cycles)
  • reviewed 2026-08-03T23:05:26.592Z sha 8b7c552 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-04T03:15:49.663Z sha 7944e78 :: needs real behavior proof before merge. :: [P2] Restore the High Contrast navigation fallback
  • reviewed 2026-08-04T11:09:40.188Z sha 7944e78 :: needs real behavior proof before merge. :: [P2] Preserve the High Contrast navigation fallback
  • reviewed 2026-08-04T13:09:02.602Z sha 7944e78 :: needs real behavior proof before merge. :: [P2] Preserve the High Contrast navigation fallback
  • reviewed 2026-08-04T15:17:21.812Z sha dd4415a :: needs real behavior proof before merge. :: [P2] Preserve the High Contrast navigation fallback
  • reviewed 2026-08-04T16:01:52.100Z sha dd4415a :: needs real behavior proof before merge. :: [P2] Restore the High Contrast navigation fallback
  • reviewed 2026-08-04T17:01:39.054Z sha 7be4403 :: needs real behavior proof before merge. :: [P2] Preserve the High Contrast navigation fallback
  • reviewed 2026-08-04T22:05:04.715Z sha 7be4403 :: needs real behavior proof before merge. :: [P2] Restore the High Contrast navigation fallback

karkarl and others added 4 commits August 3, 2026 17:27
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 4, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@karkarl
karkarl marked this pull request as ready for review August 4, 2026 14:41
karkarl and others added 2 commits August 4, 2026 09:56
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@bkudiess bkudiess left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed and live-tested with >90% confidence after the maintainer follow-up. Exact-head build, 3,399 Shared tests (32 skipped), 2,040 Tray tests, 100 non-accessibility UI tests, and 19 accessibility tests passed. Windows High Contrast Black proof confirms system-foreground Hub navigation while normal themes retain SVG icons. Runtime tests cover the isolated tool and compaction style paths. Final GPT and Gemini reviews reported no actionable findings at 95% and 100% confidence. GitHub CI is green for x64, ARM64, tests, E2E, hygiene, dispatch, Socket, and the CodeQL gate.

@bkudiess
bkudiess merged commit ff19012 into openclaw:main Aug 5, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants