Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Jul 8, 2025

What do these changes do?

This PR adapts the frontend to the new way the backend groups the runs.

As bonus, the Cancel button at the Collection Run level (which will cancel all the projectIds provided in the run), will only be visible if its state is Running and the info button will only be visible if there is any info available.

GroupedRuns

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz self-assigned this Jul 8, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels Jul 8, 2025
@odeimaiz odeimaiz added this to the Engage milestone Jul 8, 2025
@odeimaiz odeimaiz requested a review from Copilot July 8, 2025 14:05
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 adapts the frontend to the backend’s new grouping of runs under a collectionRunId, replaces usages of projectUuid/studyId with projectId/collectionRunId, and adds conditional visibility for the Cancel and Info buttons.

  • Replace projectUuid and studyId with projectId and collectionRunId throughout models, tables, and stores
  • Update resource endpoints and fetching logic to use the new computation-collection-runs APIs
  • Introduce shouldShowFn callbacks to conditionally render Cancel and Info buttons based on run state and available info

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ImageButtonRenderer.js Added shouldShowFn and override to conditionally render buttons
Jobs.js Refactored job store methods to use projectId/collectionRunId
SubRunsTableModel.js Renamed projectUuid property to collectionRunId
SubRunsTable.js Updated columns and action handlers to use collectionRunId and name
SubRunsBrowser.js Renamed setProject to setCollectionRun and updated instantiation
RunsTableModel.js Removed includeChildren, replaced projectUuid with projectId
RunsTable.js Renamed columns, added conditional renderers, updated cancel logic for multiple IDs
RunsBrowser.js Removed includeChildren argument, adjusted RunsTable constructor
ActivityOverview.js Switched to collectionRunId in selection and table instantiation
ActivityCenterWindow.js Updated handler to call setCollectionRun
SubJob.js Added collectionRunId property and renamed nodeName to name
Resources.js Updated endpoints to use /computation-collection-runs and tasks URL
Job.js Replaced projectUuid/projectName with collectionRunId, projectIds, and name
Comments suppressed due to low confidence (3)

services/static-webserver/client/source/class/osparc/jobs/RunsBrowser.js:87

  • [nitpick] The variable is named projectUuid but is passed as the new projectId parameter in RunsTable. Consider renaming this local variable to projectId for clarity and consistency.
          const projectUuid = null;

services/static-webserver/client/source/class/osparc/jobs/RunsTable.js:235

  • [nitpick] When cancelling multiple pipelines at once, the message "Stopping Run" may be misleading (singular). Consider using a plural or more descriptive message (e.g., "Stopping Runs") to reflect the batch operation.
            .then(() => osparc.FlashMessenger.logAs(this.tr("Stopping Run"), "INFO"))

services/static-webserver/client/source/class/osparc/ui/table/cellrenderer/ImageButtonRenderer.js:44

  • The new shouldShowFn conditional rendering behavior in createDataCellHtml should be covered by unit or integration tests to ensure the button visibility logic works correctly in all cases.
    createDataCellHtml: function(cellInfo, htmlArr) {

@odeimaiz odeimaiz marked this pull request as ready for review July 8, 2025 14:08
@odeimaiz odeimaiz changed the title ✨ [Frontend] Display grouped runs ✨ [Frontend] Update to new collection runs Jul 8, 2025
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

👍

@odeimaiz odeimaiz added the 🤖-automerge marks PR as ready to be merged for Mergify label Jul 8, 2025
@odeimaiz
Copy link
Member Author

odeimaiz commented Jul 8, 2025

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented Jul 8, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 4c5a0f3

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 8, 2025

@mergify mergify bot merged commit 4c5a0f3 into ITISFoundation:master Jul 8, 2025
60 checks passed
@odeimaiz odeimaiz deleted the feature/grouped-jobs branch July 8, 2025 16:08
@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