← Back to PRs

#13548: feat(control-ui): Add quote reply and send message to session features

by Annaxiebot open 2026-02-10 17:59 View on GitHub →
app: web-ui stale
## Summary This PR implements two new Control UI features for better session management, as discussed in the context of ChatGPT-like session improvements: ### 1. Quote Reply Feature - **What**: Adds a quote/reply button next to the copy button on assistant messages - **How**: Clicking the button inserts the quoted message into the input field with markdown quote syntax (`>` prefix) - **UX**: Automatically focuses the input field and positions the cursor after the quoted text - **Icon**: Uses the messageSquare icon for visual consistency ### 2. Send Message to Session Feature - **What**: Adds a 'Send Message' button in the sessions list (Sessions tab) - **Why**: Enables sending messages to any active session (main or isolated sub-agents) without switching sessions - **How**: Opens a prompt to enter the message, then uses the `sessions.send` gateway API - **Feedback**: Displays success/error alerts ## Implementation Details - Created `quote-reply-button.ts` for the quote functionality (following the pattern of `copy-as-markdown.ts`) - Updated `grouped-render.ts` to include the quote button alongside the copy button - Modified chat view to wire up `onQuote` callback that appends quoted text to draft - Enhanced sessions view with `onSendMessage` callback - Updated CSS to accommodate both buttons in chat bubbles (increased padding-right to 70px) - All features follow existing OpenClaw UI patterns and conventions ## Related Issues - Related to #10599 (ChatGPT-like session improvements) - See also: `projects/chatgpt-session-switching.md` for context ## Testing - [x] Built successfully with `pnpm ui:build` - [x] Quote button appears on hover for assistant messages - [x] Quoted text is inserted into input field with proper formatting - [x] Send Message button appears in Sessions table - [x] Message sending uses proper gateway API ## Screenshots (Note: Since this is developed in an isolated environment, screenshots would need to be added after manual testing in a live OpenClaw instance) ## Checklist - [x] Code follows existing patterns and conventions - [x] TypeScript compilation successful - [x] UI build successful - [x] Changes are backwards compatible - [x] Commit message follows conventional commits format <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds two user-facing Control UI improvements: - Chat: introduces a quote-reply button on assistant message bubbles that inserts the selected message into the draft input as Markdown blockquotes, and updates chat bubble CSS to fit multiple action buttons. - Sessions: adds a “Send Message” action in the Sessions list that prompts for text and calls the gateway `sessions.send` endpoint. The changes integrate into existing rendering flow (`renderMessageGroup` → grouped message bubble actions; sessions table row actions) and wire new callbacks through `renderApp` into the respective views. <h3>Confidence Score: 3/5</h3> - This PR is close, but has a few user-facing correctness issues that should be fixed before merge. - Main risks are (1) unused local type likely breaking lint/typecheck, (2) quote button not usable on touch/hoverless devices due to CSS, and (3) sessions.send success alert can be shown even when the gateway client is missing because of optional chaining. Cursor placement after quote insertion may also be flaky depending on render timing. - ui/src/ui/chat/quote-reply-button.ts, ui/src/styles/chat/grouped.css, ui/src/ui/app-render.ts <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs