Skip to content

fix(webchat): announce attachment failures before long replies - #132102

Merged
steipete merged 1 commit into
mainfrom
codex/qa-attachment-announcement-20260828
Aug 28, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa-attachment-announcement-20260828

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users relying on the Control UI's live announcements would hear only the reply prose when a long assistant answer also contained a failed attachment. The visible attachment card correctly said the file was not sent, but the bounded announcement could omit that outcome entirely.

Why This Change Was Made

The canonical announcement composer now places the named, actionable attachment failure before ordinary reply text. Ordinary, active and completed-run rows share that owner, so the fix is a single ordering change with no extra state, fallback or configuration. The existing 500 UTF-16-unit cap, surrogate-safe truncation, quiet initial history and stable-message deduplication remain intact.

Production LOC: +1/-1 (net 0). Tests cover all three row paths plus the production-bundle browser flow. No layout, Gateway protocol, provider, delivery or persistence behavior changes.

Provenance: the prose-first composition was introduced in #131826 (merge 8bd8958, 2026-08-28). Code author, PR author and merger: @vyctorbrzezowski. This repair preserves that PR's named failure cards. Separate pipeline-stage work in #131812 is unaffected.

User Impact

Failed files are announced with their name, failure status and actionable reason even beside a long answer. Ordinary answer text still uses the remaining announcement budget. This is the release-note context for the fix.

Evidence

Completed proof: all 310 chat-view tests; two focused attachment-rendering/normalization siblings; two Chromium E2E cases; the full three-path changed-file gate (including core-test/UI typechecking, lint, i18n and repository-wide guards); and an independent Codex review with no actionable findings.

The regression fails on the original composer in all three row paths. The real Chromium app with a mocked Gateway also fails before the fix for ordinary delivery and a completed composer-initiated run: the visible card is correct, but the 500-character live region contains only prose. After the repair, the live region starts with missing.pdf: Not sent. File not found. Check the path and try again. while staying within the same cap.

Browser proof observes the actual polite, atomic live-region DOM; it does not claim a real screen reader spoke the text or a live model/provider delivered a file. The signed-in Chrome relay is disconnected, so the browser proof uses isolated Chromium and synthetic fixtures.

The Vitest browser runs passed both assertions but emitted a slow-fork-shutdown warning. A separate recorded production-bundle run passed both flows and verified clean Chromium exit, closed owned port and removed temporary build directory. The warning remains a test-runner follow-up, not a product-failure claim. The first changed gate caught a test-library mismatch and a missing UI dependency link in the isolated checkout; both were corrected without changing dependencies, and the complete gate then passed.

Before (visible card already correct; live-region text omitted the failure):

Before: attachment card beside long reply

After (same visual layout; live-region text now begins with the failure):

After: unchanged attachment card with corrected announcement

Recorded composer-to-final flow (synthetic fixtures, unchanged visual layout):

attachment-announcement-completed.mp4

@steipete steipete self-assigned this Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 28, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 5:44 PM ET / 21:44 UTC.

ClawSweeper review

What this changes

The PR changes Control UI live announcements to place a named attachment failure before a long assistant reply, with unit and mocked-Gateway browser coverage.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep this member-authored, maintainer-labeled PR open for normal maintainer handling. The one-line owner-boundary repair correctly preserves attachment-failure visibility under the existing announcement cap; no actionable defect was found.

Priority: P2
Reviewed head: b3bf654abcc59a2a75f0b5f56b6bc9cb0011293c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-neutral fix at the canonical composer with meaningful boundary coverage and no supported correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate is not applicable because the supplied repository state identifies this as a member-authored PR. The body contains claimed after-fix Chromium/mock-Gateway evidence, but the attachment media could not be independently retrieved in this review environment.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate is not applicable because the supplied repository state identifies this as a member-authored PR. The body contains claimed after-fix Chromium/mock-Gateway evidence, but the attachment media could not be independently retrieved in this review environment.
Evidence reviewed 6 items Introduced owner-boundary repair: The introduced hunk places the typed attachment-failure receipt before ordinary extracted prose; truncation remains downstream and unchanged.
Current-main premise: The PR base still composes prose before failure text, so a long reply can consume the 500-unit announcement budget before the failure is reached.
Caller and rendered output: Transcript projection supplies the computed announcement to the controller, which only announces a new key; the chat thread renders it as an atomic polite status region.
Findings None None.
Security None None.

How this fits together

Control UI projects Gateway history and chat events into transcript rows, then composes a bounded polite live-region announcement for assistive technology. This change affects the ordering of a typed attachment failure and reply prose before the existing 500-unit cap is applied.

flowchart LR
A[Gateway history and chat events] --> B[Control UI transcript projection]
B --> C[Announcement composer]
C --> D[500-unit safe truncation]
D --> E[Polite screen-reader live region]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +157. Total +157 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 2 254 97 +157
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 255 98 +157

Review metrics

Metric Value Why it matters
Production versus test delta production +1/-1 (net 0); tests +254/-97 The functional change is a net-neutral ordering repair; the remaining diff is focused regression and browser coverage.

Root-cause cluster

Relationship: canonical
Canonical: #132102
Summary: This PR is the focused repair for capped Control UI announcements; the related items cover predecessor failure cards or distinct surfaces.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Retain the shared failure-first composition and merge it after normal exact-head checks and maintainer review complete.

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

Yes, from source: current main composes reply prose before attachment failure text and then truncates the combined result at 500 UTF-16 units; the introduced tests exercise the failing long-reply paths.

Is this the best way to solve the issue?

Yes. The shared composer is the narrow owner for all affected row forms, and reordering its two existing inputs preserves the cap, initial-history silence, and key-based deduplication.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5b605da38946.

Labels

Label justifications:

  • P2: This repairs bounded accessibility feedback in the Control UI without affecting delivery, configuration, or persisted state.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate is not applicable because the supplied repository state identifies this as a member-authored PR. The body contains claimed after-fix Chromium/mock-Gateway evidence, but the attachment media could not be independently retrieved in this review environment.

Evidence

What I checked:

Likely related people:

  • vyctorbrzezowski: Authored the merged typed attachment-failure and announcement behavior that this repair adjusts. (role: merged feature contributor; confidence: high; commits: 8bd895862d13; files: ui/src/pages/chat/components/chat-transcript-announcement.ts)
  • steipete: Authored the current owner-local repair and has prior history on the announcement path. (role: recent announcement-area contributor; confidence: medium; commits: b3bf654abcc5; files: ui/src/pages/chat/components/chat-transcript-announcement.ts)

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 (1 earlier review cycle)
  • reviewed 2026-08-28T21:05:33.120Z sha d97efacfcd543e5f411283122089218d7aed5d97 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/qa-attachment-announcement-20260828 branch from d97efac to b3bf654 Compare August 28, 2026 21:35
@steipete
steipete merged commit 15046d3 into main Aug 28, 2026
153 checks passed
@steipete
steipete deleted the codex/qa-attachment-announcement-20260828 branch August 28, 2026 21:55
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 29, 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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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