Repository navigation
FEAT: Show built-in dataset provider descriptions in the GUI - #4063
Roman Lutz (romanlutz) merged 10 commits into
Conversation
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Copilot review overview
4 open issues
inspect.cleandoc(...)is used butinspectis not imported in the shown imports, which will… · Newinspect.cleandoc(...)is used butinspectis not imported in the shown imports, which will… · New This log drops all diagnostic context, which can make production troubleshooting difficult. If you… · New The URL sanitization currently allowshttpand does not exclude URL fragments. Fragments can… · New
What changed in this PR
Adds provider-level dataset descriptors so the dataset catalog can show “available” datasets with default provider metadata (without fetching seeds), and updates the backend API + frontend UI to support browsing stored vs available views.
Changes:
- Introduces
SeedDatasetDescriptorand providerdescribe_async()/ descriptor discovery APIs. - Extends
/api/datasetsresponses withprovidermetadata and updates DatasetService aggregation logic. - Updates frontend catalog/querying and detail views to browse “In memory / Available / All” datasets and display provider metadata.
| File | Description |
|---|---|
| tests/unit/datasets/test_provider_descriptors.py | Adds async unit tests ensuring descriptor discovery doesn’t fetch/materialize seeds or leak credentials. |
| tests/unit/backend/test_dataset_service.py | Updates tests to use provider descriptors and verifies provider estimates remain separate from stored counts. |
| pyrit/datasets/seed_datasets/seed_metadata.py | Adds SeedDatasetDescriptor dataclass to represent default provider facts. |
| pyrit/datasets/seed_datasets/seed_dataset_provider.py | Implements describe_async() and get_all_dataset_descriptors_async() for provider discovery. |
| pyrit/datasets/seed_datasets/remote/*.py | Declares required env vars and access URLs for remote providers. |
| pyrit/datasets/seed_datasets/local/local_dataset_loader.py | Avoids seed materialization during catalog discovery by reading YAML metadata only. |
| pyrit/datasets/__init__.py | Exports SeedDatasetDescriptor for external use. |
| pyrit/backend/services/dataset_service.py | Uses descriptors to enrich dataset listing with provider metadata. |
| pyrit/backend/models/datasets.py | Adds DatasetProviderInfo and nests it in DatasetInfo. |
| frontend/src/types/index.ts | Adds DatasetProviderInfo and extends DatasetInfo with optional provider. |
| frontend/src/hooks/useLoadedDatasets.ts | Allows requesting available providers by toggling loaded_only. |
| frontend/src/components/Datasets/datasetQuery.ts | Adds view to query params and filters based on memory/available/all. |
| frontend/src/components/Datasets/*.test.ts(x) | Updates/extends frontend tests for new views and unloaded-provider detail behavior. |
| frontend/src/components/Datasets/DatasetCatalog.tsx | Adds view selector and includes provider metadata in facets. |
| frontend/src/components/Datasets/DatasetSelection.tsx | Allows dataset detail route for unloaded providers without fetching seeds. |
| frontend/src/components/Datasets/DatasetCard.tsx | Displays provider metadata section and availability badges. |
| frontend/README.md | Documents the new dataset views and provider metadata behavior. |
Review effort: Lite
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Validate provider metadata without blocking stored browsing, retain local provenance, and reject unsafe provider links. Keep modality filters and empty states consistent across catalog views, with read-only browser regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep provider declarations independent of stored seed categories across catalog views. Declare canonical public Hugging Face sources without interpreting arbitrary paths, and cover loading transitions and no-fetch discovery. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed both open review findings in 107bd46 and merged main through 2870e0a.
Validation passed: 5,577 Python tests, 111 frontend tests, 4 real-backend desktop/mobile browser tests, the production frontend build, frontend lint, all pre-commit hooks, and full Before / afterCaptured from the real production GUI and isolated backend, using two synthetic HarmBench rows through the real loader with only its download mocked. No remote datasets were fetched. Before is aeb36d9; after is 107bd46 with main merged. Images are cropped to the content panel to omit operator/navigation chrome and are pinned to a separate evidence commit in my fork, not added to this PR's source tree.
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Updated the provider links in 0985985 following the screenshot feedback. Source, License, and Access remain field labels, but their links now display the actual destination URLs instead of repeating those labels. Accessible names include both the field and destination. Missing URLs still show Unknown.
Verified: 44 targeted frontend tests and 4 real-backend browser tests passed, including visible URLs, link destinations, and no horizontal overflow at 1280px/390px. Frontend ESLint, TypeScript, production build, and applicable pre-commit checks passed. Screenshot binaries remain outside the PR source branch. |
Use separated label/value rows with responsive wrapping instead of an unstyled definition list. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
The previous URL-text fix did not address the actual readability problem: the provider definition list was unstyled, so labels and values looked like one continuous list. Fixed in 4a33187:
Verified the actual label/value geometry and stronger label emphasis in 4 passing real-backend browser tests at 1280px/390px, including row separation and no horizontal overflow. All 44 targeted frontend tests, ESLint, TypeScript, production build, and applicable pre-commit checks passed. The full metadata regions are shown above, without operator/navigation chrome; screenshot binaries are outside the PR source branch. |
Preserve unloaded provider browsing coverage and main's Chat return, draft import, and dataset cursor tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Richard Lundeen (richlundeen)
left a comment
There was a problem hiding this comment.
Automated review completed. No blocking concerns remain. This review records source coverage; merging is handled separately.












Description
Fixes #2754. Built-in providers now show their default description and available source, access and metadata hints in the existing dataset catalog and detail pages, including before a dataset is loaded.
cc Roman Lutz (@romanlutz)