Skip to content

feat(ui): paste images into command-palette sessions - #153238

Merged
roboclaw-bot merged 6 commits into
mainfrom
openclaw/image-attachment-preview-for-mini-composer
Sep 20, 2026
Merged

roboclaw-bot merged 6 commits into
mainfrom
openclaw/image-attachment-preview-for-mini-composer

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The Cmd/Ctrl+K new-session composer cannot include a pasted screenshot when starting a task.

User Impact

Paste images into the palette and start a background session with Cmd/Ctrl+Enter, with or without text. Images use the main composer's small removable thumbnails below the fixed input and actions—no upload button, filenames, attachment counter, or extra helper text.

Why This Change Was Made

Reuse the existing attachment reader, thumbnail renderer, and session-creation flow. Keep the foreground conversation and draft untouched, retain images when creation fails, and discard unsent images on ordinary dismissal. A cold-loading palette retains pasted files and hands them over once; thumbnails appear when the full palette has loaded. The rebase preserves main’s compact mode for long prompts.

Evidence

  • Final candidate: 84 focused tests pass (31 UI +53 performance-owner tests). Node24 startup performance passes: 365,068 B against the 365,488 B enforcement limit. The five feature commits are patch-identical after main integration; hosted CI is tracked on the final head.

  • The input, New session, and settings anchors remain fixed through image paste/removal. The earlier layout moved the controls down 80 CSS pixels in the recorded desktop flow; the revised flow moves them 0 pixels.

  • 163 unit tests / 11 suites and 16 retained Chromium E2E cases passed. Geometry regression covers desktop/narrow widths and empty, short, and multiline prompts. Six temporary capture cases were also run for the gallery, then removed from the source tree.

  • Scoped type/lint/style/format/i18n and dead-export checks passed. Fresh independent autoreview found no actionable P0–P2 findings.

  • 40 inspected screenshots, including before/after and dark/light/narrow states. Actual Control UI with synthetic Gateway data; no generated mockups or live provider claims.

Test and dead-code audit
  • Moved the screenshot storyboard and miniature-image painting out of CI; retained two focused anchor regressions and one real request/retry flow.
  • Removed duplicate ordering/retry coverage, structure-only assertions, a hidden-text TreeWalker, and a redundant mocked custody parameter axis.
  • Strengthened cold-submit coverage with nonempty text, a valid admitted subset plus a rejected image, and exact success payloads. Kept ownership, cancellation, failed-read recovery, and rejected-turn isolation.
  • Removed the generic input attachment slot and a redundant read-abort. No substantial dead production implementation was found; the shared fixture and responsive CSS variables have real callers.
  • PR diff: +946 / −193, net +753. The startup follow-up keeps the cold loader File-only and returns the loaded-composer parser to its existing owner.

Startup budget

The landing continuation authorizes a bounded declared-cap increase from356KiB to356.5KiB (+512B), with the measured baseline recorded at364,912B. The512B growth and64B build-variance allowances and all behavioral assertions are unchanged.

Current-layout stress video

39-second real recording with a fixed camera: one image,12images, horizontal scrolling, a520-character multiline prompt, settings, and removal through the last image.

current-ui-stress.mp4

Six inspected stress screenshots and verification details. All six images decode/render on GitHub, and the embedded video was played successfully.

Before: image paste was ignored

Before: no thumbnail after pasting an image

desktop dark

Empty

desktop-dark: Empty

Short text

desktop-dark: Short text

Long text

desktop-dark: Long text

One image only

desktop-dark: One image only

Short text and image

desktop-dark: Short text and image

Long text and images

desktop-dark: Long text and images

Multiple images only

desktop-dark: Multiple images only

Remove control on hover

desktop-dark: Remove control on hover

Last image removed

desktop-dark: Last image removed

Many images: overflow at start

desktop-dark: Many images: overflow at start

Many images: scrolled to end

desktop-dark: Many images: scrolled to end

desktop light

Empty

desktop-light: Empty

Short text

desktop-light: Short text

Long text

desktop-light: Long text

One image only

desktop-light: One image only

Short text and image

desktop-light: Short text and image

Long text and images

desktop-light: Long text and images

Multiple images only

desktop-light: Multiple images only

Remove control on hover

desktop-light: Remove control on hover

Last image removed

desktop-light: Last image removed

Many images: overflow at start

desktop-light: Many images: overflow at start

Many images: scrolled to end

desktop-light: Many images: scrolled to end

narrow dark

Empty

narrow-dark: Empty

Short text

narrow-dark: Short text

Long text

narrow-dark: Long text

One image only

narrow-dark: One image only

Short text and image

narrow-dark: Short text and image

Long text and images

narrow-dark: Long text and images

Multiple images only

narrow-dark: Multiple images only

Remove control on hover

narrow-dark: Remove control on hover

Last image removed

narrow-dark: Last image removed

Many images: overflow at start

narrow-dark: Many images: overflow at start

Many images: scrolled to end

narrow-dark: Many images: scrolled to end

submission image only

Submitting

submission-image-only: Submitting

Creation failure retains images

submission-image-only: Creation failure retains images

submission text images

Submitting

submission-text-images: Submitting

Creation failure retains images

submission-text-images: Creation failure retains images

reading

Image preparation pending

reading: Image preparation pending

Image read failure

reading: Image read failure

Worked on by

Work sessions


View the OpenClaw team session

@clawsweeper

clawsweeper Bot commented Sep 19, 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: XL maintainer Maintainer-authored PR labels Sep 19, 2026
@clawsweeper clawsweeper Bot added 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: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 19, 2026
@clawsweeper

clawsweeper Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 20, 2026, 2:02 PM ET / 18:02 UTC (Revision 6).

ClawSweeper review

What this changes

Adds pasted-image previews and image-only background session creation to the command palette, including loading handoff and failed-submission recovery.

Merge readiness

✅ Ready for maintainer review

This remains a useful, distinct enhancement absent from current main. No blocking correctness or security findings were identified.

Priority: P2
Reviewed head: d65edb6873a5ca521695f6c1ba7b2a84f27c0aed

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful visual proof and focused lifecycle coverage support a coherent implementation with no identified blocking defect.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots from the actual Control UI with synthetic Gateway data show palette image previews, narrow-screen behavior, and retained images after creation failure; request/retry tests supplement that visual proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after screenshots from the actual Control UI with synthetic Gateway data show palette image previews, narrow-screen behavior, and retained images after creation failure; request/retry tests supplement that visual proof.
Evidence reviewed 9 items Introduced change and merge ownership: Reviewed the pinned merge-base-to-head hunks. The test merge has the recorded base followed by the exact PR head as parents; its changes exclude the unrelated transcript work present in endpoint drift.
Still necessary on current main: Current main still requires nonempty text for palette submission and has no palette image intake. The earlier background-session feature is merged, but does not implement this image capability. The palette draft module is absent from the supplied latest release tree.
Shared attachment ownership: Palette intake delegates to existing attachment admission, reading, and preview owners. Cold submission waits for successful preparation, suppresses automatic submission after partial admission, and retires its intent on dismissal or invalidation.
Findings None None.
Security None None.

How this fits together

The Control UI command palette starts background tasks without leaving the current conversation. Clipboard images pass through the shared composer attachment controls into the existing Gateway session-creation flow.

flowchart TD
  A[Clipboard images and optional text] --> B[Command palette]
  B --> C[Shared attachment admission and reading]
  C --> D[Removable previews]
  D --> E[Existing session creation]
  E --> F[Background session]
  E --> G[Retained draft on failure]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +160, Tests +588, Docs +5, Other 0. Total +753 across 20 files.

View PR surface stats
Area Files Added Removed Net
Source 11 215 55 +160
Tests 6 725 137 +588
Docs 1 6 1 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 2 4 4 0
Total 20 950 197 +753

Review metrics

Metric Value Why it matters
Production versus test growth Production +160 net lines; tests/support +588 net lines Production growth implements image custody and recovery using existing shared owners; tests exercise lifecycle and request boundaries.
Startup budget Declared cap +512 B; reported enforcement headroom 420 B The bounded increase is documented in the PR, with existing growth and variance allowances preserved.

Technical review

Best possible solution:

Keep image intake, previews, and recovery with the shared composer owners while preserving palette-local drafts and the foreground conversation.

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

Not applicable as a bug reproduction: this adds a capability, and current-main source confirms the palette remains text-only.

Is this the best way to solve the issue?

Yes. Extending the existing palette draft through shared attachment and session owners avoids a competing upload or creation flow.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9d150631709a.

Labels

Label justifications:

  • P2: This is a bounded usability improvement to starting image-based tasks from the command palette.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after screenshots from the actual Control UI with synthetic Gateway data show palette image previews, narrow-screen behavior, and retained images after creation failure; request/retry tests supplement that visual proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after screenshots from the actual Control UI with synthetic Gateway data show palette image previews, narrow-screen behavior, and retained images after creation failure; request/retry tests supplement that visual proof.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after screenshots from the actual Control UI with synthetic Gateway data show palette image previews, narrow-screen behavior, and retained images after creation failure; request/retry tests supplement that visual proof.

Evidence

What I checked:

  • Introduced change and merge ownership: Reviewed the pinned merge-base-to-head hunks. The test merge has the recorded base followed by the exact PR head as parents; its changes exclude the unrelated transcript work present in endpoint drift. (d65edb6873a5)
  • Still necessary on current main: Current main still requires nonempty text for palette submission and has no palette image intake. The earlier background-session feature is merged, but does not implement this image capability. The palette draft module is absent from the supplied latest release tree. (ui/src/pages/new-session/palette-session-draft.ts:90, 9d150631709a)
  • Shared attachment ownership: Palette intake delegates to existing attachment admission, reading, and preview owners. Cold submission waits for successful preparation, suppresses automatic submission after partial admission, and retires its intent on dismissal or invalidation. (ui/src/pages/new-session/palette-session-draft.ts:135, d65edb6873a5)
  • Rejected-turn recovery: Rejected image turns receive independent attachment identities for the destination while the launcher retains its retry draft. Existing current-request checks precede publication; the patch adds no authorization or persisted-format contract. (ui/src/pages/new-session/initial-session-turn-handoff.ts:87, d65edb6873a5)
  • Behavioral coverage: Inspected tests cover cold handoff, partial admission, failed reads, dismissal, connection replacement, independent rejected-turn payloads, stable layout, and image-only request/retry behavior with foreground preservation. Tests were not executed during this read-only review. (ui/src/e2e/command-palette-images.e2e.test.ts:105, d65edb6873a5)
  • Inspected visual proof: Inspected the prepared before screenshot and linked after screenshots showing an image-only preview, narrow-screen image overflow with the foreground draft intact, and retained images beside a creation error. These match the captured PR body's actual Control UI with synthetic Gateway data claim. The video could not be independently inspected: local preparation reports ffprobe ENOENT and browser retrieval returned Cache miss; independently readable screenshots remain valid proof.

Likely related people:

  • vyctorbrzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • roboclaw-bot: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (5 earlier review cycles)
  • reviewed 2026-09-19T23:21:51.080Z sha 4efcb6dacf0293d2773e99ced201da041ba34976 :: blocked before merge. :: none
  • reviewed 2026-09-19T23:34:15.297Z sha 5040a75 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-20T00:35:18.787Z sha 251eefb :: needs maintainer review before merge. :: none
  • reviewed 2026-09-20T01:09:47.733Z sha 702cbc3 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-20T15:33:34.017Z sha 66b0d15 :: needs maintainer review before merge. :: none

@roboclaw-bot
roboclaw-bot force-pushed the openclaw/image-attachment-preview-for-mini-composer branch from 4efcb6d to 5040a75 Compare September 19, 2026 23:25
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 19, 2026 23:28
@roboclaw-bot roboclaw-bot self-assigned this Sep 20, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Current mini-composer stress proof

Real Control UI with synthetic Gateway data. Twelve distinct PNGs, a520-character multiline prompt, horizontal scrolling, settings, and removal through the final image. Fixed camera; 15 geometry checks passed with0px x/y movement for input, New session, settings and palette across attachment changes. Desktop dark/light and390px narrow layouts. Captures refreshed after main integration; not a live-provider/deployment claim.

12 images — desktop

12 images — desktop

Horizontal overflow scrolled

Horizontal overflow scrolled

Long prompt +12images

Long prompt +12images

Settings with12images

Settings with12images

390px narrow: long prompt +12images

390px narrow: long prompt +12images

Light theme: long prompt +12images

Light theme: long prompt +12images

current-ui-stress.mp4

@roboclaw-bot
roboclaw-bot force-pushed the openclaw/image-attachment-preview-for-mini-composer branch from 702cbc3 to 66b0d15 Compare September 20, 2026 15:21
roboclaw-bot and others added 6 commits September 20, 2026 17:47
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 264af0aa-7844-43ee-8270-811a700d6fde
Move thumbnails below the fixed input row and prune screenshot-only and duplicate test scaffolding. Strengthen cold partial-admission coverage.

Co-authored-by: vyctorbrzezowski <[email protected]>
Simplify equivalent data-URL decoding and let the paste owners enforce their current lifecycle and editing state.

Co-authored-by: vyctorbrzezowski <[email protected]>
Retain native clipboard Files in the cold launcher and keep the loaded-composer parser with its sole owner.

Co-authored-by: vyctorbrzezowski <[email protected]>
Apply the requested bounded 512-byte cap adjustment and measured Node24 baseline. Keep the growth and build-variance allowances unchanged.

Co-authored-by: vyctorbrzezowski <[email protected]>
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/image-attachment-preview-for-mini-composer branch from 66b0d15 to d65edb6 Compare September 20, 2026 17:49
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Sep 20, 2026
@roboclaw-bot
roboclaw-bot merged commit e61cde9 into main Sep 20, 2026
172 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/image-attachment-preview-for-mini-composer branch September 20, 2026 18:09
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 21, 2026
* feat(ui): paste images into command-palette sessions

Co-authored-by: vyctorbrzezowski <[email protected]>

* feat(ui): paste images into command-palette sessions

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 264af0aa-7844-43ee-8270-811a700d6fde

* fix(ui): keep palette controls anchored when images change

Move thumbnails below the fixed input row and prune screenshot-only and duplicate test scaffolding. Strengthen cold partial-admission coverage.

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(ui): keep palette image paste within startup budget

Simplify equivalent data-URL decoding and let the paste owners enforce their current lifecycle and editing state.

Co-authored-by: vyctorbrzezowski <[email protected]>

* refactor(ui): keep cold image custody out of clipboard parsing

Retain native clipboard Files in the cold launcher and keep the loaded-composer parser with its sole owner.

Co-authored-by: vyctorbrzezowski <[email protected]>

* build(ui): accommodate cold clipboard image custody

Apply the requested bounded 512-byte cap adjustment and measured Node24 baseline. Keep the growth and build-variance allowances unchanged.

Co-authored-by: vyctorbrzezowski <[email protected]>

---------

Co-authored-by: vyctorbrzezowski <[email protected]>
roboclaw-bot added a commit that referenced this pull request Sep 21, 2026
Adapt the new layout cases to the helper contract introduced on main by #153238. The UI E2E type graph passes; no production behavior changes.

Co-authored-by: vyctorbrzezowski <[email protected]>
roboclaw-bot added a commit that referenced this pull request Sep 21, 2026
Adapt the new layout cases to the helper contract introduced on main by #153238. The UI E2E type graph passes; no production behavior changes.

Co-authored-by: vyctorbrzezowski <[email protected]>
roboclaw-bot added a commit that referenced this pull request Sep 21, 2026
Adapt the new layout cases to the helper contract introduced on main by #153238. The UI E2E type graph passes; no production behavior changes.

Co-authored-by: vyctorbrzezowski <[email protected]>
roboclaw-bot added a commit that referenced this pull request Sep 21, 2026
* fix(ui): polish command palette session settings

Keep remember settings on the initial view, align the agent picker with workspace controls, and preserve keyboard focus without forcing the search ring on pointer entry.

Co-authored-by: vyctorbrzezowski <[email protected]>

* improve(ui): tighten palette grouping and typography

Keep machine headings close to their options, separate groups, and inherit the 13px menu typography through the agent selector. Extend the browser regression and fix its missing-braces lint error.

Co-authored-by: vyctorbrzezowski <[email protected]>

* test(ui): extract palette settings layout assertions

Keep all browser layout and keyboard coverage while leaving headroom below the line-cap ratchet when the PR is combined with main.

Co-authored-by: vyctorbrzezowski <[email protected]>

* test(ui): pass the shared palette fixture its server URL

Adapt the new layout cases to the helper contract introduced on main by #153238. The UI E2E type graph passes; no production behavior changes.

Co-authored-by: vyctorbrzezowski <[email protected]>

---------

Co-authored-by: vyctorbrzezowski <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
* fix(ui): polish command palette session settings

Keep remember settings on the initial view, align the agent picker with workspace controls, and preserve keyboard focus without forcing the search ring on pointer entry.

Co-authored-by: vyctorbrzezowski <[email protected]>

* improve(ui): tighten palette grouping and typography

Keep machine headings close to their options, separate groups, and inherit the 13px menu typography through the agent selector. Extend the browser regression and fix its missing-braces lint error.

Co-authored-by: vyctorbrzezowski <[email protected]>

* test(ui): extract palette settings layout assertions

Keep all browser layout and keyboard coverage while leaving headroom below the line-cap ratchet when the PR is combined with main.

Co-authored-by: vyctorbrzezowski <[email protected]>

* test(ui): pass the shared palette fixture its server URL

Adapt the new layout cases to the helper contract introduced on main by openclaw#153238. The UI E2E type graph passes; no production behavior changes.

Co-authored-by: vyctorbrzezowski <[email protected]>

---------

Co-authored-by: vyctorbrzezowski <[email protected]>
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 maintainer Maintainer-authored PR 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. scripts Repository scripts size: XL 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