Skip to content

refactor(ui): centralize composer attachment and capability controls - #119650

Merged
steipete merged 1 commit into
mainfrom
codex/loc-0805-ui-cleanup-dmvazq
Aug 5, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/loc-0805-ui-cleanup-dmvazq

Conversation

@steipete

@steipete steipete commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI maintained separate attachment controls and drag-and-drop rules for existing chats and new sessions, plus three copies of capability-toggle markup. That duplication made attachment security, disabled-state handling, and skill/MCP controls harder to keep consistent.

Why This Change Was Made

Route both composers through the existing attachment owner, share file/photo/camera inputs, menu triggers, attachment selection, and drag-and-drop handling, and render skill, connector, and MCP-tool switches through one capability-row owner. Keep internal attachment helpers private after their external callers disappear.

User Impact

No intended behavior or visual change. Both composer surfaces retain their existing attachment icons, capture settings, keyboard/focus behavior, read-only operator restrictions, and protection against URL drops navigating away from unsent drafts.

Production delta: 101 fewer lines across three existing UI files; no test, locale, generated-file, or dependency changes.

Evidence

  • Existing owner suites: 245/245 passed (ui/src/pages/chat/chat-view.test.ts, ui/src/pages/new-session/composer.test.ts).
  • Real Chromium E2E: 22/22 passed across composer capability menus, new-session prompt/attachment lifecycles, and browser file-drop protection. Read-only skill/MCP controls, raw tool identities, attachment cleanup, and native inputs were exercised.
  • Browser drop proof preserved draftUnchanged: true, dropEffect: "none", dropPrevented: true, and urlUnchanged: true while accepting legitimate file drops and native file inputs.
  • Independent before/after production-source Lit/DOM review covered 63 interaction and rendered-output cases.
  • Full remote pnpm check:changed passed, including production/full-tree dead-export scans, Control UI localization, core-test/UI typechecks, and typed lint (0 warnings, 0 errors).
  • Trusted Blacksmith Testbox: tbx_01kz94chajan3wdwvrpcs6ac0d; proof run: https://github.com/openclaw/openclaw/actions/runs/31014151973.
  • Independent final autoreview: gpt-5.6-sol, xhigh; no actionable findings.
  • Exact-head review: the latest substantive bot review covered immutable head 95da1fd with no actionable findings. Under root AGENTS.md, no re-review is needed while that code head remains unchanged; repo-native merge verifies the reviewed head and required hosted gates.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 5, 2026
@steipete
steipete marked this pull request as ready for review August 5, 2026 14:36
@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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 12:07 PM ET / 16:07 UTC.

ClawSweeper review

What this changes

Centralizes the Control UI’s chat and new-session attachment/drop controls and capability-menu toggle rows without intended user-visible behavior changes.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No blocking findings. This is a clean, net-negative Control UI refactor; it remains open for normal maintainer handling because it is maintainer-authored and carries the protected maintainer label.

Priority: P3
Reviewed head: 95da1fd8cd38be8bdb5a9eaaeeaac07b7e96dca3
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, net-negative refactor with strong exact-head validation evidence and no actionable review finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer PR is exempt from the external-contributor proof gate; its body nonetheless supplies positive Chromium and hosted-validation evidence.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer PR is exempt from the external-contributor proof gate; its body nonetheless supplies positive Chromium and hosted-validation evidence.
Evidence reviewed 6 items Shared attachment owner: The branch moves new-session drag/drop behavior to the existing shared handler, which retains nested-drag tracking, disabled-state handling, and non-editable URL/text-drop cancellation.
New-session integration: The new-session composer forwards its existing attachment state and read signal into the shared handler rather than retaining a parallel drop implementation.
Sibling coverage: Existing focused tests cover nested drag state and URL-drop protection for chat, plus new-session attachment drops and disabled-composer behavior.
Findings None None.
Security None None.

How this fits together

The Control UI renders chat and new-session composers, accepts attachments, and writes per-session capability choices. These controls feed attachment lifecycle state and session tool overrides before a user sends a message or starts a session.

flowchart LR
  A[Chat composer] --> C[Shared attachment controls]
  B[New-session composer] --> C
  C --> D[Drop and input decision]
  D --> E[Attachment draft lifecycle]
  A --> F[Capability menu]
  F --> G[Session tool overrides]
  E --> H[Send or start session]
  G --> H
Loading

Decision needed

Question Recommendation
Should this maintainer-owned Control UI refactor land through the normal exact-head merge gates? Land the reviewed refactor: Merge the exact reviewed head once repository-native merge gates confirm the clean merge result.

Why: The protected maintainer label requires explicit maintainer handling; the review found no mechanical repair or product-direction decision to automate.

Before merge

  • Complete next step (P2) - No actionable repair remains; this protected maintainer-owned PR needs normal maintainer merge handling.
Agent review details

Security

None.

PR surface

Source -101. Total -101 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 3 164 265 -101
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 164 265 -101

Review metrics

Metric Value Why it matters
Production versus test LOC production -101; tests 0 The consolidation deletes duplicated Control UI behavior while leaving the existing owner suites as regression coverage.

Technical review

Best possible solution:

Keep one shared attachment/drop owner and land the reviewed refactor through the normal exact-head merge gates.

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

Not applicable: this PR is a behavior-preserving refactor; source inspection and existing focused tests cover the equivalent chat and new-session flows.

Is this the best way to solve the issue?

Yes. Routing both composers through the existing attachment owner removes duplicate policy while retaining the established lifecycle and capability-menu contracts.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P3: This is low-risk internal Control UI cleanup with no intended behavior change and no blocking defect found.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer PR is exempt from the external-contributor proof gate; its body nonetheless supplies positive Chromium and hosted-validation evidence.

Evidence

What I checked:

Likely related people:

  • steipete: History associates this area with the capability-menu, connector-tool-access, and new-session attachment work, and this exact refactor commit is authored by the same contributor. (role: capability-menu and attachment contributor; confidence: high; commits: f278991, af717db, da108274; files: ui/src/pages/chat/components/chat-attachments.ts, ui/src/pages/chat/components/chat-composer-plus-menu.ts, ui/src/pages/new-session/composer.ts)
  • Jason (Json): Earlier new-session composer work provides adjacent ownership context, though the present refactor’s direct history is primarily associated with steipete. (role: adjacent new-session contributor; confidence: low; files: ui/src/pages/new-session/composer.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 (1 earlier review cycle)
  • reviewed 2026-08-05T15:16:27.682Z sha 95da1fd :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 5, 2026
@steipete
steipete merged commit 7e5c02c into main Aug 5, 2026
158 checks passed
@steipete
steipete deleted the codex/loc-0805-ui-cleanup-dmvazq branch August 5, 2026 16:57
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to VACInc/openclaw that referenced this pull request Aug 5, 2026
…cope

* origin/main: (70 commits)
  fix(clickclack): preserve MIME extension for unnamed uploads (openclaw#119646)
  fix(memory): keep post-ready RPCs responsive (openclaw#119710)
  fix(browser): preserve locale, timezone, and device overrides (openclaw#119695)
  fix(agents): stop messaging dedupe from dropping final replies that quote a short tool send (openclaw#118178)
  test(agents): batch code mode budget proof (openclaw#119699)
  fix(memory): keep gateway RPCs responsive during startup (openclaw#119676)
  improve(ui): trail transient session status beside row actions (openclaw#119560)
  refactor(msteams): consolidate channel action target resolution (openclaw#119632)
  fix: tail context answers the current user message (openclaw#117364)
  fix(whatsapp): exercise descriptor-safe credential persistence (openclaw#119621)
  fix(diagnostics-otel): route OTLP endpoints by signal (openclaw#101655)
  refactor(skills): consolidate workshop transcript and record normalization (openclaw#119643)
  fix(video): harden DashScope task and media lifecycle (openclaw#117303)
  refactor(transcripts): consolidate persistence and export ownership (openclaw#119634)
  fix: preserve ClickClack discussion state contracts (openclaw#118851)
  fix(matrix): retire shared E2EE clients safely (openclaw#119570)
  refactor(cron): unify catch-up persistence and payload encoding (openclaw#119636)
  refactor(ui): centralize composer attachment and capability controls (openclaw#119650)
  refactor(daemon): consolidate managed service lifecycle ownership (openclaw#119647)
  fix(browser): honor explicit navigation timeouts across browser drivers (openclaw#119654)
  ...
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: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M 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