feat: merging dev to main - #656
Merged
Merged
Conversation
…y and remove unused import in SearchBox and Sidecar components
- Remove unused fileInputRef in searchBox.tsx (UploadMultipleFiles already removed) - Drop dead selectedDocument state and its setter call in home.tsx - Drop dead widthClass state and its resize useEffect in home.tsx - Use locally computed sessionId when constructing new ChatSession; remove unused field - Log exception in getKeywords catch block instead of swallowing silently - Use TrackDependency overload that maps wrapper params to telemetry dependencyName/data correctly Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- TelemetryHelper: make TrackDependency args fully positional (avoids non-trailing named-arg pitfall) - KernelMemory: remove unused 'using DnsClient.Internal;' - KernelMemory.getKeywords: catch JsonException specifically before general fallback - ChatHost: fix 'occured' -> 'occurred' in user-facing error message - searchBox: drop dead UploadButton component and its usage Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
refactor: improve error handling and logging across multiple components
Ayaz-Microsoft
requested review from
Avijit-Microsoft,
Dongbumlee,
Roopan-Microsoft,
aniaroramsft,
dgp10801,
nchandhi and
toherman-msft
as code owners
June 4, 2026 13:12
Contributor
There was a problem hiding this comment.
Pull request overview
This PR merges development changes into main, focusing on improving resilience of backend telemetry/tagging and keyword-extraction flows, tightening code immutability, and cleaning up/modernizing frontend components.
Changes:
- Backend: add best-effort exception handling around telemetry and tag updates; harden keyword extraction to tolerate malformed JSON/LLM output.
- Backend: small logic fix in document date filtering; various readonly/static readonly refactors and minor robustness fixes.
- Frontend: remove unused imports/state and simplify components to reduce lint noise and improve maintainability.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Deployment/validate_bicep_params.py | Adds clarifying fallback comment for JSON parse failure path in env var scan. |
| App/frontend-app/src/pages/home/home.tsx | Removes unused state and UI resize logic; simplifies chat/document selection handling. |
| App/frontend-app/src/components/sidecarCopilot/sidecar.tsx | Removes unused chat type imports/state values; keeps setters only. |
| App/frontend-app/src/components/searchResult/old.tsx | Removes unused downloadFile import. |
| App/frontend-app/src/components/searchBox/searchBox.tsx | Removes unused upload-button code and unused imports/icons. |
| App/frontend-app/src/components/documentViewer/documentViewer.tsx | Avoids unused state variable for clearChatFlag while keeping setter for downstream usage. |
| App/frontend-app/src/components/chat/modelSwitch.tsx | Removes unused constants/imports. |
| App/frontend-app/src/components/chat/chatRoom.tsx | Removes unused imports/styles and unused temp/sample code; makes temperature immutable. |
| App/backend-api/Microsoft.GS.DPS/Storage/Documents/DocumentRepository.cs | Adjusts end-date filtering to include the end date’s day. |
| App/backend-api/Microsoft.GS.DPS/Storage/Components/BusinessTransactionRepository.cs | Replaces unsafe cast with explicit type-check and clearer exception. |
| App/backend-api/Microsoft.GS.DPS/Storage/AISearch/TagUpdater.cs | Wraps catch-all with CA1031 suppression for best-effort tag updates. |
| App/backend-api/Microsoft.GS.DPS/API/UserInterface/DataCacheManager.cs | Simplifies keyword cache consolidation to avoid redundant additions. |
| App/backend-api/Microsoft.GS.DPS/API/KernelMemory/KernelMemory.cs | Makes dependencies readonly, adds optional logger, improves stream disposal, and hardens keyword JSON parsing. |
| App/backend-api/Microsoft.GS.DPS/API/ChatHost/ChatHost.cs | Makes dependencies readonly, switches to Path.Join, and improves top-level error fallback messaging. |
| App/backend-api/Microsoft.GS.DPS.Host/Helpers/TelemetryHelper.cs | Ensures telemetry failures never break primary flows; updates dependency tracking call signature and adds CA1031 suppressions. |
| App/backend-api/Microsoft.GS.DPS.Host/API/UserInterface/UserInterface.cs | Marks static thumbnails dictionary as readonly (reference immutability). |
| App/backend-api/Microsoft.GS.DPS.Host/API/KernelMemory/KernelMemory.cs | Adds missing-file request handling and removes unused completion flag. |
Comments suppressed due to low confidence (1)
App/frontend-app/src/pages/home/home.tsx:446
handleChatWithDocumentno longer uses itsdocumentparameter, which will trigger@typescript-eslint/no-unused-varswarnings unless the unused argument is prefixed with_. Rename the parameter to_document(or remove the parameter and update the prop type if it’s truly unused).
function handleChatWithDocument(document: Document) {
setShowCopilot(true);
if (headerMenuTabsRef.current && showCopilot === false) {
headerMenuTabsRef.current.scrollIntoView({ behavior: "smooth" });
}
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fix: chat functionality with error handling
Roopan-Microsoft
temporarily deployed
to
production
June 4, 2026 15:08 — with
GitHub Actions
Inactive
Roopan-Microsoft
temporarily deployed
to
production
June 4, 2026 15:12 — with
GitHub Actions
Inactive
Roopan-Microsoft
temporarily deployed
to
production
June 4, 2026 16:03 — with
GitHub Actions
Inactive
Roopan-Microsoft
temporarily deployed
to
production
June 4, 2026 16:12 — with
GitHub Actions
Inactive
Tejasri-Microsoft
temporarily deployed
to
production
June 5, 2026 06:33 — with
GitHub Actions
Inactive
Tejasri-Microsoft
temporarily deployed
to
production
June 5, 2026 06:36 — with
GitHub Actions
Inactive
Tejasri-Microsoft
temporarily deployed
to
production
June 5, 2026 07:36 — with
GitHub Actions
Inactive
Tejasri-Microsoft
temporarily deployed
to
production
June 5, 2026 09:21 — with
GitHub Actions
Inactive
Tejasri-Microsoft
temporarily deployed
to
production
June 5, 2026 09:24 — with
GitHub Actions
Inactive
Tejasri-Microsoft
temporarily deployed
to
production
June 5, 2026 10:16 — with
GitHub Actions
Inactive
Roopan-Microsoft
approved these changes
Jun 8, 2026
Avijit-Microsoft
approved these changes
Jun 8, 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 pull request introduces several improvements across the backend and frontend, focusing on code safety, maintainability, and minor bug fixes. The most significant changes include enhanced exception handling to prevent telemetry and logging failures from impacting application flow, improved immutability and code clarity, and some targeted bug fixes in document processing and repository logic.
Exception Handling & Robustness
#pragma warning disable CA1031blocks and improved logging in telemetry and tag update methods to ensure that failures in telemetry or tag updates do not affect the primary application logic. Errors are now logged but do not propagate. (TelemetryHelper.cs,TagUpdater.cs) [1] [2] [3] [4] [5] [6]KernelMemory.cs)Immutability & Code Quality
readonlyandstatic readonlyto improve thread safety and code clarity inChatHost,KernelMemory, andUserInterface. (ChatHost.cs,KernelMemory.cs,UserInterface.cs) [1] [2] [3]Path.CombinewithPath.Joinfor file path construction for improved clarity and correctness. (ChatHost.cs,KernelMemory.cs) [1] [2]Bug Fixes
BadRequestwith logging. (KernelMemory.cs)DocumentRepository.cs)DataCacheManager.cs)BusinessTransactionRepositoryto throw a clear error if an unexpected specification type is passed. (BusinessTransactionRepository.cs)Frontend Cleanups
chatRoom.tsxfor better maintainability and reduced bundle size. (chatRoom.tsx) [1] [2] [3]Stream Handling Improvements
usingstatements to ensure proper disposal of readers inKernelMemory.cs. [1] [2]These changes collectively enhance the application's stability, maintainability, and error resilience.
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information