Skip to content

feat(studio): Support searching for fileset file select - #1151

Merged
steramae-nvidia merged 3 commits into
mainfrom
steramae/dataset-searchable
Aug 11, 2026
Merged

feat(studio): Support searching for fileset file select#1151
steramae-nvidia merged 3 commits into
mainfrom
steramae/dataset-searchable

Conversation

@steramae-nvidia

@steramae-nvidia steramae-nvidia commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Signed-off-by: Sean Teramae steramae@nvidia.com

Summary by CodeRabbit

  • New Features

    • Added a reusable searchable fileset picker with pagination, workspace and purpose filters, loading states, grouping, and customizable option rendering.
    • Added server-side fileset search with newest-first ordering and infinite loading.
    • Updated dataset and deployment configuration flows to use searchable, paginated fileset selection while retaining existing-file loading and automatic selection.
  • Bug Fixes

    • Improved dataset selection handling for loading, failed searches, filtering, and form synchronization.
  • Tests

    • Expanded coverage for pagination, filtering, sorting, loading, and selection behavior.

@steramae-nvidia
steramae-nvidia requested review from a team as code owners August 6, 2026 22:54
@steramae-nvidia

Copy link
Copy Markdown
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

The PR adds a shared React Hook Form fileset selector with workspace filtering, server-side search, purpose filtering, pagination, grouping, loading states, and custom rendering. Dataset and Studio components now use the shared selector.

Fileset selector migration

Layer / File(s) Summary
Paginated fileset search hook
web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.ts, web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.test.tsx
Adds newest-first pagination, accumulated results, guarded loading, server-side filters, error handling, cache isolation, and query coverage.
Reusable searchable selector
web/packages/common/src/components/FilesetSearchableSelect/index.tsx
Adds typed props and renders a controlled searchable selector with form bindings, grouping, leading options, loading states, pagination, and selected FilesetOutput callbacks.
Dataset selector migration and validation
web/packages/common/src/components/UploadModal/DatasetUploader/Select.tsx, web/packages/common/src/components/UploadModal/DatasetUploader/Select.test.tsx
Migrates dataset selection to the shared selector. Tests cover paginated queries, filtering, loading, failures, and accessible option selection.
Studio shared-component wiring
web/packages/studio/src/components/ColumnConfigPanel/SeedDatasetConfig.tsx, web/packages/studio/src/routes/DeploymentsListRoute/CreateDeploymentSidePanel/WorkspaceSourceFields.tsx
Updates Studio consumers to import the shared selector from @nemo/common and removes the local implementation dependency.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant FilesetSearchableSelect
  participant useFilesetSearch
  participant filesListFilesets
  User->>FilesetSearchableSelect: Enter search or open selector
  FilesetSearchableSelect->>useFilesetSearch: Apply workspace, search, and purpose filters
  useFilesetSearch->>filesListFilesets: Request fileset page
  filesListFilesets-->>useFilesetSearch: Return paginated filesets
  useFilesetSearch-->>FilesetSearchableSelect: Provide sorted results and loadMore
  FilesetSearchableSelect-->>User: Render selectable filesets
  User->>FilesetSearchableSelect: Select fileset
  FilesetSearchableSelect-->>User: Emit selected FilesetOutput
Loading

Possibly related PRs

Suggested reviewers: marcusds

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding fileset search support to the Studio file selector.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch steramae/dataset-searchable

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/packages/common/src/components/FilesetSearchableSelect/index.tsx`:
- Around line 69-81: Update the fileset option construction near options and
handleChange so each rendered option retains its corresponding fileset,
including custom values from renderOption. Resolve the selected fileset by
matching the change value against the stored option.value, then pass that
fileset to onChange instead of matching getEntityReference(fileset).
- Around line 14-37: Update FilesetSearchableSelectFormFieldProps and
FilesetSearchableSelectProps to use interface declarations instead of type
aliases, preserving their existing fields and generic constraint. Add an
explicit return type to the FilesetSearchableSelect component.

In
`@web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.test.tsx`:
- Line 7: Use type-only imports for FilesetOutput in
web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.test.tsx:7-7,
web/packages/common/src/components/UploadModal/DatasetUploader/Select.tsx:12-14,
and
web/packages/common/src/components/UploadModal/DatasetUploader/Select.test.tsx:7-14.
In Select.tsx, also import FC as a type; in Select.test.tsx, split
UploadModalState into a type-only import while preserving any runtime imports.

In
`@web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.ts`:
- Around line 61-97: Expose the error state from useFilesetSearch by returning
the useInfiniteQuery error, then update the FilesetSearchableSelect component to
render a failure message when filesListFilesets rejects instead of “No filesets
found”; update Select.test.tsx to assert the failure message. Apply changes in
web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.ts
(lines 61-97),
web/packages/common/src/components/FilesetSearchableSelect/index.tsx (lines
63-100), and
web/packages/common/src/components/UploadModal/DatasetUploader/Select.test.tsx
(lines 138-146).
- Around line 61-81: Update the useInfiniteQuery queryKey in useFilesetSearch to
include pageSize, ensuring caches differ when the filesListFilesets request size
changes. Add a regression test covering separate cache behavior for different
pageSize values.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0ed5446e-0f80-47a0-a8d8-bbeee9cfd0dd

📥 Commits

Reviewing files that changed from the base of the PR and between c71ca67 and 5972896.

📒 Files selected for processing (8)
  • web/packages/common/src/components/FilesetSearchableSelect/index.tsx
  • web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.test.tsx
  • web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.ts
  • web/packages/common/src/components/UploadModal/DatasetUploader/Select.test.tsx
  • web/packages/common/src/components/UploadModal/DatasetUploader/Select.tsx
  • web/packages/studio/src/components/ColumnConfigPanel/SeedDatasetConfig.tsx
  • web/packages/studio/src/routes/DeploymentsListRoute/CreateDeploymentSidePanel/FilesetSearchableSelect.tsx
  • web/packages/studio/src/routes/DeploymentsListRoute/CreateDeploymentSidePanel/WorkspaceSourceFields.tsx
💤 Files with no reviewable changes (1)
  • web/packages/studio/src/routes/DeploymentsListRoute/CreateDeploymentSidePanel/FilesetSearchableSelect.tsx

Comment thread web/packages/common/src/components/FilesetSearchableSelect/index.tsx Outdated
Comment thread web/packages/common/src/components/FilesetSearchableSelect/index.tsx Outdated
Comment thread web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.ts Outdated
Comment thread web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.ts Outdated
@github-actions github-actions Bot added the feat label Aug 6, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 32002/40622 78.8% 63.6%
Integration Tests N/A N/A N/A

@steramae-nvidia
steramae-nvidia force-pushed the steramae/dataset-searchable branch from 5972896 to 7550a1d Compare August 7, 2026 20:58
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.ts`:
- Around line 50-51: Validate pageSize in useFilesetSearch before the API
request, requiring an integer between 1 and 100 inclusive to match the API’s
page_size limit. Ensure the request uses only this validated value, and add
boundary tests covering 1, 100, and invalid values outside the range or
non-integers.

In `@web/packages/common/src/components/UploadModal/DatasetUploader/Select.tsx`:
- Around line 59-90: Update handleDatasetSelect to track the active fileset
request and ignore any success or error completion that no longer matches the
current selection. When selecting NEW_DATASET_VALUE or another dataset,
invalidate the prior request and clear SET_FETCHING as needed; only the latest
request may dispatch SET_FILES, SET_ERRORS, or finish fetching.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a6714ea1-3846-4d09-bd01-3075c12c2974

📥 Commits

Reviewing files that changed from the base of the PR and between 3fea04c and 7550a1d.

📒 Files selected for processing (8)
  • web/packages/common/src/components/FilesetSearchableSelect/index.tsx
  • web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.test.tsx
  • web/packages/common/src/components/FilesetSearchableSelect/useFilesetSearch.ts
  • web/packages/common/src/components/UploadModal/DatasetUploader/Select.test.tsx
  • web/packages/common/src/components/UploadModal/DatasetUploader/Select.tsx
  • web/packages/studio/src/components/ColumnConfigPanel/SeedDatasetConfig.tsx
  • web/packages/studio/src/routes/DeploymentsListRoute/CreateDeploymentSidePanel/FilesetSearchableSelect.tsx
  • web/packages/studio/src/routes/DeploymentsListRoute/CreateDeploymentSidePanel/WorkspaceSourceFields.tsx
💤 Files with no reviewable changes (1)
  • web/packages/studio/src/routes/DeploymentsListRoute/CreateDeploymentSidePanel/FilesetSearchableSelect.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • web/packages/studio/src/routes/DeploymentsListRoute/CreateDeploymentSidePanel/WorkspaceSourceFields.tsx
  • web/packages/studio/src/components/ColumnConfigPanel/SeedDatasetConfig.tsx
  • web/packages/common/src/components/UploadModal/DatasetUploader/Select.test.tsx
  • web/packages/common/src/components/FilesetSearchableSelect/index.tsx

@steramae-nvidia
steramae-nvidia force-pushed the steramae/dataset-searchable branch from 7550a1d to e411942 Compare August 10, 2026 20:42
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@steramae-nvidia
steramae-nvidia force-pushed the steramae/dataset-searchable branch from e411942 to ebad0b2 Compare August 10, 2026 23:32
Signed-off-by: Sean Teramae <steramae@nvidia.com>
Signed-off-by: Sean Teramae <steramae@nvidia.com>
Signed-off-by: Sean Teramae <steramae@nvidia.com>
@steramae-nvidia
steramae-nvidia force-pushed the steramae/dataset-searchable branch from ebad0b2 to e278556 Compare August 11, 2026 16:35
@steramae-nvidia
steramae-nvidia added this pull request to the merge queue Aug 11, 2026
Merged via the queue into main with commit 8880e89 Aug 11, 2026
56 of 99 checks passed
@steramae-nvidia
steramae-nvidia deleted the steramae/dataset-searchable branch August 11, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants