Skip to content

fix(ui): keep named attachment errors beside the draft - #180319

Draft
roboclaw-bot wants to merge 3 commits into
mainfrom
openclaw/a11y-named-attachment-errors
Draft

roboclaw-bot wants to merge 3 commits into
mainfrom
openclaw/a11y-named-attachment-errors

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: failed or rejected composer files lose their names and recovery explanations when a short-lived toast disappears.

User Impact

Chat and New Session keep a named, dismissible explanation for each empty, oversized, or unreadable file. Choose files again reopens the existing picker. Draft text and valid attachments stay intact; failed files are never sent. Keyboard dismissal moves to the next or previous notice, then the editor, without scrolling.

Notices last for the current composer lifetime, not across reload. Video compression retains the retry path from #179007.

Why This Change Was Made

The existing attachment-read owner retains small failure records, not failed File objects or encoded payloads. Admission supplies per-file reasons; the shared preview announces new errors politely. Reselection uses existing upload checks rather than a second retry implementation. Pointer dismissal and asynchronous failures do not request focus.

Requested by Jacqueline Henriksen (@jjjhenriksen).

Evidence

November 4 refresh — prepared locally, source publication blocked

The current-main integration is prepared against 70805b3. It keeps native plain-text paste (retired large-text conversion is not restored), the current lazy English catalog and ChatLazyBoundary, compression retry, admission budgets, cancellation, preserved drafts/files, and keyboard focus recovery. Seven source conflicts were resolved at those owners rather than by choosing one side wholesale.

  • 118 focused unit cases pass across seven files: the aggregate run passed 117 and exposed one obsolete toast assertion; the corrected palette file then passed all 15 cases. No failing test is claimed as a passing run.
  • 8 selected browser cases passed across three files, including ordinary errors, mixed files, compression recovery, cancellation, and focus handling; 14 unrelated cases were filtered out.
  • UI and affected chat/E2E/component/page type shards, scoped lint, styles, i18n, formatting, and exact-admitted-base controller guards pass. The production UI build completed; its output reports advisory aggregate bundle-size overruns, not a failed build. Scoped lint retains existing upstream reactivity warnings.
  • A fresh independent P0–P2 review completed. Its only finding was an INDEX-only stale palette assertion already corrected in the working tree; that correction is now staged. No additional P0–P2 issue was reported. This is a resolved-finding review, not reuse of the former draft-only waiver.
  • Existing hosted checks apply only to published head 25c7fa7: 5 passed and 50 skipped/neutral when inspected, with no applicable failing job. They are not broad validation of the prepared refresh.

Publication blocker: the Gateway-managed source update refused because the requester lacks full operator write authority for workflow changes carried by the admitted main refresh. The feature diff contains no workflow edits, and all 122 tracked workflow files match that admitted base. A maintainer with full operator write authority must publish this saved update through the existing publication owner. The PR remains a draft at its previous head; readiness has not been changed.

Previously published implementation

The published source was validated with 129 unit tests and 10 selected browser cases. Its old chat-test type error was inherited from the then-admitted base; the refreshed chat-test type shard now passes. Synthetic Mock Gateway fixtures exercise the actual UI; controlled FileReader errors and Chromium mobile emulation are not physical-device proof.

Before and after

Same synthetic mixed-file selection, desktop dark Chat, after the former toast timeout. The valid file and draft are preserved; failures remain named and actionable. The later keyboard-focus repair does not change this appearance.

Before After
Before: failed filenames disappear after the toast expires After: named error explanations, dismissal and reselection remain beside the draft

Worked on by

roboclaw-bot and others added 3 commits October 22, 2026 03:22
Co-authored-by: jjjhenriksen <179184921+jjjhenriksen@users.noreply.github.com>
Co-authored-by: jjjhenriksen <179184921+jjjhenriksen@users.noreply.github.com>
Worked on by:
- @jjjhenriksen

Co-authored-by: jjjhenriksen <179184921+jjjhenriksen@users.noreply.github.com>
OpenClaw-Publication: be06e100-db09-4b9d-a8cb-73b2c6924d33
@clawsweeper

clawsweeper Bot commented Oct 22, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: L labels Oct 22, 2026
@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. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary 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-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

The PR keeps named, dismissible attachment errors beside Chat and New Session drafts and provides a file-reselection action.

Example: Select kept.txt, empty.txt, large.txt, and unreadable.txt with a 1,024-byte attachment limit.

  • Before: After the toast expires, the rejected filenames and recovery explanations disappear.
  • After: Each failed file retains its explanation and Dismiss action beside the draft, while kept.txt remains attached.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused presentation change with direct visual evidence, preserved lifecycle ownership, and no identified runtime defect; draft and conflict status still prevent landing.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected browser screenshots exercise the changed composer renderer with synthetic mixed files and show persistent named notices after the former timeout; the Mock Gateway is appropriate for this local presentation behavior, while reported keyboard and reselection checks are supporting test evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Users lose rejected filenames and recovery guidance when attachment-error toasts disappear.
Reason: The prior toast behavior was intentional, but this collaborator-authored PR supplies owner direction for persistent notices and an accessible recovery action.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: it provides useful, owner-directed recovery feedback, and no concrete runtime defect was found in the introduced changes.

Priority: P2
Reviewed head: 25c7fa790d8c7603a967413886ecd0b92651c226

Before merge

  • Complete next step - Resolve GitHub's reported merge conflict while preserving compression retry, validate the affected integration, and remove private work-session links from the public description.

Findings

None.

Agent review details

How this fits together

The Control UI attachment admission and read lifecycle accepts selected or pasted files, publishes readable payloads to the draft, and now publishes lightweight failure notices to the shared composer renderer.

flowchart TD
  A[File selection or paste] --> B[Attachment admission]
  B --> C[Attachment read lifecycle]
  B --> D[Named failure notices]
  C --> D
  C --> E[Ready draft attachments]
  D --> F[Shared composer preview]
  E --> F
  F --> G[Dismiss or choose files again]
Loading

Technical review

Best possible solution:

Keep lightweight notices in the existing attachment-read owner and use the existing picker, admission checks, and compression retry path.

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

Current-main admission and read failures use transient toasts, and the supplied before screenshot shows the missing filenames after expiry; no reproduction was executed during this read-only review.

Is this the best way to solve the issue?

The change uses the existing lifecycle and renderer without another payload store or retry implementation, making it a focused way to deliver the approved presentation change.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Ordinary attachment failure feedback changes intended behavior with a stated reason (aeae6d1: Remove unusable cards and duplicate errors while preserving the draft and reporting failure once through a toast.)
  • Compression failure and retry keeps the original intent (7b50075: Keep recoverable compression failures in their existing attachment slot with inline retry and batch-budget checks.)
  • Shared Solid attachment rendering keeps the original intent (a423f19: Give attachment rendering one Solid implementation while retaining the plain TypeScript domain owners and existing interaction contracts.)
  • Attachment batch admission keeps the original intent (d3c2174: Reject attachments before sending when their combined payload exceeds one frame, preserving other attachments and draft text.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 7b50075 adds ui/src/pages/chat/components/chat-attachment-reads.ts:171 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7b50075c2dd6; files: ui/src/pages/chat/components/chat-attachment-reads.ts)

PR surface

Source +209, Tests -29, Docs +12. Total +192 across 17 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 10 236 27 +209
Tests 6 184 213 -29
Docs 1 12 0 +12
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 17 432 240 +192

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Persistent file-specific recovery feedback improves a recoverable attachment workflow with limited blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • 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 22, 2026, 1:13 AM ET / 05:13 UTC.

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

app: web-ui App: web-ui docs Improvements or additions to documentation 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

1 participant