-
Notifications
You must be signed in to change notification settings - Fork 0
[#6] feat: Improve entity selection error handling and UI feedback #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Pull Request
Summary
Issue
Type
Testing
manual testing + npm lint + npm build
Checklist
npm run lint)npm run build)