Skip to content

Conversation

@matusdrobuliak66
Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 commented Oct 21, 2025

What do these changes do?

  • fix if statement
  • add SUPPORT_CALL type
  • add chatbot user primary group in /me call

Related issue/s

How to test

Dev-ops

None

Summary (AI)

This pull request introduces support for a new SUPPORT_CALL conversation type and adds chatbot group information to the product and user schemas. It updates the backend models, API schemas, and related validation logic to handle these new features. The changes also enhance testing to cover the new chatbot group functionality.

Support conversation enhancements:

  • Added a new SUPPORT_CALL conversation type alongside the existing SUPPORT type in both backend models (ConversationType enums) and OpenAPI schemas, including a database migration stub for future support. Also introduced an is_support_type() helper method to simplify type checks. [1] [2] [3] [4]
  • Updated all REST API endpoints and validation logic to accept both SUPPORT and SUPPORT_CALL conversation types by using the new is_support_type() method instead of direct equality checks. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Chatbot group support:

  • Extended product and user group schemas (MyGroupsGet) to include a new optional chatbot field, with corresponding OpenAPI documentation and example data. [1] [2] [3] [4]
  • Updated domain model adapters to handle the new chatbot group, passing it through all relevant layers and adjusting test coverage to include scenarios with and without chatbot groups. [1] [2] [3] [4] [5] [6] [7]
  • Added a chatbot group example to the group schema documentation and group extra properties. [1] [2]

Other improvements:

  • Changed logging for missing conversations in chatbot trigger processing from debug to warning for better visibility.
  • Fixed test data to include a required base_url field for products.
  • Minor formatting and whitespace cleanups.

These changes collectively enable the platform to distinguish between standard support and support call conversations, and to expose chatbot group information in the API, improving support workflows and integration options.

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 34.61538% with 17 lines in your changes missing coverage. Please review.
βœ… Project coverage is 89.38%. Comparing base (63f2847) to head (ea1ed49).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8541      +/-   ##
==========================================
+ Coverage   87.51%   89.38%   +1.86%     
==========================================
  Files        2011     1687     -324     
  Lines       78591    67023   -11568     
  Branches     1349      647     -702     
==========================================
- Hits        68779    59908    -8871     
+ Misses       9408     6942    -2466     
+ Partials      404      173     -231     
Flag Coverage Ξ”
integrationtests 63.87% <0.00%> (-0.10%) ⬇️
unittests 87.88% <34.61%> (+1.67%) ⬆️
Components Coverage Ξ”
pkg_aws_library βˆ… <ΓΈ> (βˆ…)
pkg_celery_library βˆ… <ΓΈ> (βˆ…)
pkg_dask_task_models_library βˆ… <ΓΈ> (βˆ…)
pkg_models_library 92.87% <80.00%> (-0.01%) ⬇️
pkg_notifications_library 85.20% <ΓΈ> (ΓΈ)
pkg_postgres_database 87.96% <100.00%> (+<0.01%) ⬆️
pkg_service_integration 70.17% <ΓΈ> (ΓΈ)
pkg_service_library βˆ… <ΓΈ> (βˆ…)
pkg_settings_library βˆ… <ΓΈ> (βˆ…)
pkg_simcore_sdk 84.95% <ΓΈ> (ΓΈ)
agent 93.10% <ΓΈ> (ΓΈ)
api_server 91.62% <ΓΈ> (ΓΈ)
autoscaling 95.00% <ΓΈ> (ΓΈ)
catalog 92.06% <ΓΈ> (ΓΈ)
clusters_keeper 99.14% <ΓΈ> (ΓΈ)
dask_sidecar βˆ… <ΓΈ> (βˆ…)
datcore_adapter 97.95% <ΓΈ> (ΓΈ)
director 75.72% <ΓΈ> (ΓΈ)
director_v2 90.91% <ΓΈ> (-0.09%) ⬇️
dynamic_scheduler 96.66% <ΓΈ> (ΓΈ)
dynamic_sidecar 90.47% <ΓΈ> (+0.02%) ⬆️
efs_guardian 89.83% <ΓΈ> (ΓΈ)
invitations 90.90% <ΓΈ> (ΓΈ)
payments 92.80% <ΓΈ> (ΓΈ)
resource_usage_tracker 92.22% <ΓΈ> (+0.05%) ⬆️
storage 86.92% <ΓΈ> (+0.08%) ⬆️
webclient βˆ… <ΓΈ> (βˆ…)
webserver 87.02% <20.00%> (-0.04%) ⬇️

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 63f2847...ea1ed49. 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.

@mergify
Copy link
Contributor

mergify bot commented Oct 21, 2025

πŸ§ͺ CI Insights

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

βœ… Passed Jobs With Interesting Signals

Pipeline Job Signal Health on master Retries πŸ” CI Insights πŸ“„ Logs
CI integration-tests Base branch is broken, but retries were needed. Could be early signs of flakiness πŸ‘€ Broken 2 View View
system-tests Base branch is healthy, but retries were needed. Could be early signs of flakiness πŸ‘€ Healthy 2 View View

@matusdrobuliak66 matusdrobuliak66 marked this pull request as ready for review October 21, 2025 14:34
@matusdrobuliak66 matusdrobuliak66 self-assigned this Oct 21, 2025
@matusdrobuliak66 matusdrobuliak66 added the a:webserver webserver's codebase. Assigning the area is particularly useful for bugs label Oct 21, 2025
@matusdrobuliak66 matusdrobuliak66 added this to the Imparable milestone Oct 21, 2025
@matusdrobuliak66 matusdrobuliak66 changed the title πŸ› chatbot followups πŸ› chatbot followups (πŸ—ƒοΈ) Oct 21, 2025
Copy link
Member

@odeimaiz odeimaiz left a comment

Choose a reason for hiding this comment

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

I'll follow πŸ‘

@matusdrobuliak66
Copy link
Collaborator Author

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented Oct 21, 2025

queue

🟠 Waiting for conditions to match

  • -closed [πŸ“Œ queue requirement]
  • -conflict [πŸ“Œ queue requirement]
  • -draft [πŸ“Œ queue requirement]
  • any of: [πŸ“Œ queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed
  • any of: [πŸ”€ queue conditions]
    • all of: [πŸ“Œ queue conditions of queue default]
      • #approved-reviews-by >= 2 [πŸ›‘ GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [πŸ›‘ GitHub branch protection]
      • #changes-requested-reviews-by=0
      • #review-threads-unresolved = 0 [πŸ›‘ GitHub branch protection]
      • #review-threads-unresolved=0
      • -conflict
      • -draft
      • base=master
      • branch-protection-review-decision = APPROVED [πŸ›‘ GitHub branch protection]
      • label!=πŸ€–-do-not-merge
      • label=πŸ€–-automerge
      • any of: [πŸ›‘ GitHub branch protection]
        • check-skipped = deploy to dockerhub
        • check-neutral = deploy to dockerhub
        • check-success = deploy to dockerhub
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = system-tests
        • check-neutral = system-tests
        • check-skipped = system-tests
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = unit-tests
        • check-neutral = unit-tests
        • check-skipped = unit-tests
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = check OAS' are up to date
        • check-neutral = check OAS' are up to date
        • check-skipped = check OAS' are up to date
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = integration-tests
        • check-neutral = integration-tests
        • check-skipped = integration-tests
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = build-test-images (frontend) / build-test-images
        • check-neutral = build-test-images (frontend) / build-test-images
        • check-skipped = build-test-images (frontend) / build-test-images
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = SonarCloud Code Analysis
        • check-neutral = SonarCloud Code Analysis
        • check-skipped = SonarCloud Code Analysis

@matusdrobuliak66 matusdrobuliak66 added the πŸ€–-automerge marks PR as ready to be merged for Mergify label Oct 21, 2025
@matusdrobuliak66 matusdrobuliak66 enabled auto-merge (squash) October 21, 2025 16:38
@pcrespov pcrespov requested a review from Copilot October 21, 2025 17:49
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 several issues related to chatbot functionality and adds support for a new conversation type. The main changes include:

  • Fixed conditional logic for triggering chatbot processing (checking for REGULAR_USER instead of CHATBOT_USER)
  • Added SUPPORT_CALL conversation type to support phone/call-based support conversations
  • Added chatbot user primary group to /me API endpoint and group listings

Reviewed Changes

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

Show a summary per file
File Description
test_projects_crud_handlers__delete.py Added required base_url field to product insert
users_rest.py Added product_chatbot_primary_group to user profile response
_groups_service.py Added logic to retrieve and return chatbot user's primary group
_groups_rest.py Updated group listing to include chatbot primary group
_conversation_message_service.py Fixed chatbot trigger condition and updated log levels
_conversations_rest.py Replaced direct type comparisons with is_support_type() method
_conversations_messages_rest.py Replaced direct type comparisons with is_support_type() method
_process_chatbot_trigger_service.py Changed log level from debug to warning for missing conversations
openapi.yaml Added SUPPORT_CALL type and chatbot field to API schema
test_modules_db_repositories_groups_extra_properties.py Added base_url field to product configuration
conversations.py Added SUPPORT_CALL enum value
5756d9282a0a_add_support_call_conversationt_ype.py Migration file for SUPPORT_CALL type addition
test_users.py Added test parameter for chatbot user group
groups.py Added chatbot group to schema examples
conversations.py (models-library) Added SUPPORT_CALL type and is_support_type() helper method
users.py Updated MyProfile to include chatbot user group
groups.py (api_schemas) Added chatbot field to MyGroupsGet schema

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

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.

  • Took the liberty to run the ai as well .
  • Please add a more informative title
  • Left some extra suggestions

@sonarqubecloud
Copy link

@matusdrobuliak66 matusdrobuliak66 merged commit 13d4661 into ITISFoundation:master Oct 23, 2025
189 of 201 checks passed
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:webserver webserver's codebase. Assigning the area is particularly useful for bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants