Skip to content

feat(studio): Data sample panel#187

Open
steramae-nvidia wants to merge 3 commits into
mainfrom
steramae/astd-174-filesets-dataset-preview-on-card-tab
Open

feat(studio): Data sample panel#187
steramae-nvidia wants to merge 3 commits into
mainfrom
steramae/astd-174-filesets-dataset-preview-on-card-tab

Conversation

@steramae-nvidia
Copy link
Copy Markdown
Contributor

@steramae-nvidia steramae-nvidia commented Jun 4, 2026

Screenshot 2026-06-04 at 1 12 53 PM

This PR adds a data sample to the bottom right panel in order to support quick previews of the data in the dataset card case.

This also slightly changes the panel layout in the FilesetCard component. It adds a Resizeable panel so users can choose which view to focus on (README or the dataset sample)

Summary by CodeRabbit

  • New Features

    • Data sample preview panel for dataset filesets with file selection, sampling method, and row-count controls.
    • Resizable two-pane layout for improved content organization.
  • Bug Fixes

    • Parquet BigInt values now serialize safely as strings for downloads/previews.
  • Improvements

    • Centered loading spinner during file fetches and inline error banners on load failure.
    • Added a loading scenario to component previews.
  • Tests

    • New tests for sampling panel and file-content handling.

Signed-off-by: Sean Teramae <steramae@nvidia.com>
@steramae-nvidia steramae-nvidia requested review from a team as code owners June 4, 2026 20:12
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8480c219-0783-4bac-a4c7-7a81beeb2ff9

📥 Commits

Reviewing files that changed from the base of the PR and between 03dc6f1 and 0fe3218.

📒 Files selected for processing (1)
  • web/packages/studio/src/routes/FilesetDetailRoute/FilesetCard/DatasetSamplePanel.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/packages/studio/src/routes/FilesetDetailRoute/FilesetCard/DatasetSamplePanel.tsx

📝 Walkthrough

Walkthrough

Adds BigInt-safe Parquet row serialization; shows a centered Spinner and early-error Banner in FileSamplingSnippet; adds DatasetSamplePanel with tests; integrates the panel into FilesetCard using ResizeablePanel; and tweaks route/container sizing and a test assertion.

Changes

Dataset file preview and sampling

Layer / File(s) Summary
Parquet BigInt safe serialization
web/packages/studio/src/api/datasets/useDatasetFileContent.ts, web/packages/studio/src/api/datasets/useDatasetFileContent.spec.ts
Adds jsonReplacer and serializeParquetRow to convert bigint values to strings when serializing Parquet rows; replaces direct JSON.stringify usage and adds tests verifying JSONL output contains stringified BigInt.
FileSamplingSnippet loading and error UI
web/packages/studio/src/components/FileSamplingSnippet/FileSamplingSnippet.tsx, web/packages/studio/src/components/FileSamplingSnippet/FileSamplingSnippet.stories.tsx
Imports Flex/Spinner, shows a centered Spinner while file content loads, standardizes the empty-state message, removes requestStatus prop, returns an inline Banner on load error, and adds a Loading Story with delayed MSW handlers.
DatasetSamplePanel component and tests
web/packages/studio/src/routes/FilesetDetailRoute/FilesetCard/DatasetSamplePanel.tsx, web/packages/studio/src/routes/FilesetDetailRoute/FilesetCard/DatasetSamplePanel.spec.tsx
New component for data sampling with file selection, sampling method and max-row controls, and display-mode heuristics; tests cover empty state, defaults, file listing, mode selection, file switching, and method selection.
FilesetCard layout and DatasetSamplePanel integration
web/packages/studio/src/routes/FilesetDetailRoute/FilesetCard/index.tsx
Replaces Grid layout with ResizeablePanel and conditionally renders DatasetSamplePanel when fileset.purpose === FilesetPurpose.dataset; updates imports.
Container sizing and scroll behavior adjustments
web/packages/studio/src/components/common/ResizeablePanel/index.tsx, web/packages/studio/src/routes/FilesetDetailRoute/index.tsx
Adds w-full to ResizeablePanel wrapper; simplifies FilesetDetailRoute sizing and removes prior flex/overflow utilities from TabsContent.
Test assertion updates
web/packages/studio/src/components/evaluation/Jobs/form/MetricTestPanel.spec.tsx
Replaces an empty-editor assertion with an explicit "Failed to load file content..." error message assertion while keeping "Run Test" disabled expectation.

Possibly related PRs

Suggested reviewers

  • htolentino-nvidia
  • nv-odrulea
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title accurately summarizes the main addition: a new data sample panel component for dataset preview functionality in the FilesetCard.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch steramae/astd-174-filesets-dataset-preview-on-card-tab

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Suite Lines Covered Line Rate Branch Rate
Unit Tests 18712/24765 75.6% 62.0%
Integration Tests 11992/23529 51.0% 26.1%

@htolentino-nvidia
Copy link
Copy Markdown
Contributor

I like the idea a lot, I'm just getting a bit of a weird behaviour with the scrolling on that section:
image

Signed-off-by: Sean Teramae <steramae@nvidia.com>
@steramae-nvidia
Copy link
Copy Markdown
Contributor Author

I like the idea a lot, I'm just getting a bit of a weird behaviour with the scrolling on that section: image

@htolentino-nvidia taking a look!

Signed-off-by: Sean Teramae <steramae@nvidia.com>
@steramae-nvidia
Copy link
Copy Markdown
Contributor Author

steramae-nvidia commented Jun 4, 2026

I like the idea a lot, I'm just getting a bit of a weird behaviour with the scrolling on that section: image

@htolentino-nvidia taking a look!

Screenshot 2026-06-04 at 3 19 11 PM

Fixed by removing one scroll bar on the outer container (the inner data view still needs scroll bars)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants