Skip to content

Conversation

@GitHK
Copy link
Contributor

@GitHK GitHK commented Sep 26, 2025

What do these changes do?

In order to more easily define and maintain layouts in NiceGUI a BaseUpdatableComponent and a BaseUpdatableDisplayModel were added.

  • BaseUpdatableDisplayModel allows the BaseUpdatableComponent to subscribe to type and value changes on some attributes. With this techniques different UI layouts can be rendered (swapped)
  • Added UpdatableComponentStack which allows to automatically render a BaseUpdatableComponent when a BaseUpdatableDisplayModel is added and also removes the UI component when the model is removed.

Related issue/s

How to test

Dev-ops

@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

❌ Patch coverage is 96.74797% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.84%. Comparing base (58f9862) to head (c45096b).
⚠️ Report is 1 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (58f9862) and HEAD (c45096b). Click for more details.

HEAD has 31 uploads less than BASE
Flag BASE (58f9862) HEAD (c45096b)
unittests 32 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #8427       +/-   ##
===========================================
- Coverage   87.84%   63.84%   -24.01%     
===========================================
  Files        1957      824     -1133     
  Lines       76126    36585    -39541     
  Branches     1342      175     -1167     
===========================================
- Hits        66875    23357    -43518     
- Misses       8847    13171     +4324     
+ Partials      404       57      -347     
Flag Coverage Δ *Carryforward flag
integrationtests 60.46% <ø> (-3.62%) ⬇️ Carriedforward from 48e84c1
unittests 96.34% <96.74%> (+9.82%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Components Coverage Δ
pkg_aws_library ∅ <ø> (∅)
pkg_celery_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library ∅ <ø> (∅)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration ∅ <ø> (∅)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 76.80% <ø> (-8.19%) ⬇️
agent ∅ <ø> (∅)
api_server ∅ <ø> (∅)
autoscaling ∅ <ø> (∅)
catalog ∅ <ø> (∅)
clusters_keeper ∅ <ø> (∅)
dask_sidecar ∅ <ø> (∅)
datcore_adapter ∅ <ø> (∅)
director ∅ <ø> (∅)
director_v2 60.73% <ø> (-30.17%) ⬇️
dynamic_scheduler 96.34% <96.74%> (+0.03%) ⬆️
dynamic_sidecar 81.87% <ø> (-8.56%) ⬇️
efs_guardian ∅ <ø> (∅)
invitations ∅ <ø> (∅)
payments ∅ <ø> (∅)
resource_usage_tracker ∅ <ø> (∅)
storage ∅ <ø> (∅)
webclient ∅ <ø> (∅)
webserver 59.00% <ø> (-28.85%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58f9862...c45096b. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GitHK GitHK added this to the Cheops milestone Sep 26, 2025
@GitHK GitHK self-assigned this Sep 26, 2025
@mergify
Copy link
Contributor

mergify bot commented Sep 26, 2025

🧪 CI Insights

Here's what we observed from your CI run for c45096b.

✅ Passed Jobs With Interesting Signals

Pipeline Job Signal Health on master Retries 🔍 CI Insights 📄 Logs
CI system-tests Base branch is broken, but the job passed. Looks like this might be a real fix 💪 Broken 0 View View
unit-tests Base branch is broken, but the job passed. Looks like this might be a real fix 💪 Broken 0 View View

@GitHK GitHK requested a review from Copilot September 29, 2025 07:12
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 introduces new NiceGUI rendering aids to improve UI component management. The changes add a BaseUpdatableComponent and BaseUpdatableDisplayModel architecture that enables dynamic UI rendering based on model changes, along with an UpdatableComponentStack for automatic component lifecycle management.

  • Introduces BaseUpdatableDisplayModel with subscription capabilities for type and value changes
  • Adds BaseUpdatableComponent as a base class for UI components that can be dynamically updated
  • Implements UpdatableComponentStack for automatic rendering and removal of UI components

Reviewed Changes

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

Show a summary per file
File Description
services/dynamic-scheduler/tests/unit/api_frontend/helpers.py Refactored screenshot handling by extracting common functionality and adding screenshot cleanup
services/dynamic-scheduler/tests/unit/api_frontend/conftest.py Added fixtures for screenshot cleanup and converted utility function to fixture
services/dynamic-scheduler/tests/unit/api_frontend/_common/test_updatable_component.py Comprehensive integration tests for the new updatable component system
services/dynamic-scheduler/tests/unit/api_frontend/_common/test_base_display_model.py Unit tests for the base display model functionality
services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/stack.py Implementation of UpdatableComponentStack for managing multiple UI components
services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/base_display_model.py Core BaseUpdatableDisplayModel with subscription and update capabilities
services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/base_component.py BaseUpdatableComponent abstract base class for UI components
services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/_common/_mixins.py Common mixins for display and parent element management

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Andrei Neagu added 2 commits September 29, 2025 09:17
@GitHK GitHK marked this pull request as ready for review September 29, 2025 07:19
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.

thx

PS: for a moment I read "rendering Ads" :-D

@pcrespov pcrespov requested a review from Copilot September 29, 2025 07:41
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

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


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pcrespov
Copy link
Member

@GitHK Please fill "Related issue/s" and "Labels" ... it helps connecting and classifying issues. e.g. to build the release notes. thx

@GitHK GitHK enabled auto-merge (squash) September 29, 2025 08:18
@sonarqubecloud
Copy link

@GitHK GitHK merged commit b24fbf5 into ITISFoundation:master Sep 29, 2025
58 of 59 checks passed
@GitHK GitHK deleted the pr-osparc-migrate-dy-scheduler-part4 branch September 29, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants