Skip to content

refactor(chat): remove the retired FunctionalUI chat surface - #1110

Open
calebeden wants to merge 5 commits into
openclaw:mainfrom
calebeden:calebeden-remove-legacy-chat-ui
Open

refactor(chat): remove the retired FunctionalUI chat surface#1110
calebeden wants to merge 5 commits into
openclaw:mainfrom
calebeden:calebeden-remove-legacy-chat-ui

Conversation

@calebeden

@calebeden calebeden commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Related: #1115

What Problem This Solves

The native chat codebase still carried a complete FunctionalUI chat root, timeline, composer, virtualization layer, resources, and focused proof fixtures after production ChatPage and ChatWindow had moved to Reactor. This left two apparent owners for chat presentation and preserved several thousand lines of unreachable migration code.

Why This Change Was Made

This removes the retired FunctionalUI chat implementation and its chat-only virtualization infrastructure, resources, and migration-debt tests. Production chat remains owned by OpenClawReactorChatRoot and ReactorChatTimeline; the presentation inputs formerly declared by the legacy timeline now live in the Reactor-neutral ChatTimelinePresentationContext record. FunctionalUI remains available for active consumers such as Cron markdown rendering.

This PR intentionally does not design or add a replacement Reactor runtime-test suite. The deleted proofs mounted the unreachable FunctionalUI renderer and contained assertions tied to VirtualStack, ItemsRepeater, FunctionalUI control caches and reconciliation, removed XAML styles, and legacy scroll-timer mechanics. Porting the still-relevant user-facing invariants requires Reactor-specific test design rather than a mechanical test migration. That separate work is tracked in #1115 so this PR remains focused on deleting unreachable code and tests that no longer exercise production behavior.

User Impact

No user-visible behavior is intended to change. Native chat continues to use the existing Reactor surface, while maintainers now have one production chat implementation and substantially less dead code to maintain.

Evidence

  • Current-head full repository build succeeded on Windows ARM64, including validation of 45 Markdown files.
  • Current-head Shared suite passed: 3,412 passed, 32 skipped.
  • Current-head Tray suite passed: 2,162 passed, 0 skipped.
  • The existing real WinUI ReactorToolActivityProofTests ran against the chat-runtime-identical parent: 1 passed, 0 failed, 0 skipped.
  • The production binary launched successfully. UI Automation found the native Chat messages list and ChatComposerInput editor in the selected Chat route.
  • The captured zero-state Chat surface contained no private conversation content, credentials, or tokens and showed no clipping, overlap, or broken layout.
  • The latest merge changed no production ChatPage, ChatWindow, or Reactor chat source files relative to the runtime capture.
  • The focused production ownership contract verifies that both ChatPage and ChatWindow mount OpenClawReactorChatRoot through ReactorChatHostExtensions.
  • A dual-model Hanselman review of the chat integration found no actionable issues.
  • Follow-up test(chat): add Reactor runtime coverage for timeline behavior #1115 defines broader Reactor-hosted runtime coverage without restoring obsolete FunctionalUI implementation assertions.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Validation

  • ./build.ps1
    • Passed on 2829648f556e96f929fdb18de64fb3ee2c36a3aa: documentation validation, Shared, CLI, WinNode CLI, SetupEngine, and WinUI builds.
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
    • Passed on 2829648f556e96f929fdb18de64fb3ee2c36a3aa: 3,412; skipped: 32; failed: 0.
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore
    • Passed on 2829648f556e96f929fdb18de64fb3ee2c36a3aa: 2,162; skipped: 0; failed: 0.
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore --filter "FullyQualifiedName~ArchitectureLedgerConsistencyTests"
    • Passed on the resolved 2829648f556e96f929fdb18de64fb3ee2c36a3aa tree: 6; skipped: 0; failed: 0.
  • dotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -r win-arm64 --no-restore --filter "FullyQualifiedName~ReactorToolActivityProofTests"
    • Passed on cb76e845739960ae1cfad9f7e85fd58f30dd8c82: 1; skipped: 0; failed: 0. The subsequent merge changed no production chat runtime files.

Real Behavior Proof

  • Environment tested: Windows 11 ARM64, .NET 10 preview SDK, Windows App SDK build target win-arm64.

  • Current PR head validated: 2829648f556e96f929fdb18de64fb3ee2c36a3aa.

  • Runtime chat capture commit: cb76e845739960ae1cfad9f7e85fd58f30dd8c82.

  • Runtime equivalence check: git diff --name-only cb76e845..2829648f -- src/OpenClaw.Tray.WinUI/Chat src/OpenClaw.Tray.WinUI/Pages/ChatPage.xaml.cs src/OpenClaw.Tray.WinUI/Windows/ChatWindow.xaml.cs returned no changed files.

  • Exact production command run: winapp run ".\src\OpenClaw.Tray.WinUI\bin\Debug\net10.0-windows10.0.22621.0\win-arm64" --manifest ".\src\OpenClaw.Tray.WinUI\Package.appxmanifest" --executable "OpenClaw.Tray.WinUI.exe" --debug-output.

  • Executed Reactor-host proof: dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 --no-restore --filter "FullyQualifiedName~ReactorToolActivityProofTests" passed 1 of 1 tests.

  • Sanitized production UIA transcript:

    winapp ui search 'Chat messages' -w <window>
      lst-chatmessages-af60 List "Chat messages"
    Found 1 matches
    
    winapp ui search ChatComposerInput -w <window>
      ChatComposerInput Edit "Message Assistant (Enter to send)"
    Found 1 matches
    
  • Evidence after fix: The production Chat route mounted a native message list and composer. The connected zero-state surface rendered its welcome content and suggestions with the composer empty.

  • Observed result: The retained Reactor chat route is operational, and the current head contains the same production chat runtime files as the captured commit. This is a regression smoke, not a claim that runtime evidence alone proves the deleted implementation was unreachable.

  • Screenshot or artifact links verified? (Yes/No/N/A): N/A. The directly copied UIA transcript and executed Reactor-host test are the proof items.

  • Not verified or blocked: The popup ChatWindow was not captured in the runtime smoke. Its production Reactor mount remains covered by the positive ownership contract. Broader Reactor timeline runtime coverage is tracked in test(chat): add Reactor runtime coverage for timeline behavior #1115.

Security Impact

  • New permissions or capabilities? (Yes/No): No.
  • Secrets or tokens handling changed? (Yes/No): No.
  • New or changed network calls? (Yes/No): No.
  • Command or tool execution surface changed? (Yes/No): No.
  • Data access scope changed? (Yes/No): No.
  • If any answer is Yes, explain the risk and mitigation: N/A.

Compatibility and Migration

  • Backward compatible? (Yes/No): Yes.
  • Config or environment changes? (Yes/No): No.
  • Migration needed? (Yes/No): No.
  • If yes, list the exact upgrade steps: N/A.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

Remove the unreachable FunctionalUI chat root, timeline, composer, virtualization helpers, proof fixtures, and migration-debt tests. Keep remaining FunctionalUI consumers intact and guard production chat ownership through the Reactor mount path.

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. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Aug 6, 2026
@clawsweeper

clawsweeper Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codex review: found issues before merge. Reviewed August 12, 2026, 9:17 AM ET / 13:17 UTC.

ClawSweeper review

What this changes

The PR removes the retired FunctionalUI native-chat implementation and related tests while retaining the Reactor chat surface.

Merge readiness

⚠️ Needs maintainer review before merge - 3 items remain

The cleanup remains useful, but the current PR head is not mergeable against main and must be rebased before it can be safely reviewed for landing.

Priority: P3
Reviewed head: 2829648f556e96f929fdb18de64fb3ee2c36a3aa

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The cleanup and proof are credible, but the unresolved merge leaves the actual landed behavior unvalidated.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies a Windows ARM64 UI-automation transcript and a live Reactor-host test, with a runtime-equivalence check from the capture commit to the PR head.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies a Windows ARM64 UI-automation transcript and a live Reactor-host test, with a runtime-equivalence check from the capture commit to the PR head.
Evidence reviewed 4 items Current release still has the retired surface: Current main, which is also v2026.7.1, still contains the FunctionalUI chat root, timeline, and composer, so this cleanup is not already implemented.
Active current-main contract: The active Reactor root still constructs the legacy presentation record that this PR deletes and replaces.
PR migration boundary: The PR replaces that legacy record with a neutral Reactor presentation context across the Reactor root, timeline, and tool-card renderer.
Findings 1 actionable finding [P1] Rebase and resolve the current-main chat conflicts
Security None None.

How this fits together

The tray Chat page and popup render gateway conversation state through a native Reactor chat host. This change deletes an older FunctionalUI rendering path and moves its shared presentation inputs to the active Reactor timeline.

flowchart LR
  Gateway[Gateway chat state] --> Provider[Chat data provider]
  Provider --> Root[Reactor chat root]
  Root --> Timeline[Reactor timeline]
  Timeline --> Page[Chat page]
  Timeline --> Popup[Chat popup]
  Legacy[Retired FunctionalUI chat] --> Removal[Deletion in this PR]
Loading

Before merge

  • Rebase and resolve the current-main chat conflicts (P1) - GitHub reports this head as dirty, and current main’s active Reactor root still constructs the legacy presentation type that this PR deletes. Rebase and preserve current-main Reactor composer and accessibility behavior before validating the resolved head.
  • Resolve merge risk (P1) - A naïve conflict resolution could lose current-main Reactor composer and accessibility behavior while deleting the legacy presentation record.
  • Complete next step (P2) - Resolve the current-main conflict and validate the actual merged behavior before maintainer merge review.

Findings

  • [P1] Rebase and resolve the current-main chat conflicts — src/OpenClaw.Tray.WinUI/Chat/OpenClawReactorChatRoot.cs:266
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Cleanup scope 30 files affected, 152 lines added, 7,768 removed The deletion removes a full alternate chat surface and its fixtures, so the three-way merge needs renewed behavior checks.
Current-main overlap 3 active Reactor implementation files plus their shared presentation type The conflict crosses the root, timeline, and tool-card presentation contract.

Merge-risk options

Maintainer options:

  1. Rebase with Reactor behavior preserved (recommended)
    Resolve the current-main conflict by retaining active Reactor composer and accessibility behavior while adopting the neutral presentation context, then validate the resolved head.
  2. Pause the cleanup
    Keep the legacy implementation until a maintainer or contributor can perform and validate the cross-branch chat reconciliation.

Technical review

Best possible solution:

Rebase the cleanup onto current main, preserve active Reactor behavior while applying the neutral presentation context, then validate the resolved Windows chat route.

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

Not applicable: this is a refactor cleanup, and the submitted Windows UI-automation smoke verifies the retained Reactor route rather than a bug reproduction.

Is this the best way to solve the issue?

Yes, once rebased: deleting the unreachable FunctionalUI path while retaining the Reactor owner is focused, but the dirty merge cannot establish the resulting behavior.

Full review comments:

  • [P1] Rebase and resolve the current-main chat conflicts — src/OpenClaw.Tray.WinUI/Chat/OpenClawReactorChatRoot.cs:266
    GitHub reports this head as dirty, and current main’s active Reactor root still constructs the legacy presentation type that this PR deletes. Rebase and preserve current-main Reactor composer and accessibility behavior before validating the resolved head.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4206611f2b2e.

Labels

Label justifications:

  • P3: This is a maintenance cleanup with no intended user-visible behavior change.
  • merge-risk: 🚨 compatibility: The dirty merge must reconcile an active Reactor presentation contract before deleting its legacy type.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The PR body supplies a Windows ARM64 UI-automation transcript and a live Reactor-host test, with a runtime-equivalence check from the capture commit to the PR head.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies a Windows ARM64 UI-automation transcript and a live Reactor-host test, with a runtime-equivalence check from the capture commit to the PR head.

Evidence

What I checked:

Likely related people:

  • Scott Hanselman: Current-main blame assigns the active Reactor-root presentation construction to the latest release commit. (role: recent current-main chat contributor; confidence: medium; commits: 4206611f2b2e; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawReactorChatRoot.cs, src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs)
  • Régis Brid: Feature history includes native-chat implementation and maintenance commits in the legacy surface this PR retires. (role: historical chat-area contributor; confidence: medium; commits: 4e7982bafb86, 16929b600710; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatRoot.cs, src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs)

Rank-up moves

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

  • Rebase onto current main and preserve its active Reactor changes.
  • Rerun the documented build, shared suite, tray suite, and focused Reactor runtime proof on the resolved head.

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 (23 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-08T15:40:07.541Z sha 2829648 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-09T00:06:55.651Z sha 2829648 :: needs changes before merge. :: [P1] Rebase and resolve the current-main conflicts
  • reviewed 2026-08-09T03:16:05.815Z sha 2829648 :: needs changes before merge. :: [P1] Rebase and resolve the current-main conflicts
  • reviewed 2026-08-09T09:28:17.376Z sha 2829648 :: needs changes before merge. :: [P1] Rebase and resolve the current-main conflicts
  • reviewed 2026-08-09T11:59:58.447Z sha 2829648 :: found issues before merge. :: [P1] Rebase and resolve the current-main conflicts
  • reviewed 2026-08-09T14:51:00.368Z sha 2829648 :: found issues before merge. :: [P1] Rebase and resolve the current-main conflicts
  • reviewed 2026-08-12T00:07:03.842Z sha 2829648 :: found issues before merge. :: [P1] Rebase and resolve the current-main conflicts
  • reviewed 2026-08-12T04:19:16.123Z sha 2829648 :: found issues before merge. :: [P1] Rebase and resolve the current-main conflicts

Mark the production Reactor mount contract as a source-shape guard and document when the ledger closure can be retired.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. P2 Normal priority bug or improvement with limited blast radius. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Aug 6, 2026
Resolve the Reactor presentation-context migration across current-main tool activity rendering and UI proof consumers.

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. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 7, 2026
@calebeden

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

Mark the Reactor timeline ownership contract as a source-shape guard and document its retirement condition.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. and removed 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. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Aug 7, 2026
Preserve the Reactor chat architecture documentation while adopting the repository documentation standardization changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 7, 2026
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 7, 2026
@calebeden
calebeden marked this pull request as ready for review August 7, 2026 21:28
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 8, 2026
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. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant