Skip to content

Control UI: unify composer attachment chip layout - #130312

Merged
vyctorbrzezowski merged 2 commits into
openclaw:mainfrom
vyctorbrzezowski:fix/control-ui-composer-attachment-chips
Aug 26, 2026
Merged

vyctorbrzezowski merged 2 commits into
openclaw:mainfrom
vyctorbrzezowski:fix/control-ui-composer-attachment-chips

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Composer attachments currently use inconsistent footprints: image thumbnails are compact, while video, audio, pasted text, and document chips are substantially larger and use oversized file artwork. Mixed attachment sets become visually uneven and consume too much composer space.

Why This Change Was Made

This PR gives composer attachment chips one compact geometry, uses the existing Control UI glyphs for video, audio, and documents, and reuses the canonical attachment resolver for the file-type label. Image hover geometry follows the thumbnail shape, pasted text keeps its Show in text field action, and chip surfaces inherit the active composer theme.

The shared attachment renderer continues to serve both the chat and new-session composers. No fixture or mock scaffolding is included.

User Impact

  • Mixed image, pasted-text, video, audio, PDF, and generic-file attachments align in one consistent row.
  • File chips show a restrained glyph, filename, and type label.
  • Pasted text remains identifiable by its content preview and keeps the underlined recovery action.
  • Attachment backgrounds and hover states follow the composer surface across dark and light themes.
  • The attachment rail sits closer to the editable field without changing attachment behavior.

Evidence

All screenshots use deterministic mock-only files and are cropped to the attachment rail; they contain no credentials, personal data, or external content.

Dark theme

Before After
Composer attachments before, dark theme Composer attachments after, dark theme

Light theme

Before After
Composer attachments before, light theme Composer attachments after, light theme
  • Real Control UI mock: before from current origin/main; after from the approved attachment bench on 127.0.0.1:5223.
  • Representative row: image thumbnails, pasted text, screen recording/video, audio, PDF, and generic archive.
  • Existing coverage owns file admission, video admission, pasted-text preview, and Show in text field behavior.
  • Local gates intentionally not run; validation is delegated to the remote lander as requested.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 26, 2026 19:21
@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 26, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 6:30 PM ET / 22:30 UTC.

ClawSweeper review

What this changes

This PR makes Control UI composer attachment chips compact and consistent, adding filename-aware video/audio/document glyphs and file-type labels.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

The current head resolves the prior glyph finding by deriving the compact chip from the canonical filename-aware resolver, and current main still has the larger generic-file rendering. Keep this MEMBER-authored, maintainer-labeled UI refinement open for human approval and exact-head checks.

Priority: P3
Reviewed head: 36f35b1cdc7697b5d128a69f35633b8917a3046d
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused UI patch with direct visual evidence and an addressed prior finding; remaining work is normal maintainer approval and exact-head validation.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: Not applicable: this is MEMBER-authored; the PR body nevertheless provides before/after Control UI screenshots of the attachment rail.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable: this is MEMBER-authored; the PR body nevertheless provides before/after Control UI screenshots of the attachment rail.
Evidence reviewed 6 items Current-head resolver use: The compact file chip resolves the attachment family and extension label before choosing the glyph, so extension-based detection remains available when the browser supplies an empty MIME type.
Canonical resolver contract: The shared resolver prioritizes a recognized filename extension, then MIME type, and returns both family and label; this covers MP4 and MP3 under the same owner boundary.
Regression coverage: The changed chat-view test creates an MP4 with no MIME type and verifies the persisted generic MIME value, video-family glyph, and visible MP4 label.
Findings None None.
Security None None.

Live Verification

Command: pnpm ui:build

Result: PASS (completed)

../dist/control-ui/assets/shell-B1oByMWF.js                                           2.56 kB │ gzip:   1.30 kB │ map:     7.94 kB
../dist/control-ui/assets/webidl-C2iEcUXH.js                                          2.62 kB │ gzip:   1.37 kB │ map:     7.72 kB
../dist/control-ui/assets/puppet-vmUf8xpM.js                                          2.65 kB │ gzip:   1.29 kB │ map:     8.99 kB
../dist/control-ui/assets/pig-Bt8Qvkze.js                                             2.65 kB │ gzip:   1.49 kB │ map:     6.60 kB
../dist/control-ui/assets/forth-CEw5LND1.js                                           2.67 kB │ gzip:   1.42 kB │ map:     6.18 kB
../dist/control-ui/assets/dist-CglKcEOs.js                                            2.78 kB │ gzip:   1.60 kB │ map:     5.05 kB
../dist/control-ui/assets/input-dialog-C4jvoix1.js                                    2.82 kB │ gzip:   1.18 kB │ map:     8.64 kB
../dist/control-ui/assets/velocity-F0QlomFP.js                                        2.84 kB │ gzip:   1.20 kB │ map:     8.42 kB
../dist/control-ui/assets/session-progress-DZaSTF8G.js                                2.87 kB │ gzip:   1.16 kB │ map:     6.18 kB
../dist/control-ui/assets/workboard-mini-BcXtJ5Cy.js                                  2.88 kB │ gzip:   1.13 kB │ map:     5.60 kB
../dist/control-ui/assets/tiddlywiki-DLHM8fNz.js                                      2.92 kB │ gzip:   1.18 kB │ map:    11.09 kB
../dist/control-ui/assets/modelica--0xTveIu.js                                        2.94 kB │ gzip:   1.38 kB │ map:     8.06 kB
../dist/control-ui/assets/oz-DTY2GRqL.js                                              3.03 kB │ gzip:   1.38 kB │ map:     9.47 kB
../dist/control-ui/assets/r-CadXD0eR.js                                               3.06 kB │ gzip:   1.45 kB │ map:     9.92 kB
../dist/control-ui/assets/workboard-card-D9LCZMmD.js                                  3.12 kB │ gzip:   1.16 kB │ map:     5.94 kB
../dist/control-ui/assets/gateway-page-controller-DLUeT1rl.js                         3.16 kB │ gzip:   1.04 kB │ map:    10.09 kB
../dist/control-ui/assets/stex-CveJubUk.js                                            3.22 kB │ gzip:   1.26 kB │ map:    11.27 kB
../dist/control-ui/assets/lua-yYK_8aRA.js                                             3.27 kB │ gzip:   1.51 kB │ map:     7.76 kB
../dist/control-ui/assets/cypher-CIhKfSWw.js                                          3.33 kB │ gzip:   1.60 kB │ map:     8.52 kB
../dist/control-ui/assets/tiki-CryU3a6e.js                                            3.35 kB │ gzip:   1.35 kB │ map:    12.41 kB
../dist/control-ui/assets/sparql-ChxjJbEr.js                                          3.47 kB │ gzip:   1.70 kB │ map:     9.50 kB
../dist/control-ui/assets/vhdl-DlYBPd1w.js                                            3.47 kB │ gzip:   1.61 kB │ map:     9.63 kB
../dist/control-ui/assets/catalog-target-CPmYY5vO.js                                  3.49 kB │ gzip:   1.42 kB │ map:    11.34 kB
../dist/control-ui/assets/dist-UiEpQGFe.js                                            3.54 kB │ gzip:   1.83 kB │ map:     6.94 kB
../dist/control-ui/assets/update-confirmation.runtime-DN9ibBzK.js                     3.54 kB │ gzip:   1.42 kB │ map:    11.07 kB
../dist/control-ui/assets/exec-approval-CpjUyzXv.js                                   3.57 kB │ gzip:   1.50 kB │ map:     9.94 kB
../dist/control-ui/assets/portaled-hovercard-DyIN9wuS.js                              3.58 kB │ gzip:   1.29 kB │ map:    10.73 kB
../dist/control-ui/assets/mscgen-Cfn4e7TB.js                                          3.64 kB │ gzip:   1.08 kB │ map:     9.69 kB
../dist/control-ui/assets/device-placement-DZhheQsN.js                                3.73 kB │ gzip:   1.61 kB │ map:    13.00 kB
../dist/control-ui/assets/app-sidebar-workboard.runtime-C1qQ3dc2.js                   3.74 kB │ gzip:   1.50 kB │ map:    10.50 kB
../dist/control-ui/assets/dashboards-page-BfMw
… output truncated …

Assertions:

  • PASS expect_output: built in

How this fits together

The Control UI composer converts selected files and pasted text into previews before a chat message is sent. One shared preview renderer serves both the chat and new-session composers, turning attachment metadata into the visible chip layout, icon, and label.

flowchart LR
  A[Selected files and pasted text] --> B[Attachment admission]
  B --> C[Shared attachment preview]
  C --> D[Filename-aware type resolver]
  D --> E[Compact composer chip]
  E --> F[Chat composer]
  E --> G[New-session composer]
Loading

Decision needed

Question Recommendation
Does the Control UI owner approve the compact 162px composer-chip geometry and simplified glyph treatment for all non-image attachments? Approve the compact attachment treatment: Accept the shared compact renderer once the rebased head has completed its required UI checks.

Why: The PR is MEMBER-authored and carries the protected maintainer label, so the remaining decision is human approval of the user-facing visual direction rather than a mechanical repair.

Before merge

  • Resolve merge risk (P1) - The branch is behind current main and required checks were still running; landing should use an exact-head refresh after rebasing or confirming GitHub's clean merge result.
  • Complete next step (P2) - The code review is clear, but MEMBER authorship and the protected maintainer label require a human visual approval rather than an automated repair lane.
Agent review details

Security

None.

PR surface

Source +26, Tests +4. Total +30 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 75 49 +26
Tests 1 7 3 +4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 82 52 +30

Review metrics

Metric Value Why it matters
Production versus test delta production +26, tests +4 The bounded presentation growth adds one shared compact renderer and its styling; the test extension covers the empty-MIME regression path.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep one shared compact renderer, retain the canonical filename-aware resolver, then land only after the visual direction receives human approval and exact-head UI gates pass.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep one shared compact renderer, retain the canonical filename-aware resolver, then land only after the visual direction receives human approval and exact-head UI gates pass.

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

Not applicable: this PR intentionally refines an existing UI layout rather than reporting a failing user workflow; the body supplies before/after Control UI screenshots and the changed test covers the MIME-absent rendering path.

Is this the best way to solve the issue?

Yes: using the existing resolver avoids a second filename/MIME classification policy while preserving one renderer for both composer entry points.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against d4c8aaa53672.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable: this is MEMBER-authored; the PR body nevertheless provides before/after Control UI screenshots of the attachment rail.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is a contained Control UI ergonomics refinement with no demonstrated runtime, delivery, or security impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable: this is MEMBER-authored; the PR body nevertheless provides before/after Control UI screenshots of the attachment rail.

Evidence

What I checked:

Likely related people:

  • vyctorbrzezowski: A current-main history entry for the attachment renderer is the merged composer refinement commit, in addition to the current PR work. (role: recent composer contributor; confidence: high; commits: 50c7400a9acb, 36f35b1cdc76; files: ui/src/pages/chat/components/chat-attachments.ts, ui/src/styles/chat/layout.css)
  • Peter Steinberger: Blame and available main history attribute the current renderer and resolver lines to this recent source commit. (role: current attachment-renderer history contributor; confidence: medium; commits: 6f378774d5dd; files: ui/src/pages/chat/components/chat-attachments.ts, ui/src/pages/chat/components/chat-attachment-file-icon.ts)

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 (2 earlier review cycles)
  • reviewed 2026-08-26T19:28:09.314Z sha 2190821 :: needs changes before merge. :: [P2] Derive the glyph from the resolved attachment type
  • reviewed 2026-08-26T20:10:57.143Z sha 2190821 :: needs changes before merge. :: [P2] Derive the glyph from the resolved attachment type

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 26, 2026
@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 26, 2026
@vyctorbrzezowski
vyctorbrzezowski merged commit 34ccf63 into openclaw:main Aug 26, 2026
326 of 328 checks passed
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

@vyctorbrzezowski
vyctorbrzezowski deleted the fix/control-ui-composer-attachment-chips branch August 26, 2026 22:49
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
* fix(ui): unify composer attachment chips

* fix(ui): resolve composer attachment glyphs
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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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