Skip to content

improve(chat): make tool activity easier to follow - #2120

Merged
bkudiess merged 6 commits into
openclaw:mainfrom
BumpyClock:adityasharma_microsoft/chat-ux-tool-call-fix
Nov 14, 2026
Merged

bkudiess merged 6 commits into
openclaw:mainfrom
BumpyClock:adityasharma_microsoft/chat-ux-tool-call-fix

Conversation

@BumpyClock

@BumpyClock BumpyClock commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

While an agent works, the chat status changes abruptly and can name the wrong phase, so tool activity is hard to follow.

User Impact

User impact: The run footer shows the current status beside the elapsed time, and the status line slides to its next value when the phase changes. Thinking starts collapsed behind a native disclosure.

The footer no longer says "Thinking" after a thought has ended, or "Responding" for an earlier reply preamble while tools run. Thinking and tool titles are quieter 12px text, and the active-work shimmer is quicker.

Why This Change Was Made

The reasoning stream now records which thought is live. A new tool call or changed reply text ends it, so the run label follows the actual phase. A replayed reply snapshot with unchanged text does not end the thought.

The footer swap runs on composition visuals. The old line rises one line height and fades out while the new line rises in from below, in 220 ms, clipped to the row. Layout, focus and the XAML tree do not move, and Windows reduced motion skips the swap.

The thinking disclosure reuses the existing tool-row Expander styling with the native chevron left visible. It adds no new control template.

This replaces an earlier 30-file version of this PR. That version moved the status between rows, used a custom Expander template with height animation, and split replies around interleaved thoughts. Those parts are not included.

Evidence

The build and the required Shared and Tray suites pass. A new reducer test covers the phase label across thinking, a replayed snapshot, a tool call and a reply. The affected mounted UI tests fail exactly the same 12 cases as unchanged main, and no others.

The author reviewed the footer swap and thinking disclosure manually in the chat-interactive Gateway fixture before the final review fixes. A frame-by-frame comparison against a reference recording guided the swap timing and travel. No current-head recording is attached yet.

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

Required proof pools

  • windows-winui-interactive: current-head visual proof of the footer swap and thinking disclosure in Light and Dark. Pending.

Validation

  • .\build.ps1: passed, with NuGet auditing enabled. .\build.ps1 -Project WinUI also passed on the final source.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj: 5865 passed, 28 skipped, 0 failed. The shared source has not changed since this run.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 6497 passed, 0 failed, on the final source.
  • dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-x64 --filter "FullyQualifiedName~ReactorToolActivityProofTests|FullyQualifiedName~ReactorChatLayoutProofTests|FullyQualifiedName~ReactorQuestionProofTests|FullyQualifiedName~ReactorMarkdownReadingRampProofTests": 219 passed, 3 skipped, 12 failed on the final source. The same filter on unchanged main (bf61595e) on this machine also has 12 failures, and the failing tests are the same: ConversationParity_RecoveryReadsTheSavedResultOnlyAfterTheDetailsAction (6), ConversationParity_RetainsSuppliedToolInformationInNativeDisclosures (2), ConversationFeedback_ThinkingToolReviewsAndHistoryRetainComposerWithoutSearch (2), ProductionRoot_AlignsColumnAndKeepsEveryComposerActionReachable(1200) and ReasoningPicker_MenuFocusAndDismissalDoNotCommit. Most fail within 1 ms, so the ConversationFeedback assertions updated here are not exercised locally.
  • Shared autoreview helper: not run, because the shared installation is unavailable on this machine.
  • Independent review (rubber-duck, read-only): one P1 found and fixed. Swap animations left composition opacity and translation on controls that Reactor can reuse, so unmount now resets them. Also fixed: a long status label clipped the elapsed time instead of trimming. Declined: ending thinking on ActivatesTurn: false transcript snapshots, which deliberately do not change the live phase. Deferred: a run fence for ActiveReasoningId when no reasoning stream exists.

Real Behavior Proof

  • Environment tested: Windows 11 x64, local Debug build, isolated app profile.
  • PR head or commit tested: 5656fe3c. The final build, Tray tests and UI tests ran on uncommitted source that was then committed unchanged. This association is recorded manually. The manual fixture observation below used the earlier e8be05f1 source, before the review fixes.
  • Exact steps or command run: .\scripts\run-gateway-fixture.ps1 -AppPath <Debug win-x64 OpenClaw.Tray.WinUI.exe> -Scenario chat-interactive, then agent-activity in the fixture console and a chat message.
  • Evidence after fix: Manual observation by the author. The status line swaps upward between Working, Thinking and Running labels with the elapsed time moving with it, and thinking opens from a collapsed row.
  • Observed result: Matches the intended motion. No recording is attached.
  • Screenshot or artifact links verified? (Yes/No/N/A): N/A. No links are attached.
  • Not verified or blocked: A visual recheck on 5656fe3c, Light and Dark recordings, high contrast, and the shared autoreview helper.

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:

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:

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.

@clawsweeper

clawsweeper Bot commented Nov 11, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T22:55:37.316890Z 02e8605 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Nov 11, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02e8605ca0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. 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. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge.

What this changes

This PR adds animated chat status transitions, collapsible reasoning, and elapsed time beside tool activity.

Example: A read tool finishes while the agent continues working.

  • Before: Elapsed time appears in a separate working row.
  • After: Elapsed time appears beside the completed tool summary until the next phase.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Current-head behavior is unproven, two source-confirmed regressions remain, and the presentation direction is unresolved.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Preference · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: Abrupt chat status changes make ongoing tool activity harder to follow.
Reason: Phase accuracy has clear value, but collapsed reasoning, faster shimmer, and removal of the working claw change an owner-built presentation rather than repair a defined visual failure.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep open: this PR contains distinct status improvements, but needs correctness repairs and an owner decision on the presentation redesign.

Priority: P2
Reviewed head: 02e8605ca0c6f50a8459600167c5da2734764194
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should native chat replace inline reasoning and the working-claw indicator with collapsed reasoning and animated text-only activity headers?
  • Recommendation: Narrow to truthful status fixes: Preserve the established reasoning and working-indicator presentation while addressing phase accuracy through the existing owners.
  • Why: These replace deliberate existing presentation contracts, and the discussion contains no recorded owner approval of this direction.

Before merge

  • Add real behavior proof - The full body and discussion provide no current-head execution evidence for the changed Reactor owners and explicitly mark validation and visual proof pending. Supply current-head Light/Dark screenshots or video with diagnostics showing tool-status handoffs, reasoning disclosure, and inline elapsed placement; redact IPs, keys, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Restrict progress anchoring to the current run (P2) - When an externally started or adopted run begins before its first transcript entry, ChatThinkingEvent activates the turn without appending a row. A completed or interrupted tool from the preceding run can therefore remain last. This Working branch attaches the new clock to that unrelated tool and suppresses the new working footer. Require a current-run or turn match before anchoring and retain the footer otherwise. This confirms the existing inline review discussion.
  • Preserve whole-message targets when splitting assistant text (P2) - With reasoning previews enabled, assistant deltas 'Before ' and 'After' separated by a thought become separate projected assistant entries. BuildAssistantFooter still uses entry.Text for Copy and Read aloud, so the original entry's action now receives only 'After' instead of 'Before After'. The PR body acknowledges this limitation, but no maintainer has accepted the regression. Keep the original entry identity and full action text separate from each displayed fragment, and cover both actions.
  • Explain or restore the original intent of Inline reasoning presentation - 243f9cf: Expose supplied thinking as inline Markdown with the established reading rhythm; the PR does not explain why reasoning should now always start collapsed.

Findings

  • [P2] Restrict progress anchoring to the current run — src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs:431-432
  • [P2] Preserve whole-message targets when splitting assistant text — src/OpenClaw.Tray.WinUI/Chat/ChatReasoningPresentation.cs:102-107

Provenance

  • Inline reasoning presentation changes intended behavior without addressing why it exists (243f9cf: Expose supplied thinking as inline Markdown with the established reading rhythm; the PR does not explain why reasoning should now always start collapsed.)

Tests

  • Low-value test tests/OpenClaw.Tray.Tests/ChatTimelinePresentationTests.cs: Remove the new RunStatusLabel_AnimatesSwapsWithoutAffectingAccessibilityOrReducedMotion source-string test: it pins constants and implementation spelling without exercising those behaviors, which the mounted tests target directly.
  • Missing end-to-end proof: Current-head native execution and a base-fails/head-passes regression result are not supplied for the changed status, reasoning, and message-action paths.
Agent review details

How this fits together

Gateway chat events enter the timeline reducer, then native presentation owners project reasoning, tool groups, status labels, and message actions into Reactor controls.

flowchart LR
  A[Gateway chat events] --> B[Timeline reducer]
  B --> C[Reasoning projection]
  C --> D[Timeline rows]
  D --> E[Tool and reasoning disclosures]
  D --> F[Run progress]
  D --> G[Copy and speech actions]
Loading

Technical review

Best possible solution:

Use the existing reducer and presentation owners to keep status truthful, preserve whole-message actions, and limit the visual change to the direction selected by the chat owner.

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

Current-main source can retain Responding after an assistant preamble followed by completed tool work, and the added parity test describes that sequence; no runtime reproduction was performed.

Is this the best way to solve the issue?

The phase corrections belong in the existing reducer and progress projection, while the broader animation and disclosure redesign needs an owner choice and must preserve message identity.

Full review comments:

  • [P2] Restrict progress anchoring to the current run — src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs:431-432
    When an externally started or adopted run begins before its first transcript entry, ChatThinkingEvent activates the turn without appending a row. A completed or interrupted tool from the preceding run can therefore remain last. This Working branch attaches the new clock to that unrelated tool and suppresses the new working footer. Require a current-run or turn match before anchoring and retain the footer otherwise. This confirms the existing inline review discussion.
    Confidence: 0.99
  • [P2] Preserve whole-message targets when splitting assistant text — src/OpenClaw.Tray.WinUI/Chat/ChatReasoningPresentation.cs:102-107
    With reasoning previews enabled, assistant deltas 'Before ' and 'After' separated by a thought become separate projected assistant entries. BuildAssistantFooter still uses entry.Text for Copy and Read aloud, so the original entry's action now receives only 'After' instead of 'Before After'. The PR body acknowledges this limitation, but no maintainer has accepted the regression. Keep the original entry identity and full action text separate from each displayed fragment, and cover both actions.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2a2370699158.

Provenance checked

  • Compact tool grouping and inspectable details keeps the original intent (aac07ab: Keep tool-heavy conversations scannable while preserving chronology, identity, and selectable input/output.)
  • Live run progress changes intended behavior with a stated reason (814e732: Prevent active chat from appearing frozen and retain visible timing through tool work; this PR proposes quieter inline timing instead.)
  • Synthetic interactive Gateway scenarios keeps the original intent (5ca1513: Exercise interactive chat without competing for a real Gateway; the added tool-group scenario remains inert.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Barbara Kudiess: Raw commit 243f9cf adds src/OpenClaw.Tray.WinUI/Chat/ChatReasoningPresentation.cs:26 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/ChatReasoningPresentation.cs)
  • Caleb Eden: Raw commit aac07ab adds src/OpenClaw.Tray.WinUI/Chat/ToolCallCardRenderer.cs:362 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: aac07abb1fbd; files: src/OpenClaw.Tray.WinUI/Chat/ToolCallCardRenderer.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
Production and test growth Production +1,061/-157 lines; tests and test support +1,831/-69 lines Most growth supports disclosure motion, status handoffs, and mounted lifecycle coverage; its value depends on accepting the presentation redesign.

Labels

Label changes:

  • add P2: Chat status clarity and message actions have limited workflow impact without blocking chat delivery or setup.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: Chat status clarity and message actions have limited workflow impact without blocking chat delivery or setup.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

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.

Reviewed November 11, 2026, 6:41 PM ET / 23:41 UTC.

@bkudiess

Copy link
Copy Markdown
Collaborator

The new animations and smoother transitions look great. One thing I miss is the animated claw as the working indicator. It gives OpenClaw personality and makes it clear that it’s still working. Could we bring that back while keeping the new transitions?

@BumpyClock
BumpyClock force-pushed the adityasharma_microsoft/chat-ux-tool-call-fix branch from b136744 to bf753b9 Compare November 13, 2026 18:11
@BumpyClock

Copy link
Copy Markdown
Contributor Author

The new animations and smoother transitions look great. One thing I miss is the animated claw as the working indicator. It gives OpenClaw personality and makes it clear that it’s still working. Could we bring that back while keeping the new transitions?

Here's the updated animation

ChatUX-toolCalls_Lightmode_claw.mp4

@BumpyClock
BumpyClock force-pushed the adityasharma_microsoft/chat-ux-tool-call-fix branch 3 times, most recently from e8be05f to 5656fe3 Compare November 13, 2026 22:15
Thinking collapses into a quiet native disclosure, activity titles share
one 12px style, and the active-label shimmer is quicker. The run footer
shows the current status beside elapsed time, and a phase change swaps
the line upward on composition visuals.

Run labels stop reporting a finished thought or an earlier reply
preamble as the current phase.

Co-authored-by: Copilot App <[email protected]>
@BumpyClock
BumpyClock force-pushed the adityasharma_microsoft/chat-ux-tool-call-fix branch from 5656fe3 to f58f434 Compare November 13, 2026 22:42
bkudiess and others added 5 commits November 13, 2026 23:44
Keep main's tool-row links and use the PR's 12px activity text for row titles, details and links.

Co-authored-by: Copilot App <[email protected]>
Open the collapsed Thinking disclosure before reading its text, tell width-capped details from trailing status by size, follow main's row-link BuildRowTitle call, and update the chat visual contract for the new thinking, footer swap and shimmer behavior.

Co-authored-by: Copilot App <[email protected]>
…w chevron

A phase change during the run-status swap now continues it: the leaving line keeps its text and the arriving line moves on from its current position instead of snapping back or flashing the skipped label. The leaving line rests hidden between swaps. Thinking uses the tool-row disclosure header with an always-visible leading chevron and keeps its open state in the tool-row expansion store.

Co-authored-by: Copilot App <[email protected]>
…lapse-all

The Gateway's reasoning end event now ends the live thought, and changed text on any reply row (not only the newest) ends it. Saved thoughts shimmer only while they are the reducer's active reasoning row. The thinking disclosure is keyed by the collapse-all version like tool rows, so its chevron and open state reset together.

Found by a dual-model review of the PR.

Co-authored-by: Copilot App <[email protected]>
@bkudiess

Copy link
Copy Markdown
Collaborator

Maintainer update and current-head proof (head 01a4c51).

Maintainer patches pushed to this branch

  • Merged main (kept main's tool-row links with the 12px activity text) and fixed the UI tests that read collapsed Thinking text.
  • Status swap: a phase change during a swap now continues it instead of snapping back or flashing the skipped label; the outgoing line rests hidden between swaps.
  • Thinking uses the tool-row disclosure header (leading chevron, native chevron hidden).
  • From a dual-model review: the Gateway reasoning end event, and changed text on any reply row, now end the live thought; saved thoughts shimmer only while active; collapse-all resets the Thinking disclosure like tool rows. Regression tests fail on the old code and pass now.

Validation (local, Windows 11 ARM64)

  • ./build.ps1: passed.
  • Shared tests: 5890 passed, 29 skipped, 0 failed.
  • Tray tests: 6727 passed, 0 failed.
  • Chat UI proof classes: 240 passed, 4 skipped, 11 failed. The same 11 (Welcome_, CombinedModelTrigger_, ConversationParity height) fail on unchanged main on this host.

Real behavior proof (ConversationFeedback_ThinkingToolReviewsAndHistoryRetainComposerWithoutSearch, 1100px, OPENCLAW_PROOF_THEME)

Collapsed Opened
Light light collapsed light open
Dark dark collapsed dark open

The Light collapsed frame was captured mid status swap (Working to Thinking), so the label is partly clipped with the outgoing line above it. The Dark frames are offscreen RenderTargetBitmap captures without a backdrop, so they look lighter than the live app. A live chat-interactive fixture run also showed the one-line Running exec · 1s footer and the collapsed 12px 1 command · 1 edit group.

Not verified

  • A frame-rate video of the 220 ms swap motion (stills only).
  • High contrast.

@bkudiess
bkudiess merged commit 7035e83 into openclaw:main Nov 14, 2026
29 checks passed
paulcam206 added a commit to paulcam206/openclaw-windows-node that referenced this pull request Nov 16, 2026
Main's chat run progress (openclaw#2120) now always shows the status label beside
the details, so the branding layer no longer needs to swap the label in
when a theme has no working indicator. Keep main's status line and swap
animation, take the indicator glyph from the theme, and start the line at
the edge when there is no glyph. The branding test now checks that the
label stays visible without a glyph.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants