-
Notifications
You must be signed in to change notification settings - Fork 32
🎨🐛 [Frontend] Handle error on project/services
#7883
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
🎨🐛 [Frontend] Handle error on project/services
#7883
Conversation
project/services
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 improves the frontend handling of cases where the backend returns an error or missing data for the project/services call, ensuring that the study card is blocked appropriately while still allowing other actions.
- In osparc/study/Utils.js, the logic in __getBlockedState now explicitly checks for null services.
- In osparc/dashboard/CardBase.js, updates include making the services property nullable and enhancing error handling and UI blocking for unknown or inaccessible services.
- Minor UI adjustments were made in DataBrowser.js and logical fixes in ResourceDetails.js.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| services/static-webserver/client/source/class/osparc/study/Utils.js | Updated service check in __getBlockedState to explicitly handle null. |
| services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js | Inverted condition to control template page creation. |
| services/static-webserver/client/source/class/osparc/dashboard/DataBrowser.js | Added a paddingBottom property on TreeFolderView for improved layout. |
| services/static-webserver/client/source/class/osparc/dashboard/CardBase.js | Modified services attribute to be nullable and refactored service error handling UI. |
Comments suppressed due to low confidence (3)
services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js:807
- The condition was inverted from the previous logic; please confirm that returning null when templates are not shown is the intended behavior.
!osparc.product.Utils.showTemplates()
services/static-webserver/client/source/class/osparc/dashboard/DataBrowser.js:46
- [nitpick] Consider adding a code comment explaining the reason for setting a custom paddingBottom for TreeFolderView to aid future maintainability.
control = new osparc.file.TreeFolderView().set({ paddingBottom: 15, });
services/static-webserver/client/source/class/osparc/dashboard/CardBase.js:726
- Calling unknownServices unconditionally will block the card; please confirm that this behavior is the intended UX for cases with missing services.
unknownServices();
services/static-webserver/client/source/class/osparc/dashboard/CardBase.js
Show resolved
Hide resolved
project/servicesproject/services
sanderegg
left a comment
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.
thanks!
Would it be possible to selectively refresh the card?
What do you mean? |
|
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 3148d13 |
I mean if I have a broken card, that instead of pressing F5 and reloading everything, I can right click on the card (or the ...) and click a refresh there only. |
|



What do these changes do?
If somehow the backend returns an error on the
project/servicescall, this PR makes the frontend handle that situation in a better way: the card gets blocked, but some actions (not related to services) are still available.Related issue/s
How to test
Dev-ops