Repository navigation
refactor(ui): centralize composer attachment and capability controls - #119650
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 12:07 PM ET / 16:07 UTC. ClawSweeper reviewWhat this changesCentralizes the Control UI’s chat and new-session attachment/drop controls and capability-menu toggle rows without intended user-visible behavior changes. Merge readinessNo 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 Review scores
Verification
How this fits togetherThe 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
Decision needed
Why: The protected maintainer label requires explicit maintainer handling; the review found no mechanical repair or product-direction decision to automate. Before merge
Agent review detailsSecurityNone. PR surfaceSource -101. Total -101 across 3 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…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) ...
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
ui/src/pages/chat/chat-view.test.ts,ui/src/pages/new-session/composer.test.ts).draftUnchanged: true,dropEffect: "none",dropPrevented: true, andurlUnchanged: truewhile accepting legitimate file drops and native file inputs.pnpm check:changedpassed, including production/full-tree dead-export scans, Control UI localization, core-test/UI typechecks, and typed lint (0 warnings, 0 errors).tbx_01kz94chajan3wdwvrpcs6ac0d; proof run: https://github.com/openclaw/openclaw/actions/runs/31014151973.gpt-5.6-sol,xhigh; no actionable findings.