Skip to content

feat(studio): DD schema list in builder - #847

Merged
steramae-nvidia merged 2 commits into
mainfrom
steramae/dd-schema-list
Jul 23, 2026
Merged

feat(studio): DD schema list in builder#847
steramae-nvidia merged 2 commits into
mainfrom
steramae/dd-schema-list

Conversation

@steramae-nvidia

@steramae-nvidia steramae-nvidia commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-07-22 at 11 47 59 AM

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

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Added a “list” view to the Data Designer with selectable, deletable schema rows and concise per-column descriptions.
    • Introduced a builder view toggle (list vs. canvas) for quicker column inspection.
  • Bug Fixes
    • Improved column ordering by dependency relationships, including safer behavior for cyclic dependencies.
  • Tests
    • Added tests for column sorting and description rendering, including edge cases for judge and generator details.

@steramae-nvidia
steramae-nvidia requested review from a team as code owners July 22, 2026 18:46
@steramae-nvidia

steramae-nvidia commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

@github-actions github-actions Bot added the feat label Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Data Designer builder views

Layer / File(s) Summary
Column dependency and description utilities
web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts, web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.test.ts, web/packages/studio/src/routes/DataDesignerJobBuildRoute/describeColumn.ts, web/packages/studio/src/routes/DataDesignerJobBuildRoute/describeColumn.test.ts
Adds shared reference resolution, stable dependency sorting with cycle handling, and column descriptions with coverage for formatting and ordering cases.
Schema list and row rendering
web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaList.tsx, web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaRow.tsx
Adds an empty-aware schema list that sorts form columns, displays references and descriptions, and supports selection and deletion.
Toolbar view switching
web/packages/studio/src/routes/DataDesignerJobBuildRoute/BuilderToolbar.tsx, web/packages/studio/src/routes/DataDesignerJobBuildRoute/index.tsx
Adds list/canvas mode controls and conditionally renders SchemaList or BuilderCanvas.
Builder control and palette updates
web/packages/studio/src/components/AddColumnPalette/index.tsx, web/packages/studio/src/components/ColumnConfigPanel/SeedDatasetConfig.tsx
Adds horizontal palette padding and reuses precomputed sampling-strategy select items.

Sequence Diagram(s)

sequenceDiagram
  participant BuilderToolbar
  participant DataDesignerJobBuildRoute
  participant SchemaList
  participant BuilderCanvas
  BuilderToolbar->>DataDesignerJobBuildRoute: change selected view mode
  DataDesignerJobBuildRoute->>SchemaList: render list mode
  DataDesignerJobBuildRoute->>BuilderCanvas: render canvas mode
Loading

Possibly related PRs

Suggested reviewers: htolentino-nvidia, marcusds, nv-odrulea

🚥 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 matches the main change: adding a schema list to the builder.
✨ 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/dd-schema-list

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts (1)

693-707: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Export and reuse buildNameMaps instead of reimplementing it. buildNameMaps is the only correct builder of knownNames (it adds seed-dataset provided names); it's private, so SchemaList.tsx reimplements a partial version, causing reference badges to miss dependencies on seed-provided columns.

  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts#L693-L707: add export to buildNameMaps.
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaList.tsx#L30-L33: import buildNameMaps and use const { knownNames } = buildNameMaps(columns); instead of the local Set built from column.name only.
🐛 Proposed fix
-const buildNameMaps = (
+export const buildNameMaps = (
   columns: BuilderColumn[]
 ): { knownNames: Set<string>; idByName: Map<string, string> } => {
 import {
+  buildNameMaps,
   getColumnReferences,
   topologicalSortColumns,
 } from '`@studio/routes/DataDesignerJobBuildRoute/columns`';
...
   const referencesById = useMemo(() => {
-    const knownNames = new Set(columns.map((column) => column.name).filter(Boolean));
+    const { knownNames } = buildNameMaps(columns);
     return new Map(columns.map((column) => [column.id, getColumnReferences(column, knownNames)]));
   }, [columns]);
🤖 Prompt for 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.

In `@web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts` around
lines 693 - 707, Export buildNameMaps from columns.ts so it can be shared, then
update SchemaList.tsx to import and call buildNameMaps(columns), using its
knownNames result instead of the local column.name-only Set; this ensures
seed-dataset-provided names are included in reference badge dependency checks.
Affected sites:
web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts lines
693-707 require exporting buildNameMaps;
web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaList.tsx lines
30-33 require replacing the local Set with the shared helper result.
🧹 Nitpick comments (3)
web/packages/studio/src/routes/DataDesignerJobBuildRoute/BuilderToolbar.tsx (2)

94-94: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Type assertion instead of a guard.

value as BuilderViewMode bypasses the type checker. As per coding guidelines, "Use type assertions sparingly. Prefer type guards and narrowing." Since items only ever emits 'list'/'canvas', risk is low, but a small guard would be safer for future item additions.

🤖 Prompt for 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.

In `@web/packages/studio/src/routes/DataDesignerJobBuildRoute/BuilderToolbar.tsx`
at line 94, Replace the type assertion in the BuilderToolbar onValueChange
handler with a type guard that validates the value is a supported
BuilderViewMode ('list' or 'canvas') before calling onViewModeChange. Ignore or
safely handle unsupported values so future item additions cannot bypass type
checking.

Source: Coding guidelines


91-99: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add accessible names to the icon-only segments. list and canvas need an aria-label or hidden text so the options are announced.

🤖 Prompt for 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.

In `@web/packages/studio/src/routes/DataDesignerJobBuildRoute/BuilderToolbar.tsx`
around lines 91 - 99, Add accessible names to the icon-only items in the
SegmentedControl within BuilderToolbar, ensuring the list and canvas options are
announced by assistive technologies. Use the control’s supported per-item label
or hidden-text mechanism while preserving the existing values and icons.
web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaRow.tsx (1)

12-20: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicates ACCENT_VAR_CLASS from columns.ts, with weaker typing.

Same color→class mapping as columns.ts's ACCENT_VAR_CLASS (line 610), but typed Record<string, string> instead of Record<ColumnTypeColor, string> — a new accent color added there won't be caught here. Export and reuse the original instead of duplicating.

♻️ Reuse instead of duplicating
-/** Accent color → NVIDIA Foundations text token, matching the DAG node icon styling. */
-const ACCENT_ICON_CLASS: Record<string, string> = {
-  blue: 'text-[color:var(--text-color-accent-blue)]',
-  gray: 'text-[color:var(--text-color-accent-gray)]',
-  green: 'text-[color:var(--text-color-accent-green)]',
-  purple: 'text-[color:var(--text-color-accent-purple)]',
-  red: 'text-[color:var(--text-color-accent-red)]',
-  teal: 'text-[color:var(--text-color-accent-teal)]',
-  yellow: 'text-[color:var(--text-color-accent-yellow)]',
-};
+// Reuse the exported ACCENT_VAR_CLASS from columns.ts instead (requires exporting it there).
🤖 Prompt for 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.

In `@web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaRow.tsx`
around lines 12 - 20, Remove the duplicate ACCENT_ICON_CLASS mapping in
SchemaRow.tsx and import/reuse ACCENT_VAR_CLASS from columns.ts. Preserve the
existing color-to-class behavior and rely on the original
Record<ColumnTypeColor, string> typing so new accent colors remain type-checked.
🤖 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.

Outside diff comments:
In `@web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts`:
- Around line 693-707: Export buildNameMaps from columns.ts so it can be shared,
then update SchemaList.tsx to import and call buildNameMaps(columns), using its
knownNames result instead of the local column.name-only Set; this ensures
seed-dataset-provided names are included in reference badge dependency checks.
Affected sites:
web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts lines
693-707 require exporting buildNameMaps;
web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaList.tsx lines
30-33 require replacing the local Set with the shared helper result.

---

Nitpick comments:
In `@web/packages/studio/src/routes/DataDesignerJobBuildRoute/BuilderToolbar.tsx`:
- Line 94: Replace the type assertion in the BuilderToolbar onValueChange
handler with a type guard that validates the value is a supported
BuilderViewMode ('list' or 'canvas') before calling onViewModeChange. Ignore or
safely handle unsupported values so future item additions cannot bypass type
checking.
- Around line 91-99: Add accessible names to the icon-only items in the
SegmentedControl within BuilderToolbar, ensuring the list and canvas options are
announced by assistive technologies. Use the control’s supported per-item label
or hidden-text mechanism while preserving the existing values and icons.

In `@web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaRow.tsx`:
- Around line 12-20: Remove the duplicate ACCENT_ICON_CLASS mapping in
SchemaRow.tsx and import/reuse ACCENT_VAR_CLASS from columns.ts. Preserve the
existing color-to-class behavior and rely on the original
Record<ColumnTypeColor, string> typing so new accent colors remain type-checked.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f7e4045a-bf0d-43ba-b38e-9d65740321a2

📥 Commits

Reviewing files that changed from the base of the PR and between 4e1a5d1 and f628c55.

📒 Files selected for processing (10)
  • web/packages/studio/src/components/AddColumnPalette/index.tsx
  • web/packages/studio/src/components/ColumnConfigPanel/SeedDatasetConfig.tsx
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/BuilderToolbar.tsx
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaList.tsx
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaRow.tsx
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.test.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/describeColumn.test.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/describeColumn.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/index.tsx

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 27117/34832 77.8% 62.1%
Integration Tests 15920/33544 47.5% 19.9%

Comment thread web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaRow.tsx Outdated

@nakolean nakolean 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.

just one nitpick, looks good to me

Signed-off-by: Sean Teramae <steramae@nvidia.com>
Signed-off-by: Sean Teramae <steramae@nvidia.com>
@steramae-nvidia
steramae-nvidia force-pushed the steramae/dd-schema-list branch from f628c55 to 246d23b Compare July 23, 2026 18:17

@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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts (1)

678-707: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

knownNames used by getColumnReferences diverges from buildGraph's.

buildNameMaps (not exported) folds seed-dataset-provided column names into knownNames, so buildGraph's edges include references to seed-provided field names. But SchemaList.tsx can't call the unexported buildNameMaps, so it builds knownNames from only column.name values (see its useMemo computing knownNames from columns.map((c) => c.name)). A column referencing a seed-provided field (e.g. {{topic}} from a seed file) will therefore draw an edge in the canvas view but show no reference badge in the schema list — contradicting this function's own doc comment ("the same dependencies that draw edges in buildGraph").

Export buildNameMaps (or a thin wrapper) so SchemaList.tsx can compute a matching knownNames.

🔧 Proposed fix
-const buildNameMaps = (
+export const buildNameMaps = (
   columns: BuilderColumn[]
 ): { knownNames: Set<string>; idByName: Map<string, string> } => {

Then in SchemaList.tsx, replace the local knownNames computation with buildNameMaps(columns).knownNames.

🤖 Prompt for 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.

In `@web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts` around
lines 678 - 707, Export buildNameMaps from columns.ts, then update
SchemaList.tsx to derive knownNames from buildNameMaps(columns).knownNames
instead of only column.name values, ensuring seed-dataset-provided fields
produce the same reference badges as buildGraph edges.
🤖 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/studio/src/routes/DataDesignerJobBuildRoute/BuilderToolbar.tsx`:
- Around line 91-99: Add accessible names to the list and canvas options in the
SegmentedControl within BuilderToolbar, using aria-label values that identify
each view mode. Apply labels directly to the items if supported; otherwise label
the control using its supported accessibility mechanism while preserving the
existing viewMode behavior.

---

Outside diff comments:
In `@web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts`:
- Around line 678-707: Export buildNameMaps from columns.ts, then update
SchemaList.tsx to derive knownNames from buildNameMaps(columns).knownNames
instead of only column.name values, ensuring seed-dataset-provided fields
produce the same reference badges as buildGraph edges.
🪄 Autofix (Beta)

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: 1fa8b525-d8ea-4c30-89cc-db3f6fef42ff

📥 Commits

Reviewing files that changed from the base of the PR and between f628c55 and 246d23b.

📒 Files selected for processing (10)
  • web/packages/studio/src/components/AddColumnPalette/index.tsx
  • web/packages/studio/src/components/ColumnConfigPanel/SeedDatasetConfig.tsx
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/BuilderToolbar.tsx
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaList.tsx
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaRow.tsx
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.test.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/describeColumn.test.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/describeColumn.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/index.tsx
🚧 Files skipped from review as they are similar to previous changes (7)
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.test.ts
  • web/packages/studio/src/components/AddColumnPalette/index.tsx
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/index.tsx
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/describeColumn.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/describeColumn.test.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaList.tsx
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/SchemaRow.tsx

@steramae-nvidia
steramae-nvidia added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit 840f160 Jul 23, 2026
63 of 100 checks passed
@steramae-nvidia
steramae-nvidia deleted the steramae/dd-schema-list branch July 23, 2026 18:43
AnuradhaKaruppiah pushed a commit to AnuradhaKaruppiah/nemo-platform that referenced this pull request Jul 24, 2026
* feat(studio): DD schema list in builder

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

* PR feedback

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

---------

Signed-off-by: Sean Teramae <steramae@nvidia.com>
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