Skip to content

fix: show agent avatars with streamed responses - #186044

Merged
vyctorbrzezowski merged 1 commit into
mainfrom
brzezowski/chat-streaming-avatar
Oct 28, 2026
Merged

vyctorbrzezowski merged 1 commit into
mainfrom
brzezowski/chat-streaming-avatar

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Fixes #186026.

What Problem This Solves

Agent avatars appear only after streamed replies finish, although the response text is already visible and the identity is known.

User Impact

The existing agent avatar appears with the first streamed text. Text continues immediately and uses the same identity and image-loading behavior.

Why This Change Was Made

A live run frame starts with no finalized messages. An empty list passed the voice-transcript-only check and suppressed its avatar. Require a nonempty list for that check, preserving genuine voice-only groups.

The change adds one production guard and extends the existing streaming test. There are no new test cases, presentation state, identity requests, or caches.

Evidence

  • All 8 streaming E2E cases and 13 message-group unit cases pass; the streaming regression is red on the base. UI/chat-E2E types, lint, formatting, and diff checks pass.
  • Exact-head CI 40526123739 passed, including openclaw/ci-gate.
  • Fresh canonical autoreview of 43dc38e6..e384668b is scoped-clean for P0–P2. Local ClawSweeper was unavailable; its existing hosted review of this exact head also found no code issues.

Real Gateway verification

Reproduced with an isolated real Gateway and live model. The frontend baseline is current main at 591b7795fe8; the comparison uses that same tree with only this PR's production guard. The Gateway was unchanged between runs.

The cold case held delivery of the real agent.identity.get response until the first streamed text was visible. The warm case reused the delivered identity. Chat frames and identity payloads were forwarded unchanged; no DOM or styling was injected.

Scenario Main: avatar visible during streaming With the fix
Identity response still pending at first text 0 / 616 sampled frames 588 / 588, including first text
Identity already loaded 0 / 736 sampled frames 644 / 644, including first text

The first text appeared while the identity response was still held. The existing fallback appeared immediately with the fix; text continued normally when identity was released and through completion. These runs verify ordering, not model response speed.

Before After
Real streamed reply before the fix Real streamed reply with its agent avatar

The recordings below show the cold case before, then after, at original speed. The identical crop removes unrelated account and model controls. Wording varies between the real model turns.

before-real-streaming.mp4
after-real-streaming.mp4
Earlier mocked-Gateway regression proof

The first streamed text, with the same message and viewport. Before, the avatar appears only after the response finishes; afterward it is present from the first text while streaming continues. Mocked Gateway, real Control UI renderer.

Before After
First streamed text before the avatar fix First streamed text with the agent avatar

Real-time recordings, before then after.

186044-before.mp4
186044-after.mp4

@vyctorbrzezowski vyctorbrzezowski self-assigned this Oct 27, 2026
@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
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.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review October 27, 2026 14:57
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. 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-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 27, 2026
@clawsweeper

clawsweeper Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Require a nonempty message list before suppressing a group's avatar as a voice-only transcript.

Example: An avatar-enabled agent:main:main conversation streams “The streamed response is now visible.” before finalization.

  • Before: The response text appears without the assistant avatar.
  • After: The existing assistant avatar appears alongside the streamed text.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused patch appears correct, but the required visual evidence remains unavailable for inspection.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An agent's known avatar disappears while its response streams and appears only after completion.
Reason: The maintainer-authored direction restores an existing identity contract with a narrow correction and a focused regression assertion.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR makes a focused correction to a current-main avatar bug, with no actionable code findings.

Priority: P2
Reviewed head: e384668b59d896486f7de13d63b2df6f34ea4763

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Attach the retained before/after browser screenshots showing the avatar with the first streamed text; the body reports red/green regression results, but no inspectable execution artifact is linked.
Agent review details

How this fits together

The Control UI turns Gateway chat events into run frames; message-group classification determines whether those frames render their existing agent identity.

flowchart LR
  A[Gateway chat events] --> B[Transcript grouping]
  B --> C[Agent run frame]
  C --> D[Message group classification]
  D --> E[Avatar rendering]
  C --> F[Streaming text]
Loading

Technical review

Best possible solution:

Keep this nonempty-list correction in the existing classification owner while preserving voice-only suppression and avatar placement.

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

Current source establishes the complete failure path from a stream-only frame's empty message list to avatar suppression; this review executed no product code.

Is this the best way to solve the issue?

The guard repairs the classification at its existing owner without new state, identity requests, loading delays, or changes to genuine voice transcripts.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Provider-owned voice-transcript presentation keeps the original intent (60ae44b: Separate native Talk speech from canonical completed answers without deleting either record.)
  • Existing streaming telemetry regression keeps the original intent (9d1d2ed: Consolidate low-value test scaffolding while retaining distinct lifecycle and ordering behavior.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +1, Tests +3. Total +4 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 2 1 +1
Tests 1 4 1 +3
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 6 2 +4

Labels

Label changes:

  • add P2: Missing identity during an otherwise functioning streamed reply is a limited presentation defect.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Missing identity during an otherwise functioning streamed reply is a limited presentation defect.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Attach the retained before/after streaming screenshots for visual review.

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 October 27, 2026, 11:11 AM ET / 15:11 UTC.

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Real Gateway verification

Reproduced with an isolated real Gateway and live model. The frontend baseline is current main at 591b7795fe8; the comparison uses that same tree with only this PR's production guard. The Gateway was unchanged between runs.

The cold case held delivery of the real agent.identity.get response until the first streamed text was visible. The warm case reused the delivered identity. Chat frames and identity payloads were forwarded unchanged; no DOM or styling was injected.

Scenario Main: avatar visible during streaming With the fix
Identity response still pending at first text 0 / 616 sampled frames 588 / 588, including first text
Identity already loaded 0 / 736 sampled frames 644 / 644, including first text

The first text appeared while the identity response was still held. The existing fallback appeared immediately with the fix; text continued normally when identity was released and through completion. These runs verify ordering, not model response speed.

Before After
Real streamed reply before the fix Real streamed reply with its agent avatar

The recordings below show the cold case before, then after, at original speed. The identical crop removes unrelated account and model controls. Wording varies between the real model turns.

before-real-streaming.mp4
after-real-streaming.mp4

@vyctorbrzezowski
vyctorbrzezowski merged commit ca305f7 into main Oct 28, 2026
172 of 174 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/chat-streaming-avatar branch October 28, 2026 00:25
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

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

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS 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.

Agent avatar is missing until a streamed reply finishes

1 participant