Repository navigation
refactor(ui): render Ask OpenClaw chat through the shared chat presentation layer - #110934
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74d41dbadd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| : html`<textarea | ||
| rows="1" |
There was a problem hiding this comment.
Restore resizing in the custodian composer
When a user enters a multiline draft with Shift+Enter or text wraps onto multiple lines, this new rows="1" textarea remains one line tall: the shared rule in ui/src/styles/chat/layout.css:1595-1600 sets resize: none, while the regular chat explicitly grows its textarea through adjustTextareaHeight() in ui/src/pages/chat/components/chat-composer.ts:315-321. The custodian input handler only updates state, so longer setup answers become cramped inside a tiny scrolling field; either invoke equivalent autosizing here or retain a custodian-specific resize behavior.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
Related: #110896
What Problem This Solves
The Ask OpenClaw page (Setup chat / custodian, Settings → Ask OpenClaw and the first-run onboarding surface) hand-rolled its own message bubbles, markdown rendering, thinking indicator, and composer. It looked visibly worse than the regular chat — no avatars, no sender/timestamp affordances, a bare textarea + "Send" button — and duplicated presentation code the chat page already owns.
Why This Change Was Made
Part 1 of #110896. The custodian now renders through the regular chat's presentation layer:
renderMessageGroup(ui/src/pages/chat/components/chat-message.ts) with tool calls and reasoning display disabled — bringing avatars ("OC" text avatar), the shared markdown pipeline with code-block copy chrome, hover sender/timestamp footers, and copy-as-markdown for free..agent-chat__composer-shell/__composer-combobox) so the input and round send button are visually identical to the regular chat; the custodian keeps its minimal behavior (Enter-to-send, sensitive password mode, no attachments/model/talk controls).ui/src/styles/custodian.cssis deleted;ui/src/styles/chat/layout.csscomposer selectors were widened from> textareato> :is(textarea, input)(the chat combobox's only direct child is a textarea, so regular chat is unaffected).Net diff: −2 lines with behavior parity gained.
User Impact
The Setup/Ask OpenClaw chat looks and feels like the regular chat (same bubbles, avatars, markdown, composer), minus features that don't apply there. No protocol or backend changes; macOS/Android/TUI surfaces unaffected.
Evidence
fnm exec --using v24.15.0 -- node scripts/run-vitest.mjs ui/src/pages/custodian— 3 files, 36 tests passed (includes new assertions: assistant markdown through the shared pipeline, user-turn markdown parity, OC avatar).ui/src/components/settings-sidebar.test.ts— 6 tests passed.ui/src/e2e/custodian-event-nudge.e2e.test.tspassed locally withOPENCLAW_CAPTURE_UI_PROOF=1; screenshots below are from that run.