Skip to content

fix: keep chat activity and working progress accurate in Companion - #2374

Draft
bkudiess wants to merge 4 commits into
openclaw:mainfrom
bkudiess:fix/chat-activity-web-parity
Draft

bkudiess wants to merge 4 commits into
openclaw:mainfrom
bkudiess:fix/chat-activity-web-parity

Conversation

@bkudiess

@bkudiess bkudiess commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

In Companion, grouped tool activity can lose a visible step, omit legacy calls, or show an unknown result even when the individual tool actually succeeded or failed. The working footer also differs from the shipped web UI in token/time presentation, and a running label can retain its shimmer after native control reuse.

User Impact

User impact: chat shows more accurate activity counts, current-run headlines and individual results, with a compact working footer and accessible waiting labels. Completed or interrupted labels no longer inherit a running shimmer after garbage collection and reuse.

No execution permissions, tool-result authority, pairing, installation or shared runtime policy changes. Older producers without canonical activity retain the legacy display path; unsupported payload shapes are not guessed.

Why This Change Was Made

Use the existing reducer, mapper, history, activity and renderer owners rather than adding a second chat state system. Keep canonical producer records separate from sparse hints, and aggregate outcome accounting separate from individual tool-card results. Retain bounded activity snapshots and run usage, independent group/card disclosure state, and native-owned animation cleanup.

Includes focused localization and design documentation updates. A small Connection test-only isolation repair uses the existing process-inspector seam; it does not change production migration behavior.

Latest upstream main is merged: e4bedeb1d2cc2c83706d9098bbac4e7ebd9d3c98, including #2372 (pin the Dashboard proof to a desktop viewport) and #2371 (paste chat text once after using the context menu). This PR's delta against that main contains 36 files, including the task-caused live-work assertion correction; the upstream fixes are not re-proposed here.

Evidence

Draft, not a merge-ready claim. Current head: 51438fac7b2e139f76bdae90e19077531dd7435a, including merge head 3859098e3b59123f5fbe01de7794ca29f165db10. The original 35-file reviewed source was committed as 81f588751a8e2702722866b857ca308766fd05ad; those contents are unchanged. Fresh merged-head validation and a later full ARM64 run exercised the final test-only correction as dirty source on 3859098e; all 43 guarded paths exactly match their committed working-tree bytes at 7afbe726. That correspondence does not turn earlier tests into a new CI run. GitHub Build and Test run 45666251993 completed successfully for this updated PR; its CI Gate passed with no failed or pending checks at that head. CI on the assertion-bearing head (run 45740329356) completed successfully, including the CI Gate; no checks were failed or pending at the final observation.

Validation

| Check | Verified merged-source result |

|---|---|

| Full canonical x64 and native ARM64 builds | Passed |

| Shared | x64: 5,980 passed / 29 skipped / 0 failed; ARM64: 5,981 passed / 28 skipped / 0 failed |

| Tray | ARM64: 7,009 passed / 0 skipped / 0 failed; x64: 7,009 passed on rerun after one preserved settings-file I/O failure |

| Connection | 1,847 passed / 1 skipped / 0 failed |

| Functional UI | 19 passed / 0 skipped / 0 failed |

| Mounted native renderer and containing work-layout proofs | Final 77/77 passed in Debug and non-Dev Release, including the exact two CI cases |

| Real-app synthetic Gateway fixture | 5/5 passed in each configuration |

| Broad native accessibility | Debug: 39 passed / 2 failed; Release: 38 passed / 3 failed — remaining blockers below. The earlier scoped chat selection passed 2/2 each before the main merge. |

| Documentation | 74 Markdown files and proof-pool/flow checks passed |

Commands: build.ps1; canonical per-project dotnet test --no-restore for Shared, Tray, Connection and Functional UI. Native proof uses OpenClaw.Tray.UITests with -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false -p:RequireSignedCleanupHost=false, selecting ReactorToolActivityProofTests|CompletedWork_|ExpandedWork_|LiveWork_; the exact LiveWork_KeepsRunningRowsAndProgressOnTheReadingColumn pair also passed independently. Real-app chat fixtures and the broad Category=Accessibility|Category=AccessibilityStartup selection ran separately. Native cases executed without skips on an authorized isolated ARM64 desktop. No global RID override was used for pure suites.

Real Behavior Proof

Failing-before/passing-after regressions cover visible/hidden same-call activity, current-run versus earlier-run authority, sparse outcome/blocked distinctions, unpaired records, history diff preservation, single-line text and localized no-detail accessible phases. A native shimmer cleanup failure was reproduced under forced GC before the fix; native-owned recovery state restored the labels afterward. Final focused and full native logs recorded the collection sentinel as true. Earlier expected-red, invalid-fixture, lease-race and COM-aware WeakReference precondition failures remain preserved separately, not rewritten as successful runs.

Synthetic real-app captures show retained public progress, the saved answer, usable composer and terminal/late-snapshot queue handling. This is loopback/native app proof, not live provider/pairing, MXC, WSL or installer proof. Selected native/app captures, source manifests and redacted case/cleanup evidence are now public through the pinned proof package below; the full private fixture/profile logs remain local.

Published native/app evidence

Inspectable synthetic proof package, pinned to artifact commit 23a65816784a700129ff45eb5ffec1bc236b4bd4. 43-file capture source manifest, individual-result/native-case receipts, and direct collection/cleanup trace.

The retained images correspond to the 7afbe726 rendering implementation. Production source is unchanged by the one-line collection-precondition amendment committed and pushed as 51438fac7b2e139f76bdae90e19077531dd7435a. The actual finalizer sentinel recorded collection True, and the assertion-bearing focused run passed all four selected GC and individual-result cases. Its exact source hash/counts distinguish that run from the retained 77-case source. Full assertion-bearing native validation passed: 77/77 Debug, 77/77 Release, full build/Shared/Tray passed, collection True recorded in both runs, and all 43 source hashes plus final owned cleanup verified. Final execution/source/cleanup facts. No unexecuted result is marked passed.

Live headline and aligned working footer (480 DIP):

Live wrapper headline and token/time footer

Expanded individual result and nested tool output (1100 DIP):

Completed command, nested read and working footer

Dark-theme approval state, with tokens and no fabricated elapsed time:

Approval waiting phase and tokens

Real native Companion process after the synthetic queued conversation completes:

Retained answers and usable composer

Only synthetic captures and selected redacted evidence are published. Profiles, credentials, tokens, private configuration and full raw Gateway logs are excluded. Original before-fix gradient failures remain inspectable. The unrelated broad accessibility failures below remain unresolved.

The collection precondition now uses Assert.True(collection.WasCollected) before native reacquisition, inside the failure-safe outer try/finally. An unexercised collection run can no longer pass the named regression. Both independent reviewers cleared the exact one-line amendment; the original before-fix failures remain published separately.

ClawSweeper proof decision

ClawSweeper revision 2 reviewed 51438fac7b2e139f76bdae90e19077531dd7435a and marked proof sufficient (linked artifact), no actionable findings, and platinum hermit (4/6). The collection-precondition finding is resolved. This is maintainer-review readiness, not merge authorization or whole-pool/native-accessibility sign-off.

The review retained a native-test digest qualification. Published raw/runtime-to-committed hash correspondence shows the exact runtime bytes match the recorded hash and clean to the exact committed blob despite mixed CRLF/LF materialization. Production-source correspondence and the screenshots are unchanged.

Independent Review

Completed adversarial reviews by github-copilot/gpt-6-astra and Opus. The Opus route normalized github-copilot/claude-opus-5.5 to github-copilot/claude-opus-5-5. Verified findings were repaired and affected proof rerun. The user approved native independent subagent review without selectable/verified high reasoning or Astra long-context controls; this is not a helper-isolated machine verdict. Completed independent implementation/scope/proof-plan review through a native OpenClaw subagent found the 35-file change coherent with no required simplification. This is separate from the adversarial source assessments, not a claim of a dedicated task rubber-duck role or runtime certification. Its completion note preserves that a new granular audit of every test group was not repeated during PR preparation.

Not Verified / Blocked

  • Merge-head local full build, Shared (5,980 passed / 29 skipped), Connection (1,847 passed / 1 skipped) and Functional UI (19 passed) have passed. The first merged Tray run had 7,008 passed / 1 failed: the unchanged SettingsSandboxPublicationTests.SavedCallbacksRunOutsideSettingsSerialization encountered an UnauthorizedAccessException during settings-file replacement. The unchanged-head focused batch passed 10/10 and the containing Tray rerun passed 7,009/7,009 using isolated task roots; the original failure is preserved rather than erased by those passes. Merged native full builds, Shared (5,981 passed / 28 skipped), Tray (7,009 passed) and the native renderer class passed in Debug and Release. Merged real-app fixtures passed 5/5 in each configuration. GitHub CI completed with two failures in LiveWork_KeepsRunningRowsAndProgressOnTheReadingColumn (widths 480 and 1100), plus the aggregate CI gate. The stale assertion measured the collapsed ordinary-status text instead of the visible token/time line. The test-only correction in 7afbe726 measures the visible details, independently supplies/asserts the wrapper preview with ellipsis and no duplicate Running badge, and retains all geometry/disclosure/output checks. Both original cases passed 2/2 and 77 containing proofs passed each Debug/Release. Both requested independent models completed review with no new actionable P0–P3 findings. The original CI and subsequent Expected3/Actual2 header-count failures remain recorded; Fresh CI run 45666251993 passed, including the formerly failing workspace/chat layout shard and the CI Gate. This does not clear the separately reported native broad-accessibility failures.

  • The fresh merged-head broad 41-case accessibility category is still not green: Debug 39 passed / 2 failed; Release 38 passed / 3 failed. Both retain the native Dashboard ButtonShouldHavePatterns violation and the unchanged Sessions action-name test mismatch; Release also refused clipboard input while a foreign process retained foreground. fix(tests): keep the released Dashboard route proof on a desktop viewport #2372 fixes an E2E desktop viewport, not this different native Axe rule. Original pre-merge failures and the fresh merged receipts are retained separately; no foreground safeguard or accessibility assertion was bypassed.

  • No speculative history item-ID prefix normalization, unrelated visual waiting-policy redesign or cosmetic approval-key split. Broader retry/start-clock and unproven weak-owner observations remain outside this change.

  • No live provider/pairing, WSL/MXC, installer or full cross-client pixel-equivalence claim.

Required proof pools

  • windows-11-arm64: native build, runtime loading and chat rendering/lifetime behavior.

  • windows-winui-interactive: current-build tool disclosure, working footer, accessibility, keyboard and visible app proof.

Preserve canonical activity visibility, current-run headlines and actual tool outcomes. Align the working footer, usage and localized presentation with the shipped producer, and keep native shimmer cleanup state across wrapper collection.

Implemented and validated with OpenClaw Atlas assistance. Includes observed failing reproductions, dual-model source review, x64 and native ARM64 validation.
@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 25, 2026
@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR corrects chat activity accounting, current-run headlines, working-footer presentation, and native shimmer cleanup.

Example: A command completes while its canonical activity record omits status.

  • Before: The individual tool card can display an unknown outcome despite its successful result.
  • After: The card preserves its completed result while aggregate activity can separately report uncertainty.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful repair supported by visible native evidence and focused boundary coverage; no code blocker was established, and broader accessibility results remain separately qualified.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): Inspected native captures demonstrate the changed activity/footer states, and published ARM64 traces report observed collection with cleanup plus 77/77 Debug and Release cases; production-source correspondence is verified, while the native-test digest qualification is recorded in evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Companion can miscount tool activity, show misleading outcomes or progress, and retain running animation on reused completed labels.
Reason: The concrete display failures warrant repair, and the collaborator-authored direction covers the deliberate footer and disclosure changes.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides useful Companion chat fixes absent from current main, and its collaborator author explicitly retains draft status. The prior collection-assertion finding is resolved; no new actionable code defects were established.

Reviewed head: 51438fac7b2e139f76bdae90e19077531dd7435a

Before merge

None.

Findings

None.

Agent review details

How this fits together

Gateway events and history enter the shared parser, mapper, and chat reducer; native projections turn that state into activity groups, tool cards, and working progress.

flowchart LR
  A[Gateway events and history] --> B[Shared activity parser]
  B --> C[Chat mapper and reducer]
  C --> D[Activity and progress projections]
  D --> E[Native chat renderer]
  E --> F[Control lifetime cleanup]
Loading

Technical review

Best possible solution:

Keep Gateway activity as display facts, actual tool outcomes authoritative, and shimmer cleanup attached to native control lifetime.

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

Current-main source and the published pre-fix native gradient failures establish reproducible display and lifetime paths; this review did not execute target code.

Is this the best way to solve the issue?

The repair uses the existing parser, reducer, history, projection, and renderer owners, preserves legacy payload handling, and adds justified native lifetime state without introducing a competing chat system.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 41468def6057.

Provenance checked

  • Activity summaries and disclosure state changes intended behavior with a stated reason (19a9278: Align tool titles, category counts, grouping, and disclosure continuity with web chat.)
  • Working-footer status presentation changes intended behavior with a stated reason (7035e83: Show the actual run phase beside elapsed time with stable composition-driven transitions.)
  • Running-label shimmer cleanup keeps the original intent (243f9cf: Provide active native chat feedback while stopping animation before control reuse.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Barbara Kudiess: Raw commit 243f9cf adds src/OpenClaw.Tray.WinUI/Chat/ChatToolActivityPresentation.cs:376 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 243f9cff53d8; files: src/OpenClaw.Tray.WinUI/Chat/ChatToolActivityPresentation.cs)
  • Aditya Sharma: Raw commit 7035e83 adds src/OpenClaw.Tray.WinUI/Chat/ChatRunProgressPresentation.cs:19 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 7035e83674b2; files: src/OpenClaw.Tray.WinUI/Chat/ChatRunProgressPresentation.cs)
  • Karen: Raw commit 814e732 adds src/OpenClaw.Tray.WinUI/Chat/ChatRunProgressPresentation.cs:12 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 814e732e2e90; files: src/OpenClaw.Tray.WinUI/Chat/ChatRunProgressPresentation.cs)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Change distribution Production +857/-168; tests +1321/-26; docs +76/-16 Growth covers shared display parsing, headline selection, localized resources, and distinct parser, reducer, transport, rendering, and lifetime regressions.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-25T17:04:59.291Z sha 3859098 :: needs maintainer review before merge. :: [P3] Assert that wrapper collection occurred in the GC regression

Reviewed November 25, 2026, 9:18 PM ET / November 26, 2026, 02:18 UTC (Revision 2).

Keep the existing live-work geometry tolerances and nested disclosure checks. Align the fixture and literal expectations with the reviewed wrapper-owned headline and claw-only ordinary running footer.

Observed the original two CI failures and subsequent stale header-count failures, then passed both exact cases and 77 containing native proofs in Debug and Release. Reviewed independently by GPT-6 Astra and Opus with OpenClaw Atlas assistance.
…ssion

Assert the existing finalizer sentinel before native reacquisition so an unexercised collection scenario cannot pass. Keep COM weak-reference rehydration out of the observation and preserve finally cleanup.

Validated 4 focused cases and 77 native cases in Debug and Release; reviewed with GPT-6 Astra and Opus through OpenClaw Atlas.
@bkudiess

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Addressed the collection-specific P3 and published the requested inspectable proof for head 51438fac7b2e139f76bdae90e19077531dd7435a:

  • Source-pinned synthetic native/app capture package: live wrapper headlines, individual results/nested output, token/time footer, approval state, real Companion app/composer.
  • Direct asserted collection and cleanup trace and final native execution/source facts.
  • The GC regression now asserts the existing finalizer sentinel before reacquisition, rather than using COM-aware WeakReference.TryGetTarget. A collection-unobserved run cannot pass. Failure still executes native-label cleanup in the outer finally.
  • The assertion-bearing exact selection passed4/4; the containing native selection passed77/77 each Debug/Release, with collection True captured in both. Full native build, Shared5981pass/28skip and Tray7009pass;43source hashes and final empty owned process/task inventories verified. Both independent reviews cleared the one-line test amendment.
  • Earlier CI layout failures were attributed to stale hidden-status/header assertions, corrected and validated; subsequent CI45666251993 passed on7afbe726. CI on this new assertion-bearing head is reported separately, not borrowed from that older run.

Only selected synthetic captures and redacted/source-pinned receipts are public; no profiles, credentials or raw private Gateway logs. The retained captures show verified identical production rendering (the new change is one test assertion). The unrelated broad native accessibility limitations remain in the body; draft state is unchanged.

@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Nov 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant