Skip to content

Conversation

@odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented Jul 7, 2025

What do these changes do?

This PR improves the UX of the Activity Center Button.

So far we were showing the number of running jobs on the button, but this number would only be updated when the activity center was opened.

In this PR we replace that number with just a dot that will represent whether something or nothing is running.

  • when the app starts, we check if something is running, and if it's the case the dot will be shown (1)
  • when the frontend receives the projectStateUpdated socket event, it will check if it's me the one running it (this will eventually change), and if it's the case the dot will be shown (2)
  • every time the dot has to be shown, a timer will be started/restarted and when it hits the timeout, we check how many jobs are running (1)

JobsRunning

Related issue/s

How to test

Dev-ops

@odeimaiz odeimaiz self-assigned this Jul 7, 2025
@odeimaiz odeimaiz changed the title 🎨 [Frontend] N Jobs 🎨 [Frontend] Enh UX: Number of Active Jobs Jul 7, 2025
@odeimaiz odeimaiz requested a review from Copilot July 7, 2025 15:02
@odeimaiz odeimaiz added this to the Engage milestone Jul 7, 2025
@odeimaiz odeimaiz added t:enhancement Improvement or request on an existing feature a:frontend issue affecting the front-end (area group) labels Jul 7, 2025
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 refactors the Activity Center button to show a simple dot indicator instead of a running-job count, and drives its visibility via initial fetch, socket events, and a periodic timer.

  • Replace numeric label with active/inactive dot elements, driven by a new fetch + socket listener + timer
  • Add amIRunningTheStudy helper in Utils.js for filtering socket payloads
  • Centralize background color into NavigationBar.BG_COLOR and remove legacy job-count events

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
services/static-webserver/client/source/class/osparc/task/TasksButton.js Swapped hard-coded background color for shared BG_COLOR
services/static-webserver/client/source/class/osparc/study/Utils.js Added amIRunningTheStudy helper to inspect socket projectStateUpdated
services/static-webserver/client/source/class/osparc/store/Jobs.js Removed deprecated changeJobsActive event and its firing logic
services/static-webserver/client/source/class/osparc/navigation/NavigationBar.js Extracted BG_COLOR static and used it instead of inline string
services/static-webserver/client/source/class/osparc/jobs/JobsButton.js Overhauled button: numeric count → dot, fetch logic, socket listener, timer
services/static-webserver/client/source/class/osparc/dashboard/CardBase.js Updated pipeline state comment and included new “PUBLISHED” branch
Comments suppressed due to low confidence (1)

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

  • Add a JSDoc comment for amIRunningTheStudy to describe its purpose, parameters, and return value for better maintainability.
    amIRunningTheStudy: function(content) {

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

odeimaiz commented Jul 7, 2025

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented Jul 7, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 342f7a7

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

👁️

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.

ideally we should also have a spinner when stopping a pipeline.
Thanks!

@odeimaiz
Copy link
Member Author

odeimaiz commented Jul 8, 2025

ideally we should also have a spinner when stopping a pipeline. Thanks!

Done 👌

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 8, 2025

Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

👍

@mergify mergify bot merged commit 342f7a7 into ITISFoundation:master Jul 8, 2025
111 of 113 checks passed
@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.

5 participants