[#6] feat: Improve entity selection error handling and UI feedback#7
Merged
[#6] feat: Improve entity selection error handling and UI feedback#7
Conversation
- Add toast notification when fetching entity details fails (e.g. timeout) - Update \`selectEntity\` store action to set a fallback entity with error state instead of clearing selection - Enhance \`EntityDetailPanel\` to display an error card while preserving the entity header context - Prevent the UI from reverting to an empty state when a single entity request fails
There was a problem hiding this comment.
Pull request overview
This PR enhances error handling for entity detail fetching by adding user-friendly toast notifications and preventing the UI from clearing when requests fail. Instead of reverting to an empty state, the application now displays an error message while preserving the entity context in the header.
Key Changes:
- Added toast notification when entity detail fetching fails, with fallback entity state to maintain UI context
- Refactored
EntityDetailPanelto use unified conditional rendering with dedicated error state display - Removed redundant
console.errorcalls in store actions where toast notifications provide user feedback
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/lib/store.ts | Enhanced selectEntity error handling to set fallback entity with error state instead of clearing selection; added toast notification for failures; removed redundant console.error statements |
| src/components/EntityDetailPanel.tsx | Refactored conditional rendering to support error state display while preserving entity header; unified component structure to reduce code duplication |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add toast notifications for API failures (entity details, children loading) - Display fallback UI panel when entity details fail to load instead of empty state - Infer entity type from path structure for better error context - Add explicit error property to SovdEntityDetails interface - Improve error messages: include details for HTTP errors, friendly JSON validation - Remove unnecessary console.error calls and try/catch wrappers - Fix duplicate toast on auto-connect failure (React Strict Mode) - Add request timeout handling with user-friendly messages
4bf61b0 to
75a3ae8
Compare
mfaferek93
approved these changes
Dec 2, 2025
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.
Pull Request
Summary
Issue
Type
Testing
manual testing + npm lint + npm build
Checklist
npm run lint)npm run build)