Repository navigation
feat(ui): paste images into command-palette sessions - #153238
Conversation
|
🦞👀 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 maintainer review before merge. Reviewed September 20, 2026, 2:02 PM ET / 18:02 UTC (Revision 6). ClawSweeper reviewWhat this changesAdds 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 Review scores
Verification
How this fits togetherThe 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +160, Tests +588, Docs +5, Other 0. Total +753 across 20 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
4efcb6d to
5040a75
Compare
Current mini-composer stress proofReal 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 — desktopHorizontal overflow scrolledLong prompt +12imagesSettings with12images390px narrow: long prompt +12imagesLight theme: long prompt +12imagescurrent-ui-stress.mp4 |
702cbc3 to
66b0d15
Compare
Co-authored-by: vyctorbrzezowski <[email protected]>
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]>
66b0d15 to
d65edb6
Compare
|
Merged via squash.
|
* 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]>
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]>
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]>
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]>
* 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]>
* 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]>






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
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
desktop dark
Empty
Short text
Long text
One image only
Short text and image
Long text and images
Multiple images only
Remove control on hover
Last image removed
Many images: overflow at start
Many images: scrolled to end
desktop light
Empty
Short text
Long text
One image only
Short text and image
Long text and images
Multiple images only
Remove control on hover
Last image removed
Many images: overflow at start
Many images: scrolled to end
narrow dark
Empty
Short text
Long text
One image only
Short text and image
Long text and images
Multiple images only
Remove control on hover
Last image removed
Many images: overflow at start
Many images: scrolled to end
submission image only
Submitting
Creation failure retains images
submission text images
Submitting
Creation failure retains images
reading
Image preparation pending
Image read failure
Worked on by
Work sessions
View the OpenClaw team session