Skip to content

fix(ui): streamed chat replies lose the agent avatar - #186501

Closed
freeqaz wants to merge 1 commit into
mainfrom
fix/ui-e2e-worked-chunks
Closed

freeqaz wants to merge 1 commit into
mainfrom
fix/ui-e2e-worked-chunks

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Related: #183267, #186044, #186290

What Problem This Solves

Fixes: a streamed assistant reply in Control UI chat renders without the agent avatar while it streams, and checks-ui-e2e on main fails in four files whenever the UI e2e lane is selected (scheduled runs since fdeb8f7efd).

User Impact

User impact: streamed replies show the agent avatar again, as #186044 intended. The Control UI e2e lane is green on main again for these files (the prompt height-cap failure was already fixed by #186409).

Why This Change Was Made

  • Product fix (avatar). fix: show agent avatars with streamed responses #186044 guarded isTurnBlock so a run frame that only holds a live stream (empty messages) keeps its identity. fix(ui): chat hides narration after a run finishes #183267 merged right after it and added group.messages.every(presentationOwnsFooter === false), which is true for an empty list, so the live frame became a turn block again and lost its avatar. The non-empty guard now covers both every() checks. chat-flow.streaming "keeps the pending telemetry row stable through acknowledgement and streaming" is the regression test (unchanged; red on main, green here).
  • Stale tests after fix(ui): chat hides narration after a run finishes #183267 (in-place, untimed Worked chunks; narration stays visible; the turn recap owns the run's duration, per the updated docs/web/control-ui/chat.md):
    • chat-run-lifecycle: the 13 s duration that excludes the failed turn's idle time is now asserted on the recap ("Done in 13 seconds"), including after a later run's lifecycle row and after reload; the work label is "Worked".
    • chat-cold-load-anchor: the cached first frames must show the recap's "Done in 3 minutes" instead of "Worked for 3 minutes".
    • chat-collapsed-reply-reveal: earlier narration is no longer folded, so the test asserts it stays visible and that every tool chunk stays collapsed (several chunks in the deep case) before and after replying through search. The reply-reveal, highlight, scroll and request assertions are unchanged.
  • Stale test after fix: keep dictation settings from changing the chat model #186290: browser-dictation-status now expects Dictation Configure to open /settings/talk, not model setup.

Evidence

On a remote Ubuntu test VM (Node 24.22.1, Chromium headless shell 1248, --maxWorkers 2, private network namespace), running
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner on the five affected files plus new-session-page.cloud-startup:

Tree Result
main 228596060e3 7 failed / 30 passed: the same assertions as main CI ('Worked' to be 'Worked for 13 seconds', null not to be null avatar, strict-mode 6 .chat-work-group button, Worked for 3 minutes timeout, /settings/talk vs /settings/model-providers)
this branch 6 files / 42 tests passed, 3 of 3 repeats

Failures were collected from main scheduled runs 40615065526 (fdeb8f7efd) and 40621333872 (dafda2f722); b1844ddb1d (run 40611224841) had only the dictation and prompt-height failures, which bounds the chunk breakage to #183267 / #186323, and #186323 has no UI rendering changes.

Also: oxfmt --check and oxlint on touched files, tsgo -p tsconfig.ui.json, and the related unit files (chat-message-group.solid, chat-transcript-duration, chat-thread; 118 tests) pass.

Gap: no new screenshots. The avatar change restores #186044's reviewed output rather than introducing a new visual, and the streaming e2e asserts the avatar element.

Restore the non-empty guard that #186044 added for live stream frames,
which #183267 bypassed with a new every() check on an empty message list.
Align UI e2e tests with the intended behavior of #183267 (untimed Worked
chunks, narration inline, recap owns run duration) and #186290 (Dictation
Configure opens Talk settings).
@clawsweeper

clawsweeper Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@freeqaz

freeqaz commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug 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. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 28, 2026
@clawsweeper

clawsweeper Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

Restore avatars on empty streaming frames and update browser expectations for narration, run timing, and dictation settings.

Example: The assistant starts streaming “The streamed response is now visible.” before any finalized message exists.

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

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A minimal, source-verified restoration with reusable shipped-entry-point visual proof and no actionable introduced defects; merge conflict and overlapping work remain workflow concerns.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Reusable proof from #186499 exercises the equivalent guard on the same base through an isolated real Gateway and Control UI with Ollama qwen2.5:7b; inspected before/after screenshots show the avatar restored at first streamed text, with both turns reported complete without browser errors.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: The agent avatar disappears while a reply streams, and browser expectations still describe superseded narration, timing, and dictation behavior.
Reason: The change restores an established avatar contract and aligns existing tests with verified owner decisions; the maintainer-authored direction needs no additional product approval.

Regression provenance

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

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: it fixes a current streamed-avatar regression and preserves distinct browser-test repairs; no introduced defect was found, although the avatar fix overlaps #186499.

Priority: P2
Reviewed head: dc68246f56d4f47e8bc7ac3b64a5e8cc0a458379

Before merge

Findings

None.

Agent review details

How this fits together

The Control UI projects Gateway history and streaming events into message groups; the frame preparation owner determines their avatar, footer, and turn-block presentation.

flowchart TD
  A[Gateway history and stream events] --> B[Agent run grouping]
  B --> C[Run frame shell]
  C --> D[Message frame preparation]
  D --> E[Avatar and footer visibility]
  E --> F[Control UI transcript]
Loading

Technical review

Best possible solution:

Land one shared avatar guard while preserving this PR’s distinct browser repairs and the existing narration, timing, and voice-only behavior.

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

The real run-frame producer supplies messages=[], and current main’s unguarded every predicate suppresses its avatar; the existing browser assertion and equivalent sibling’s inspected before capture corroborate the path without executing target code during this review.

Is this the best way to solve the issue?

The shared nonempty guard is the smallest complete production repair, and the browser updates follow documented owner decisions without adding state, weakening source-navigation checks, or duplicating regression scaffolding.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Streaming frame identity keeps the original intent (ca305f7: Require actual messages before declaring a frame voice-only so the first streamed text retains its avatar.)
  • Footer ownership and narration keeps the original intent (e7f0546: Presentation fragments without footer ownership remain turn blocks; the repair preserves that rule for populated groups while excluding empty streaming shells.)
  • Browser narration and duration expectations changes intended behavior with a stated reason (25f6775: Earlier tests retained duration in a Worked disclosure; the later merged narration contract deliberately moved whole-turn timing to the recap and kept narration visible.)
  • Dictation settings destination keeps the original intent (340b8a7: Dictation Configure opens the existing Talk settings owner to avoid entering chat-model activation.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +1, Tests +27. Total +28 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 4 3 +1
Tests 4 45 18 +27
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 49 21 +28

Labels

Label changes:

  • add P2: Missing streaming avatars and stale browser expectations warrant a focused repair, while response text and agent execution remain usable.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Missing streaming avatars and stale browser expectations warrant a focused repair, while response text and agent execution remain usable.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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:47 PM ET / October 28, 2026, 03:47 UTC.

@freeqaz

freeqaz commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

Superseded: main now carries all of this. The streaming-avatar guard landed in #186499 (859320f), the narration/final-recap e2e expectations in 8c05667, and the dictation Talk-settings expectation in 8ee32a2. Merging main into this branch leaves an empty diff, so closing.

@freeqaz freeqaz closed this Oct 28, 2026
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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S 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