Skip to content

feat(studio): Clone DataDesigner job - #502

Merged
steramae-nvidia merged 2 commits into
mainfrom
steramae/clone-dd-job
Jun 30, 2026
Merged

feat(studio): Clone DataDesigner job#502
steramae-nvidia merged 2 commits into
mainfrom
steramae/clone-dd-job

Conversation

@steramae-nvidia

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

Copy link
Copy Markdown
Contributor
Screenshot 2026-06-29 at 9 21 37 AM Screenshot 2026-06-29 at 9 21 56 AM

Summary by CodeRabbit

  • New Features
    • Added a per-job actions menu for Data Designer jobs (view details, clone, cancel, delete).
    • Introduced a “Job Basics” card for the new job form and improved cloning support.
    • Updated the job details page to show inline cancel errors and navigate back after deletion.
  • Bug Fixes
    • Improved breadcrumb behavior on the dataset file management side panel (validated via tests).
  • Tests
    • Added/updated unit tests for cloning utilities, JSON-driven job request generation, and UI accessibility labels.

Signed-off-by: Sean Teramae <steramae@nvidia.com>
@steramae-nvidia
steramae-nvidia requested review from a team as code owners June 29, 2026 16:24
@github-actions github-actions Bot added the feat label Jun 29, 2026
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 21898/28725 76.2% 61.0%
Integration Tests 12582/27405 45.9% 19.2%

@coderabbitai

coderabbitai Bot commented Jun 29, 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: 8586328e-8d63-46df-bb4e-ce1b8b3ef56c

📥 Commits

Reviewing files that changed from the base of the PR and between 9d5b07a and 59ef0c8.

📒 Files selected for processing (4)
  • web/packages/studio/src/components/DataDesignerJobActionsMenu/index.tsx
  • web/packages/studio/src/components/DatasetFileManagementSidePanel/index.test.tsx
  • web/packages/studio/src/components/NewDataDesignerJobForm/index.test.tsx
  • web/packages/studio/src/components/NewDataDesignerJobForm/index.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • web/packages/studio/src/components/NewDataDesignerJobForm/index.test.tsx
  • web/packages/studio/src/components/DataDesignerJobActionsMenu/index.tsx
  • web/packages/studio/src/components/NewDataDesignerJobForm/index.tsx

📝 Walkthrough

Walkthrough

Adds shared job actions for Data Designer jobs, adds clone-request utilities, and refactors the new job form around jsonContent as the source of truth. Adds breadcrumb tests for the dataset file side panel.

Changes

Data Designer job actions and clone flow

Layer / File(s) Summary
Clone utilities
web/packages/studio/src/components/NewDataDesignerJobForm/utils.ts, web/packages/studio/src/components/NewDataDesignerJobForm/utils.test.ts
Adds CLONE_NAME_SUFFIX, buildClonedJobRequest, DataDesignerCloneState, and getCloneJobRequestFromState with tests.
DeleteJobModal callback
web/packages/studio/src/components/dataViews/DataDesignerJobsDataView/DeleteJobModal.tsx
DeleteJobModalProps gains optional onDeleted; the modal invokes it after successful deletion.
Shared job actions menu
web/packages/studio/src/components/DataDesignerJobActionsMenu/index.tsx
Adds view, clone, cancel, and delete actions plus cancel-error handling.
Jobs data view wiring
web/packages/studio/src/components/dataViews/DataDesignerJobsDataView/index.tsx
Replaces inline row actions and local cancel flow with DataDesignerJobActionsMenu.
Job details route wiring
web/packages/studio/src/routes/DataDesignerJobDetailsRoute/index.tsx
Adds DataDesignerJobActionsMenu to the header, navigates after delete, and renders cancel errors in a Banner.

NewDataDesignerJobForm jsonContent refactor

Layer / File(s) Summary
JobBasics component
web/packages/studio/src/components/NewDataDesignerJobForm/JobBasics.tsx
Adds controlled inputs for fileset name, record count, and description.
JobRequestGenerator refactor
web/packages/studio/src/components/NewDataDesignerJobForm/JobRequestGenerator.tsx
Reads parent form state, computes parse errors from watched JSON, and writes generated JSON through setJsonContent.
Form schema and state refactor
web/packages/studio/src/components/NewDataDesignerJobForm/index.tsx
Adds jsonContent to form state, syncs rows from parsed JSON, updates submit parsing, and wires JobBasics and JobRequestGenerator.
Form test updates
web/packages/studio/src/components/NewDataDesignerJobForm/index.test.tsx
Updates the mock generator callback and accessible-name queries.

Dataset file management side panel tests

Layer / File(s) Summary
Breadcrumb tests
web/packages/studio/src/components/DatasetFileManagementSidePanel/index.test.tsx
Adds nested breadcrumb rendering and root breadcrumb click coverage.

Possibly related PRs

Suggested reviewers

  • htolentino-nvidia
🚥 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 clearly matches the main change: adding clone support for DataDesigner jobs in Studio.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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/clone-dd-job

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

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/components/NewDataDesignerJobForm/JobRequestGenerator.tsx (1)

137-179: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Pass disabled to both textareas.

disabled only gates Generate. Prompt/JSON remain editable during Preview/Create, so the displayed config can diverge from the in-flight request.

Fix
         <ControlledTextArea
           label="What do you want to generate?"
           required
           placeholder="e.g. Generate synthetic product reviews with columns: product_id, review_text, rating (1-5), and sentiment label."
           rows={10}
           className="w-full"
+          disabled={disabled}
           useControllerProps={{
             name: descriptionName,
             control,
             rules: descriptionRules,
           }}
@@
         <ControlledTextArea
           label="Edit JSON"
           placeholder="Generate to fill..."
           rows={16}
           className="w-full font-mono text-sm"
+          disabled={disabled}
           useControllerProps={{
             name: jsonContentName,
             control,
           }}
🤖 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/components/NewDataDesignerJobForm/JobRequestGenerator.tsx`
around lines 137 - 179, The form currently only applies disabled state to the
Generate button, so the prompt and JSON fields in JobRequestGenerator can still
be edited while Preview/Create is running. Update the ControlledTextArea
components for the description and JSON inputs to also receive the existing
disabled state (along with the current model/generation conditions as needed) so
the displayed request stays locked while an action is in flight.
🤖 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/components/DataDesignerJobActionsMenu/index.tsx`:
- Around line 62-66: The clone action in handleClone should not navigate when
buildClonedJobRequest(job) returns null, because that currently opens the
new-job route with no clone state. Update DataDesignerJobActionsMenu so the
Clone flow either exits early when the payload is missing or first loads the
full job before calling navigate(getNewDataDesignerJobRoute(workspace)). Keep
the guard close to handleClone and preserve the existing cloneJobRequest state
only when a valid payload exists.

In
`@web/packages/studio/src/components/DatasetFileManagementSidePanel/index.test.tsx`:
- Around line 117-149: The test is using an internal preview selector instead of
the public props/state on DatasetFileManagementSidePanel, so it does not
actually exercise preview mode or breadcrumb behavior. Update the render setup
to use the real inputs that the component derives breadcrumbs from, namely
currentFolder and the preview-enabling state, and then assert on a preview-only
element or the breadcrumb segments rendered by DatasetFileManagementSidePanel
rather than selectedFilePath. For the root breadcrumb click case, keep the
assertion tied to the actual breadcrumb button rendered in preview and verify
onFolderChange is called from that interaction.

In `@web/packages/studio/src/components/NewDataDesignerJobForm/index.test.tsx`:
- Line 177: The test in NewDataDesignerJobForm is querying the wrong textbox
label: JobBasics renders “Fileset name”, not “dataset name”. Update the
user.type selector in the affected test to target the actual label used by
JobBasics so it matches the rendered form field and remains stable if
implementation details change.

In `@web/packages/studio/src/components/NewDataDesignerJobForm/index.tsx`:
- Around line 48-49: `jsonContent` is only typed as a string in the form schema,
so empty input can pass through and `handleSubmit` exits without feedback.
Update `NewDataDesignerJobForm` to validate `jsonContent` as required/non-empty
before submit and surface an inline error when missing or invalid, so `Create
Job` cannot silently do nothing; apply the same validation path wherever
`jsonContent` is defined in the form handling and submit flow.

---

Outside diff comments:
In
`@web/packages/studio/src/components/NewDataDesignerJobForm/JobRequestGenerator.tsx`:
- Around line 137-179: The form currently only applies disabled state to the
Generate button, so the prompt and JSON fields in JobRequestGenerator can still
be edited while Preview/Create is running. Update the ControlledTextArea
components for the description and JSON inputs to also receive the existing
disabled state (along with the current model/generation conditions as needed) so
the displayed request stays locked while an action is in flight.
🪄 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: 00f67410-d664-457a-8a1d-fd03b24f593d

📥 Commits

Reviewing files that changed from the base of the PR and between 0a55776 and 9d5b07a.

📒 Files selected for processing (11)
  • web/packages/studio/src/components/DataDesignerJobActionsMenu/index.tsx
  • web/packages/studio/src/components/DatasetFileManagementSidePanel/index.test.tsx
  • web/packages/studio/src/components/NewDataDesignerJobForm/JobBasics.tsx
  • web/packages/studio/src/components/NewDataDesignerJobForm/JobRequestGenerator.tsx
  • web/packages/studio/src/components/NewDataDesignerJobForm/index.test.tsx
  • web/packages/studio/src/components/NewDataDesignerJobForm/index.tsx
  • web/packages/studio/src/components/NewDataDesignerJobForm/utils.test.ts
  • web/packages/studio/src/components/NewDataDesignerJobForm/utils.ts
  • web/packages/studio/src/components/dataViews/DataDesignerJobsDataView/DeleteJobModal.tsx
  • web/packages/studio/src/components/dataViews/DataDesignerJobsDataView/index.tsx
  • web/packages/studio/src/routes/DataDesignerJobDetailsRoute/index.tsx

Comment thread web/packages/studio/src/components/DatasetFileManagementSidePanel/index.test.tsx Outdated
Comment thread web/packages/studio/src/components/NewDataDesignerJobForm/index.test.tsx Outdated
Comment thread web/packages/studio/src/components/NewDataDesignerJobForm/index.tsx Outdated
Signed-off-by: Sean Teramae <steramae@nvidia.com>
@steramae-nvidia
steramae-nvidia added this pull request to the merge queue Jun 30, 2026
Merged via the queue into main with commit 7873342 Jun 30, 2026
54 checks passed
@steramae-nvidia
steramae-nvidia deleted the steramae/clone-dd-job branch June 30, 2026 17:15
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