Skip to content

improve: keep image actions inside chat previews - #179699

Merged
vyctorbrzezowski merged 2 commits into
mainfrom
brzezowski/attachment-image-actions
Oct 21, 2026
Merged

vyctorbrzezowski merged 2 commits into
mainfrom
brzezowski/attachment-image-actions

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Chat image actions occupy space beside the preview, and unavailable cards can offer copy/download even after the Gateway confirms that the source cannot be read.

User Impact

Copy and Download sit inside the image's lower-right corner, appearing on hover or keyboard focus and remaining visible on devices without hover. Clicking the image still opens its existing viewer. Unavailable cards have a compact, readable filename/status/cause layout and a pill-shaped Retry control; confirmed unavailable sources have no unusable file menu.

Why This Change Was Made

The existing image-action owner renders the two controls with the same copy/download handlers. The presentation carries the availability result it already knows: a failed thumbnail or an unconfirmed read keeps the existing original-file menu, while a confirmed denial hides it. No new request, backend behavior, clipboard implementation, or viewer owner is introduced.

Removed the external image gutter and obsolete unavailable-title decoration. Production delta: +27 lines; tests: -10; docs: +5. Transcript action underlines are handled separately in #179641.

Evidence

  • 109 unit tests, 51 Chromium browser tests, and 13 existing Control UI E2E scenarios passed. Existing cases were updated; no additional permanent scenario or timer was added.
  • Real Control UI with a simulated Gateway: desktop and 320px, light/dark, resting/hover/focus/touch; original image download bytes; image copy to the clipboard; normal click opens the lightbox; action clicks do not; confirmed missing source omits file actions; Retry progresses through checking to a recovered image.
  • Regression control: reverting the image presentation to the base makes the new confirmed-denial assertion fail because the unusable menu remains; the candidate passes. A failed-preview/original-download scenario still passes.
  • UI types, scoped lint/format/Stylelint, controller guards, docs MDX, and diff checks passed. Independent Codex review found no actionable P0–P2 issues.
  • Risk and coverage: WebKit passed 42/51 cases. The same nine failures reproduce on unchanged base 6a6fa4d: one horizontally clipped-image keyboard-focus assertion and eight corner hit-testing cases, with identical failure names and assertion messages. Their cause remains outside this change's proof; no assertions or baselines were relaxed to hide them. No physical-device or real-Gateway claim.
Measured focused test cost (one worker)
Changed test file Wall time
chat-message.test.tsx 4.08 s
chat-image-loading.browser.test.tsx 4.11 s
markdown-clipboard.browser.test.tsx 3.02 s
managed-image-actions.e2e.test.ts 6.38 s
attachment-file-styles.e2e.test.ts 6.47 s

Measured with the repository test runner and --maxWorkers=1. CI timings pending the first PR run.

State Before After
Desktop, dark, hover Before dark After dark
Desktop, light, hover Before light After light
320px, touch, long filename Before 320px After 320px

Desktop at rest:

Actions hidden at rest

Full transcript context, before and after

Before transcript context

After transcript context

CI repair: preserve the image approval control

CI run 39635135313 exposed an unintended side effect: the compact styling reduced Allow image from its existing 44px minimum height to 30px. The correction gives Allow its own class and restores 44px without changing the approved Retry or Copy/Download layout. The original assertions remain unchanged. Both desktop and mobile cases reproduced the failure before the fix and pass afterward, including the actual approval request and recovered image (6.09s focused suite; failing CI shard: 394.30s). Fresh Codex review found no actionable P0–P2 issues; UI types, formatting and Stylelint passed.

Approval control before correction Approval control after correction
Allow image inadvertently compact Allow image restored to its original target

Final CI qualification

Run 39641265053, attempt 1, tested head a166134cb99daeae71cf066cbc5e0f007d016bb2. All selected E2E, lint, type, security, docs, performance and other jobs passed except UI shard 3 and its aggregate gate. The sole failed case is chat-page-pending-retention.test.ts: “keeps the previous chat mounted without redundant startup through creation and admission.” Before creation begins, it expects “Previous transcript” but sees the provider/model empty state.

This failure is unrelated to the attachment change: the tested merge 2e6219f36adcc64b6b9a87f2923a94faf45fe197 and its main parent 4f1d233068b74e18eeb571496c368af7cde762ad have identical test, page, pane and context fixture blobs. Its history is text-only; it instantiates no changed attachment action. No test modified by this PR runs in the failed shard. The same test blob and failure signature occurred in #179642. The underlying Linux/order cause remains unresolved; the bounded replays documented there did not reproduce or fix it. CI remains failed, and the native attributed-failure landing route retains this limitation.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review October 21, 2026 16:28
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@vyctorbrzezowski
vyctorbrzezowski enabled auto-merge (squash) October 21, 2026 16:36
@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 21, 2026
@vyctorbrzezowski
vyctorbrzezowski merged commit 310cc29 into main Oct 21, 2026
98 of 102 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/attachment-image-actions branch October 21, 2026 17:46
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

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 clawsweeper:intake:feature Preliminary submission classification; full source review pending. docs Improvements or additions to documentation size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant