Repository navigation
fix(ui): keep named attachment errors beside the draft - #180319
roboclaw-bot wants to merge 3 commits into
Conversation
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
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThe 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.
Review scores
ProductKind: Preference · Worth it: Yes · Fix scope: Complete 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 Before merge
FindingsNone. Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +209, Tests -29, Docs +12. Total +192 across 17 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 22, 2026, 1:13 AM ET / 05:13 UTC. |
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.
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.
Worked on by