fix: prevent new conversation action when no messages are present#729
Merged
Avijit-Microsoft merged 1 commit intodevfrom Feb 20, 2026
Merged
fix: prevent new conversation action when no messages are present#729Avijit-Microsoft merged 1 commit intodevfrom
Avijit-Microsoft merged 1 commit intodevfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens the enable/disable logic for the “New Conversation” action across the chat UI, preventing users from starting a new conversation when there are no messages or when a loading/generation flow is in progress.
Changes:
- Disable the “New chat” button in
ChatPanelwhen loading or when the current message list is empty. - Disable the “Start new chat” link in
ChatHistorywhen generating or when the current message list is empty (including visual/pointer behavior updates).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| content-gen/src/app/frontend/src/components/ChatPanel.tsx | Disables the new conversation button when isLoading or there are no messages. |
| content-gen/src/app/frontend/src/components/ChatHistory.tsx | Disables the new conversation link when generating or when there are no current messages (via onClick/style gating). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Avijit-Microsoft
approved these changes
Feb 20, 2026
Contributor
|
🎉 This PR is included in version 2.2.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Purpose
This pull request updates the logic for enabling and disabling the "New Conversation" action in the chat UI to prevent users from starting a new conversation when there are no messages or when a generation/loading process is in progress. This improves the user experience by disabling the button and link in scenarios where starting a new conversation would not make sense.
Improvements to chat action availability:
ChatHistory.tsx, the "New Conversation" link is now disabled not only when a message is generating (isGenerating), but also when there are no current messages (currentMessages.length === 0). The visual styles and pointer events are updated accordingly.ChatPanel.tsx, the "New Conversation" button is disabled when either the chat is loading (isLoading) or there are no messages (messages.length === 0).Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify deployment and GP testing