Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Jun 4, 2025

What do these changes do?

Spotted by @sanderegg

In order to Open or Duplicate a project, the frontend needs to know the metadata of the services in it. If these are "unknown", it will disable those actions.

A few weeks ago there was a big refactoring of when and how much metadata of a service and its history is fetched. As a side effect, if your project contains a service which is not in its latest version, you can be affected by this bug.

Buggy (first the buttons are disabled, when the card is opening more info is fetched and they get enabled):
buggy

Fixed:
fixed

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz added this to the Bazinga! milestone Jun 4, 2025
@odeimaiz odeimaiz self-assigned this Jun 4, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels Jun 4, 2025
@odeimaiz odeimaiz marked this pull request as ready for review June 4, 2025 17:02
Copy link
Contributor

Copilot AI left a 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 fixes an issue with Project menu actions by ensuring that metadata for services is correctly evaluated, especially for projects containing services not in their latest version. Key changes include the removal of the HoverMenuButton, renaming functions and method calls for better clarity (e.g. getCantExecuteServices to getCantReadServices), and updates to the service caching and menu handling logic.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
services/static-webserver/client/source/class/osparc/ui/form/HoverMenuButton.js Entire file removal; ensure that this widget is no longer needed
services/static-webserver/client/source/class/osparc/study/Utils.js Renamed getCantExecuteServices to getCantReadServices for improved clarity
services/static-webserver/client/source/class/osparc/store/Services.js Updated extra type info functions and service caching logic; potential undefined ref issue
services/static-webserver/client/source/class/osparc/product/Utils.js Renamed export-related and menu functions for consistent behavior
services/static-webserver/client/source/class/osparc/navigation/StudyTitleWOptions.js Adjusted menu item logic for pipeline conversion and removal of restore item
services/static-webserver/client/source/class/osparc/metadata/ServicesInStudyUpdate.js Updated usage of service access function (renamed)
services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js Wrapped new menu button addition conditions and updated export function names
services/static-webserver/client/source/class/osparc/dashboard/ListButtonItem.js Removed _applyMenu override; verify menu handling is correctly delegated
services/static-webserver/client/source/class/osparc/dashboard/GridButtonItem.js Removed _applyMenu override; verify menu handling is correctly delegated
services/static-webserver/client/source/class/osparc/dashboard/CardBase.js Changed _applyMenu from throwing an error to a concrete implementation
Comments suppressed due to low confidence (3)

services/static-webserver/client/source/class/osparc/study/Utils.js:297

  • [nitpick] The function is renamed from getCantExecuteServices to getCantReadServices, yet it still filters based on the 'execute' property. Consider updating the filtering logic or renaming the function to accurately reflect the checked access right.
getCantReadServices: function(studyServices = []) {

services/static-webserver/client/source/class/osparc/dashboard/CardBase.js:988

  • [nitpick] The abstract _applyMenu method has been replaced with a concrete implementation. Ensure that all subclasses that previously relied on the abstract error throw are updated to accommodate this new behavior.
_applyMenu: function(menu) {

services/static-webserver/client/source/class/osparc/store/Services.js:397

  • The variable 'value' is referenced but not defined in __addServiceToCache. Replace 'value' with 'service' to ensure the correct object is cached.
console.log("don't save", this.__servicesCached[key][version], value);

@odeimaiz odeimaiz changed the title 🐛 [Frontend] Fix: Re-evaluate Project menu actions 🐛 [Frontend] Fix: Disabled actions in Project's menu Jun 4, 2025
@odeimaiz odeimaiz added the 🤖-automerge marks PR as ready to be merged for Mergify label Jun 4, 2025
@odeimaiz
Copy link
Member Author

odeimaiz commented Jun 4, 2025

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Jun 4, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 3d8ae69

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 5, 2025

@mergify mergify bot merged commit 3d8ae69 into ITISFoundation:master Jun 5, 2025
59 checks passed
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 6, 2025
92 tasks
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify a:frontend issue affecting the front-end (area group) t:enhancement Improvement or request on an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants