fix: update chat title immediately on send#66
Merged
wesbillman merged 1 commit intomainfrom Apr 1, 2026
Merged
Conversation
When a user sends a message from a "New Chat" tab, the session title now updates instantly from the message text instead of waiting for the full AI response to complete (acp:done) or the backend title generation (acp:session_info). This gives immediate feedback in the sidebar and tab bar. The backend-generated title from acp:session_info will still overwrite this initial title if it arrives later, providing the best of both worlds: instant feedback + quality titles.
tellaho
added a commit
to tellaho/goose2
that referenced
this pull request
Apr 2, 2026
Merges 7 commits from main into tho/boss-ui: - Image paste support in chat input (block#68) - Tab name text unselectable (block#67) - Chat title immediate update on send (block#66) - Artifact v1 file viewing (block#63) - Cmd+W tab close (block#64) - Chat activity/unread state tracking (block#62) - Sidebar hierarchy polish + faster reloads (block#61) Key conflict resolutions: - Keep Tailwind v4 CSS-based config (delete tailwind.config.js) - Keep boss-ui dialog.tsx, add showCloseButton prop from main - Add text-foreground-subtle token to boss-ui theme system - Keep ToolCallAdapter (boss-ui), adopt ToolChainCards pattern from main - Delete MarkdownContent/ToolCallCard (replaced by boss-ui ai-elements) - Adopt SessionActivityIndicator from main into sidebar - Adopt ClickableImage/ImageLightbox from main - Merge drag-and-drop image support into ChatInput - Keep boss-ui hover:bg-accent/50 treatment throughout sidebar Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When opening a "New Chat" tab and sending a message, the session title in the sidebar and tab bar stays as "New Chat" until the entire AI response finishes streaming. For long responses with tool calls, this means the title can be generic for the entire conversation.
Root Cause
The title was only set in two places, both late in the response lifecycle:
acp:donehandler inuseAcpStream.ts— sets first 40 chars of user message as fallback, but only fires after the full response completesacp:session_infoevent — backend-generated title that can arrive even laterNeither triggers at message send time.
Note: Starting a chat from the home screen didn't have this bug because
AppShell.tsxalready passesinitialMessage?.slice(0, 40)as the title at session creation time.Fix
In
useChat.ts'ssendMessage, immediately set the session title from the user's message text (first 40 chars) when the session still has the default "New Chat" title. This happens before streaming begins, giving instant feedback.The
acp:session_infohandler will upgrade to a better backend-generated title if one arrives later. Theacp:donefallback correctly skips since the title is no longer "New Chat".Changes
src/features/chat/hooks/useChat.ts— Added immediate title update insendMessage(+13 lines)