Skip to content

refactor(ui): render Ask OpenClaw chat through the shared chat presentation layer - #110934

Merged
steipete merged 1 commit into
mainfrom
claude/openclaw-setup-ui-simplify-8b6969
Jul 18, 2026
Merged

steipete merged 1 commit into
mainfrom
claude/openclaw-setup-ui-simplify-8b6969

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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:

  • Messages render via the shared 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.
  • The composer reuses the chat composer's shell classes (.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).
  • User turns now run through the same markdown pipeline as the regular chat (parity was the point of the change; previously they were interpolated as plain text).
  • The bespoke bubble/composer CSS in ui/src/styles/custodian.css is deleted; ui/src/styles/chat/layout.css composer selectors were widened from > textarea to > :is(textarea, input) (the chat combobox's only direct child is a textarea, so regular chat is unaffected).
  • Custodian-owned behavior is unchanged: connection-scoped sessions, idempotent-retry rules, sensitive masking, structured option cards, event nudges, open-agent/exit routing.

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.

Before After
thread before thread after
nudge before nudge after

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.
  • Mocked-gateway Playwright e2e ui/src/e2e/custodian-event-nudge.e2e.test.ts passed locally with OPENCLAW_CAPTURE_UI_PROOF=1; screenshots below are from that run.
  • Autoreview (codex/gpt-5.6-sol, xhigh): clean, no accepted/actionable findings.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Jul 18, 2026
@steipete steipete closed this Jul 18, 2026
@steipete steipete reopened this Jul 18, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +494 to +495
: html`<textarea
rows="1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@steipete
steipete merged commit 09fa581 into main Jul 18, 2026
148 of 206 checks passed
@steipete
steipete deleted the claude/openclaw-setup-ui-simplify-8b6969 branch July 18, 2026 19:52
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant