fix: chat functionality with error handling - #655
Merged
Conversation
Ayaz-Microsoft
marked this pull request as ready for review
June 4, 2026 07:44
Ayaz-Microsoft
requested review from
Avijit-Microsoft,
Dongbumlee,
Roopan-Microsoft,
aniaroramsft,
dgp10801,
nchandhi and
toherman-msft
as code owners
June 4, 2026 07:44
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the frontend chat UI to prevent overlapping chat requests by tracking per-message request state and improving error handling when the chat API fails or returns an empty response.
Changes:
- Track each chat request with a
requestIdandpendingflag to update the correct message when responses arrive. - Disable the chat input while any message is pending to prevent starting a new request mid-flight.
- Add a localized user-facing error message for failed chat fetches.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| App/frontend-app/src/components/chat/chatRoom.tsx | Adds request tracking (requestId/pending), updates message replacement logic, and disables input while requests are pending. |
| App/frontend-app/src/api/apiTypes/chatTypes.ts | Extends the chat response type with optional fields used for client-side request/message state. |
| App/frontend-app/public/locales/en/translation.json | Adds the localized “error fetching answer” message shown on failure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Roopan-Microsoft
previously approved these changes
Jun 4, 2026
Roopan-Microsoft
approved these changes
Jun 4, 2026
|
🎉 This PR is included in version 1.9.0 🎉 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 PR fixes a bug in which user was to chat while previous chat was in-progress and handled error.
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information