Skip to content

fix(studio): DD embedding template fix - #661

Merged
steramae-nvidia merged 7 commits into
mainfrom
steramae/dd-embedding-fix
Jul 15, 2026
Merged

fix(studio): DD embedding template fix#661
steramae-nvidia merged 7 commits into
mainfrom
steramae/dd-embedding-fix

Conversation

@steramae-nvidia

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

Copy link
Copy Markdown
Contributor

This PR fixes the embedding template.

Screenshot 2026-07-14 at 10 02 27 AM

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

Summary by CodeRabbit

  • New Features
    • Added scores configuration support for LLM judge columns, with validation that expects a JSON array.
    • Enabled embedding inference parameter support for embedding models (used by the Semantic search dataset).
  • Improvements
    • Log viewers now stay pinned to the newest entries while auto-scrolling is enabled, without disrupting manual browsing; the same behavior applies to preview logs.
    • Updated default model selections to NVIDIA/Nemotron variants.
  • UI Updates
    • Unified the Data Designer icon across navigation and empty states.
  • Tests
    • Added coverage for stick-to-bottom behavior and expanded validation tests for LLM judge/preference-pairs.

@steramae-nvidia
steramae-nvidia requested review from a team as code owners July 13, 2026 21:45
@steramae-nvidia
steramae-nvidia force-pushed the steramae/template-fixes branch from 452fdd8 to d0fdb0b Compare July 14, 2026 22:40
@steramae-nvidia
steramae-nvidia force-pushed the steramae/dd-embedding-fix branch from cc20eba to 0f94702 Compare July 14, 2026 22:40
Base automatically changed from steramae/template-fixes to main July 14, 2026 23:34
Signed-off-by: Sean Teramae <steramae@nvidia.com>
Signed-off-by: Sean Teramae <steramae@nvidia.com>
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/dd-embedding-fix branch from 0f94702 to 04570fd Compare July 15, 2026 00:01
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

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: fd780c53-1849-4510-bc8c-42c035934367

📥 Commits

Reviewing files that changed from the base of the PR and between e458c41 and a179f3d.

📒 Files selected for processing (2)
  • web/packages/studio/src/components/CreateFilesetStart/templates.ts
  • web/packages/studio/src/routes/SafeSynthesizerJobDetailsRoute/components/JobDetailsPanel.test.tsx

📝 Walkthrough

Walkthrough

The PR centralizes log auto-scrolling, adds embedding inference support, requires JSON scores for LLM judge columns, updates model fixtures, and standardizes Data Designer icons.

Changes

Scroll behavior

Layer / File(s) Summary
Stick-to-bottom hook
web/packages/common/src/hooks/useStickToBottom/*
Adds threshold-aware scroll tracking, mutation-based auto-scrolling, imperative scrolling, and tests.
Log viewer integrations
web/packages/common/src/components/LogViewer/index.tsx, web/packages/studio/src/routes/DataDesignerJobBuildRoute/BuilderDetailsPanel.tsx
Replaces local scrolling logic and attaches the hook to log containers.

Data Designer model and column configuration

Layer / File(s) Summary
Inference parameter mapping
web/packages/studio/src/routes/DataDesignerJobBuildRoute/models.ts, web/packages/studio/src/components/CreateFilesetStart/templates.ts, web/packages/studio/src/constants/constants.ts, web/packages/studio/src/mocks/evaluation/configs.ts
Maps embedding-specific SDK parameters and applies the shared embedder model configuration.
LLM judge scores
web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts, web/packages/studio/src/components/CreateFilesetStart/templates.ts, web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.test.ts
Adds required JSON scores input for llm-judge columns and validates serialization and templates.
Nemotron model fixtures
web/packages/studio/src/routes/DataDesignerJobBuildRoute/models.test.ts, web/packages/studio/src/components/AddModelPalette/AddModelPalette.stories.tsx
Updates model selections, provider mappings, served names, and embedding configuration tests.

Data Designer icon updates

Layer / File(s) Summary
Shared Data Designer icon
web/packages/studio/src/constants/constants.ts, web/packages/studio/src/components/dataViews/DataDesignerJobsDataView/index.tsx, web/packages/studio/src/routes/WorkspaceLayout/WorkspaceSideNav.tsx, web/packages/studio/src/routes/SafeSynthesizerJobDetailsRoute/components/JobDetailsPanel.test.tsx
Defines a Palette-based icon constant and uses it in the jobs empty state and side navigation, with matching test mocking.

Sequence Diagram(s)

sequenceDiagram
  participant LogViewer
  participant useStickToBottom
  participant ScrollContainer
  participant MutationObserver
  LogViewer->>useStickToBottom: configure enabled and resetKey
  useStickToBottom->>ScrollContainer: attach ref and scroll listener
  useStickToBottom->>MutationObserver: observe content mutations
  MutationObserver->>ScrollContainer: scroll to bottom when auto-scroll is active
  LogViewer->>useStickToBottom: scrollToBottom()
  useStickToBottom->>ScrollContainer: set scrollTop to computed bottom
Loading

Possibly related PRs

Suggested reviewers: aray12

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main intent: a Data Designer embedding template fix in studio.
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.
✨ 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-embedding-fix

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: 4

🧹 Nitpick comments (1)
web/packages/common/src/hooks/useStickToBottom/index.ts (1)

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

Use type-only imports consistently.

  • web/packages/common/src/hooks/useStickToBottom/index.ts#L4-L4: import RefObject using import type.
  • web/packages/common/src/hooks/useStickToBottom/index.test.tsx#L7-L7: import FC using import type.
  • web/packages/common/src/components/LogViewer/index.tsx#L19-L19: split FC from the runtime React imports.

As per coding guidelines, “Use import type for type-only imports in TypeScript.”

🤖 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/common/src/hooks/useStickToBottom/index.ts` at line 4, Use
type-only imports for RefObject in
web/packages/common/src/hooks/useStickToBottom/index.ts:4-4 and FC in
web/packages/common/src/hooks/useStickToBottom/index.test.tsx:7-7; in
web/packages/common/src/components/LogViewer/index.tsx:19-19, split FC from the
runtime React imports into an import type declaration.

Source: Coding guidelines

🤖 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/hooks/useStickToBottom/index.test.tsx`:
- Around line 50-56: Update the test harness used by “scrollToBottom() does not
throw before the element is attached” to support omitting the ref-attached div,
then render that unattached configuration before clicking the scroll button.
Keep the assertion that invoking scrollToBottom resolves without throwing, and
preserve existing attached-element test behavior.

In `@web/packages/common/src/hooks/useStickToBottom/index.ts`:
- Around line 11-15: Update the useStickToBottom hook so initialization and
resetKey changes both scroll the container to the bottom and re-arm
shouldAutoScrollRef when stick-to-bottom behavior is enabled. Ensure the
observer recreation path resets the auto-scroll state, and pin existing content
immediately on initial setup so previews open at the bottom.

In `@web/packages/studio/src/components/CreateFilesetStart/templates.ts`:
- Around line 340-343: Update the inferenceParams in the fileset template to set
extra_body.input_type to 'passage' instead of 'query', while preserving the
existing embedding generation and encoding settings.

In `@web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts`:
- Around line 163-170: Update the scores column definition in
DataDesignerJobBuildRoute so its JSON validation requires an array rather than
accepting arbitrary JSON values. Preserve the required field behavior and ensure
objects, null, and primitives are rejected before serialization into the job
configuration.

---

Nitpick comments:
In `@web/packages/common/src/hooks/useStickToBottom/index.ts`:
- Line 4: Use type-only imports for RefObject in
web/packages/common/src/hooks/useStickToBottom/index.ts:4-4 and FC in
web/packages/common/src/hooks/useStickToBottom/index.test.tsx:7-7; in
web/packages/common/src/components/LogViewer/index.tsx:19-19, split FC from the
runtime React imports into an import type declaration.
🪄 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: 5c9fc9f1-caab-417d-b8b1-ce769fda0f48

📥 Commits

Reviewing files that changed from the base of the PR and between 0d7b636 and 04570fd.

📒 Files selected for processing (14)
  • web/packages/common/src/components/LogViewer/index.tsx
  • web/packages/common/src/hooks/useStickToBottom/index.test.tsx
  • web/packages/common/src/hooks/useStickToBottom/index.ts
  • web/packages/studio/src/components/AddModelPalette/AddModelPalette.stories.tsx
  • web/packages/studio/src/components/CreateFilesetStart/templates.ts
  • web/packages/studio/src/components/dataViews/DataDesignerJobsDataView/index.tsx
  • web/packages/studio/src/constants/constants.ts
  • web/packages/studio/src/mocks/evaluation/configs.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/BuilderDetailsPanel.tsx
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.test.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/models.test.ts
  • web/packages/studio/src/routes/DataDesignerJobBuildRoute/models.ts
  • web/packages/studio/src/routes/WorkspaceLayout/WorkspaceSideNav.tsx

Comment thread web/packages/common/src/hooks/useStickToBottom/index.test.tsx
Comment thread web/packages/common/src/hooks/useStickToBottom/index.ts
Comment thread web/packages/studio/src/components/CreateFilesetStart/templates.ts Outdated
Comment thread web/packages/studio/src/routes/DataDesignerJobBuildRoute/columns.ts
- templates: use input_type 'passage' for the passage-embedding column
- columns: require a JSON array for llm-judge 'scores' field
- useStickToBottom: pin existing content and re-arm auto-scroll on mount/resetKey
- test: exercise the truly-unattached ref path for scrollToBottom

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

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 25258/32466 77.8% 62.4%
Integration Tests 14631/31115 47.0% 19.4%

Signed-off-by: Sean Teramae <steramae@nvidia.com>
@steramae-nvidia
steramae-nvidia added this pull request to the merge queue Jul 15, 2026
Merged via the queue into main with commit 69c0823 Jul 15, 2026
57 checks passed
@steramae-nvidia
steramae-nvidia deleted the steramae/dd-embedding-fix branch July 15, 2026 01:29
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