Repository navigation
refactor(ui): split chat composer - #113338
Conversation
8d3daf4 to
41a79d7
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 24, 2026, 10:14 AM ET / 14:14 UTC. ClawSweeper reviewWhat this changesThe PR breaks the web chat composer into focused state, rendering, controls, context, queue, status, slash-menu, and DOM helper modules while retaining the existing facade and removing its max-lines baseline exemption. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain Keep this PR open for explicit maintainer handling: it carries the protected Likely related people: Priority: P3 Review scores
Verification
How this fits togetherThe Control UI chat composer combines the user's draft, session state, and gateway-run state into send controls, slash commands, queued messages, context information, and visible run status. This PR reorganizes that presentation and interaction layer while leaving the gateway and chat protocol paths unchanged. flowchart LR
Draft[User draft and actions] --> Composer[Chat composer facade]
Session[Session and run state] --> Composer
Gateway[Gateway browser client] --> Composer
Composer --> Controls[Send and run controls]
Composer --> Content[Context, queue, and slash menu]
Controls --> ChatUI[Rendered Control UI chat]
Content --> ChatUI
Decision needed
Why: The protected Before merge
Agent review detailsSecurityNone. PR surfaceSource +208, Other -1. Total +207 across 13 files. View PR surface stats
Review metricsNone. Proof path suggestionA short web UI chat interaction would directly verify the claimed behavior-neutral composer split across the user-visible controls and menus. Mantis is proof-only, so it must not be asked to change code or mutate GitHub state. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Review the exact merge result, then preserve the single composer facade while confirming one real Control UI flow covers typing, sending, slash-menu navigation, and run controls without a visual or interaction regression. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is a behavior-neutral refactor, not a report of broken existing behavior. Its correctness instead depends on verifying unchanged Control UI interactions. Is this the best way to solve the issue? Unclear: the proposed seam-based split is plausible and removes the max-lines exception, but a complete comparison of callers, lifecycle cleanup, tests, and the current merge result was not possible after the read-only terminal sandbox blocked repository inspection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 07e3855b4656. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
1354d03 to
b584dce
Compare
b584dce to
d2ac5b5
Compare
|
Merged via squash.
|
* refactor(ui): split chat composer * refactor(ui): align composer split ownership * test(ui): clarify custom combobox inventory
What Problem This Solves
The chat composer had grown to 3,001 lines behind a grandfathered max-lines suppression, which made its state, interaction, and rendering ownership difficult to review safely. This is the maintainer-requested split of that file.
Why This Change Was Made
The existing implementation is extracted along its established responsibility seams: types/state, DOM sizing, goals, slash commands, queue/status, context usage, run controls, orchestration, and Lit markup. The public facade and single runtime path remain unchanged, every resulting module is under 650 lines, the max-lines suppression/baseline entry is removed, and the raw-copy i18n inventory is refreshed for the moved literals.
This is strictly behavior-neutral: rendering and interactions are byte-for-byte equivalent at the product boundary, with zero intended visual change. There are no before/after screenshots because any visual delta would be a failed split rather than evidence of success.
AI-assisted with maintainer-directed Codex execution. I reviewed the complete moved code and understand the resulting ownership boundaries.
User Impact
No user-visible behavior changes. Maintainers get smaller, focused modules without changing composer layout, text, keyboard handling, state transitions, voice/dictation behavior, queue controls, or context/status presentation.
Evidence
node scripts/run-vitest.mjs ui/src/components/web-awesome-migration.node.test.ts ui/src/pages/chat/chat-composer.test.ts ui/src/pages/chat/chat-view.test.ts— 229 tests passed.node scripts/check-changed.mjs -- <14 touched paths>— passed on Blacksmith Testbox run https://github.com/openclaw/openclaw/actions/runs/30100662078, including max-lines ratchet, i18n verification, core/UI typechecks, formatting, and lint.b584dce04e5, including the full selected Control UI suite and merge gate..agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main— final branch clean, no accepted/actionable findings; overall patch correctness 0.98.git diff --check— clean.ClawSweeper rank-up moves