Skip to content

Feature: Federated Capture/Dataset web UI display - #346

Merged
klpoland merged 11 commits into
masterfrom
feature-kpoland-federation-ui-alignment
Sep 17, 2026
Merged

klpoland merged 11 commits into
masterfrom
feature-kpoland-federation-ui-alignment

Conversation

@klpoland

@klpoland klpoland commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

This feature adds logic and fixes UI bugs for displaying capture and dataset details from federated opensearch indices in the web UI to users (no downloads, metadata only).


Note

Medium Risk
Changes federation visibility and list-merge behavior (local vs OpenSearch) across capture/dataset surfaces; incorrect filters could hide or duplicate assets, and is_federated model properties add per-request OpenSearch lookups.

Overview
Extends fed-datasets and fed-captures OpenSearch mappings and export payloads (e.g. owner_name, visibility flags, timestamps) so peer documents match what the gateway lists and modals expect.

Federated search now builds bool queries with must_not rules: exclude deleted docs, hide non-public datasets, require public_dataset_ids for peer captures, and always exclude the local site so Postgres remains authoritative for on-host assets.

List UX is unified via shared list_helpers: local and peer rows merge with UUID dedup (local wins), capture lists add published-discovery and federated badges plus an Owner column, and dataset/user lists pull peer hits through the same helpers. The standalone capture list JSON API is removed; legacy /users/file-list/api/ redirects to the capture list page.

Details modals accept ?federated_peer=true to load metadata from OpenSearch (read-only capture names, no visualize for peer DRF). Front-end wiring sets data-federated-peer on list links accordingly.

Export adds owner_name on captures and ISO-8601 datetimes in CaptureFederationSerializer; regression tests cover mapping fields and search-body construction.

Reviewed by Cursor Bugbot for commit cdadd64. Bugbot is set up for automated code reviews on this repo. Configure here.

@semanticdiff-com

semanticdiff-com Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  gateway/sds_gateway/templates/users/components/capture_details_modal_body.html  92% smaller
  gateway/sds_gateway/static/js/actions/details/CaptureDetailsModalBehavior.js  50% smaller
  gateway/sds_gateway/static/css/file-list.css  33% smaller
  gateway/sds_gateway/users/views/captures.py  29% smaller
  gateway/sds_gateway/users/views/details_modal_registry.py  17% smaller
  gateway/sds_gateway/static/js/constants/detailsModalConfig.js  15% smaller
  gateway/sds_gateway/templates/users/components/capture_list_table_row.html  10% smaller
  gateway/sds_gateway/users/views/datasets.py  7% smaller
  gateway/sds_gateway/api_methods/helpers/list_helpers.py  3% smaller
  common/sds_opensearch_query/mapping.py  0% smaller
  common/sds_opensearch_query/query.py  0% smaller
  federation/sds_federation/schemas/webhooks.py  0% smaller
  federation/sds_federation/testing/sample_data.py  0% smaller
  federation/tests/test_regression_opensearch_indices.py  0% smaller
  gateway/sds_gateway/api_methods/federation/compile_federated_data.py  0% smaller
  gateway/sds_gateway/api_methods/federation/search_helpers.py  0% smaller
  gateway/sds_gateway/api_methods/models.py  0% smaller
  gateway/sds_gateway/api_methods/serializers/capture_serializers.py  0% smaller
  gateway/sds_gateway/api_methods/tests/test_federation_export_contract.py  0% smaller
  gateway/sds_gateway/api_methods/tests/test_federation_search_helpers.py  0% smaller
  gateway/sds_gateway/api_methods/tests/test_list_helpers_published.py  0% smaller
  gateway/sds_gateway/static/js/actions/details/AssetDetailsModalLoader.js  0% smaller
  gateway/sds_gateway/static/js/actions/details/__tests__/CaptureDetailsModalBehavior.test.js  0% smaller
  gateway/sds_gateway/static/js/constants/__tests__/detailsModalConfig.test.js  0% smaller
  gateway/sds_gateway/templates/pages/home.html Unsupported file format
  gateway/sds_gateway/templates/users/components/dataset_list_table_row.html Unsupported file format
  gateway/sds_gateway/templates/users/partials/search_published_datasets_tab.html Unsupported file format
  gateway/sds_gateway/templates/users/published_datasets_list.html  0% smaller
  gateway/sds_gateway/users/tests/test_details_modal_registry.py  0% smaller
  gateway/sds_gateway/users/tests/test_urls.py  0% smaller
  gateway/sds_gateway/users/urls.py  0% smaller
  gateway/sds_gateway/users/views/__init__.py  0% smaller
  gateway/sds_gateway/users/views/details_modal.py  0% smaller
  gateway/sds_gateway/users/views/special_pages.py  0% smaller

@klpoland
klpoland force-pushed the feature-kpoland-federation-ui-alignment branch from 32e0f40 to 3ac4054 Compare September 16, 2026 19:51
@klpoland klpoland self-assigned this Sep 17, 2026
@klpoland klpoland added feature New feature or request gateway Gateway component javascript Pull requests that update non-trivial javascript code federation Federation related work (sync service, document storage, peer configuration, etc.) labels Sep 17, 2026
@klpoland
klpoland marked this pull request as ready for review September 17, 2026 13:07

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread gateway/sds_gateway/users/urls.py
Comment thread gateway/sds_gateway/api_methods/helpers/list_helpers.py Outdated
Comment thread gateway/sds_gateway/api_methods/helpers/list_helpers.py Outdated
Comment thread gateway/sds_gateway/api_methods/federation/search_helpers.py Outdated
Comment thread gateway/sds_gateway/templates/pages/home.html
Comment thread gateway/sds_gateway/users/views/captures.py
Comment thread gateway/sds_gateway/api_methods/helpers/list_helpers.py
@klpoland
klpoland requested a review from mjcurran September 17, 2026 13:30

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread gateway/sds_gateway/users/views/captures.py
Comment thread gateway/sds_gateway/users/views/details_modal_registry.py
Comment thread gateway/sds_gateway/users/views/details_modal_registry.py
Comment thread gateway/sds_gateway/api_methods/helpers/list_helpers.py Outdated
Comment thread gateway/sds_gateway/api_methods/helpers/list_helpers.py

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread gateway/sds_gateway/api_methods/federation/search_helpers.py
Comment thread gateway/sds_gateway/users/views/captures.py

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread common/sds_opensearch_query/mapping.py
Comment thread common/sds_opensearch_query/mapping.py

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread gateway/sds_gateway/api_methods/helpers/list_helpers.py
Comment thread gateway/sds_gateway/api_methods/helpers/list_helpers.py

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread gateway/sds_gateway/users/views/details_modal_registry.py

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread gateway/sds_gateway/api_methods/models.py
Comment thread gateway/sds_gateway/api_methods/helpers/list_helpers.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cdadd64. Configure here.

Comment thread gateway/sds_gateway/users/views/details_modal_registry.py
@klpoland
klpoland merged commit df2776d into master Sep 17, 2026
6 checks passed
@klpoland
klpoland deleted the feature-kpoland-federation-ui-alignment branch September 17, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request federation Federation related work (sync service, document storage, peer configuration, etc.) gateway Gateway component javascript Pull requests that update non-trivial javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants