Skip to content

Conversation

@lucaspar
Copy link
Member

No description provided.

@lucaspar lucaspar self-assigned this Dec 20, 2025
@lucaspar lucaspar added the bug Something isn't working label Dec 20, 2025
Copilot AI review requested due to automatic review settings December 20, 2025 18:56
@lucaspar lucaspar added gateway Gateway component visualization Related to SVI or the visualization component of SDS. labels Dec 20, 2025
@semanticdiff-com
Copy link

semanticdiff-com bot commented Dec 20, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  gateway/sds_gateway/templates/users/partials/capture_modal.html  88% smaller
  gateway/sds_gateway/visualizations/tests/test_views.py  75% smaller
  gateway/config/api_router.py  66% smaller
  gateway/sds_gateway/templates/users/file_list.html  49% smaller
  gateway/config/urls.py  16% smaller
  gateway/sds_gateway/conftest.py  9% smaller
  gateway/.envs/example/django.env Unsupported file format
  gateway/.envs/example/django.prod-example.env Unsupported file format
  gateway/config/settings/base.py  0% smaller
  sdk/docs/mkdocs/changelog.md Unsupported file format

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 adds a feature flag VISUALIZATIONS_ENABLED to conditionally enable or disable the visualizations functionality in the SDS Gateway. This allows deployments to control whether the visualization features are available without needing to modify code.

Key changes:

  • Added VISUALIZATIONS_ENABLED setting in base.py with a default value of True
  • Made visualization URLs conditionally included based on the feature flag
  • Wrapped visualization-related template includes in conditional checks

Reviewed changes

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

Show a summary per file
File Description
sdk/docs/mkdocs/changelog.md Changed release date for version 0.1.17 from a specific date to a placeholder
gateway/sds_gateway/templates/users/partials/capture_modal.html Added conditional rendering of the Visualize button and visualization modal based on feature flag
gateway/sds_gateway/templates/users/file_list.html Added conditional inclusion of visualization modal template based on feature flag
gateway/config/urls.py Made visualization URLs conditionally included in urlpatterns based on feature flag
gateway/config/settings/base.py Added VISUALIZATIONS_ENABLED setting with environment variable support
gateway/.envs/example/django.prod-example.env Added VISUALIZATIONS_ENABLED variable and standardized boolean values to lowercase
gateway/.envs/example/django.env Added VISUALIZATIONS_ENABLED variable and standardized boolean values to lowercase

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

data-capture-type="">
<i class="bi bi-graph-up me-1"></i>Visualize
</button>
{% if VISUALIZATIONS_ENABLED %}
Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

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

The VISUALIZATIONS_ENABLED setting needs to be made available to templates through a context processor. Currently, the templates reference this variable using {% if VISUALIZATIONS_ENABLED %}, but there's no context processor that exposes this setting. You should add a context processor in gateway/sds_gateway/context_processors.py that returns VISUALIZATIONS_ENABLED from the settings, similar to how allauth_settings is exposed in the users app.

Copilot uses AI. Check for mistakes.
@lucaspar lucaspar merged commit ccc5205 into master Dec 20, 2025
3 checks passed
@lucaspar lucaspar deleted the lp/vis-feature-flag branch December 20, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working gateway Gateway component visualization Related to SVI or the visualization component of SDS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants