-
Notifications
You must be signed in to change notification settings - Fork 32
🎨 Adds client session ID to ProjectDocument + Leave Project Room
#8176
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
🎨 Adds client session ID to ProjectDocument + Leave Project Room
#8176
Conversation
Introduces client session ID to APIs and project update notifications, enabling session-aware updates and improved multi-tab/user experience. Allows the frontend to distinguish between updates from different user sessions, preventing redundant UI refreshes for the originating session when optimistic updates are used. Relates to collaborative editing and real-time notification enhancements.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8176 +/- ##
==========================================
+ Coverage 88.04% 88.12% +0.07%
==========================================
Files 1900 1687 -213
Lines 73074 68044 -5030
Branches 1280 952 -328
==========================================
- Hits 64339 59962 -4377
+ Misses 8355 7790 -565
+ Partials 380 292 -88
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Cleans up obsolete code related to updating frontend node outputs, streamlining the module and reducing maintenance overhead. This helps avoid confusion and ensures only relevant logic is retained.
Streamlines the workflow for updating project documents by separating workbench updates from document and version increment logic. Improves atomicity and clarity in concurrent operations, ensuring that project documents and their versions remain consistent. Enhances maintainability and reduces potential race conditions during project modifications.
ProjectDocument + Leave Project Room
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.
I understand this is to not notify the user session that triggered the change.
Would it not be more efficient to not notify that user session at all instead of sending everything that will just be dumped by this user session? e.g. excluding the sid in the room?
see https://python-socketio.readthedocs.io/en/stable/server.html#rooms
and in particular check the skip_sid argument.
services/web/server/src/simcore_service_webserver/folders/_workspaces_rest.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_project_document_utils.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_projects_service.py
Outdated
Show resolved
Hide resolved
@sanderegg Maybe yes, maybe no. I'm providing this information to the client, and he can do whatever he wants with it. Someone already raised this question in a previous PR regarding the user group ID (at that time, we didn’t realize that a user could have multiple tabs open). |
pcrespov
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.
thx! looks very good. Left some suggestions and questions. thx
services/web/server/src/simcore_service_webserver/folders/_workspaces_rest.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_controller/nodes_rest.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_controller/ports_rest.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_controller/projects_rest.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_project_document_utils.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_project_document_utils.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_projects_repository_legacy.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_project_document_utils.py
Outdated
Show resolved
Hide resolved
|
GitHK
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.
OK, some minor things
services/web/server/src/simcore_service_webserver/db_listener/_db_comp_tasks_listening_task.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/db_listener/_db_comp_tasks_listening_task.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_project_document_service.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_projects_service.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_projects_service.py
Show resolved
Hide resolved
|
@mergify queue |
🟠 Waiting for conditions to match
|
pcrespov
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.
thx
d1f879d
into
ITISFoundation:master



What do these changes do?
ProjectDocument(Frontend client needs it to differentiate between multiple tabs of the same user)X-Client-Session-IdheaderRelated issue/s
How to test
Dev-ops