feat(studio): Clone DataDesigner job - #502
Conversation
Signed-off-by: Sean Teramae <steramae@nvidia.com>
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughAdds shared job actions for Data Designer jobs, adds clone-request utilities, and refactors the new job form around ChangesData Designer job actions and clone flow
NewDataDesignerJobForm jsonContent refactor
Dataset file management side panel tests
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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 winPass
disabledto both textareas.
disabledonly 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
📒 Files selected for processing (11)
web/packages/studio/src/components/DataDesignerJobActionsMenu/index.tsxweb/packages/studio/src/components/DatasetFileManagementSidePanel/index.test.tsxweb/packages/studio/src/components/NewDataDesignerJobForm/JobBasics.tsxweb/packages/studio/src/components/NewDataDesignerJobForm/JobRequestGenerator.tsxweb/packages/studio/src/components/NewDataDesignerJobForm/index.test.tsxweb/packages/studio/src/components/NewDataDesignerJobForm/index.tsxweb/packages/studio/src/components/NewDataDesignerJobForm/utils.test.tsweb/packages/studio/src/components/NewDataDesignerJobForm/utils.tsweb/packages/studio/src/components/dataViews/DataDesignerJobsDataView/DeleteJobModal.tsxweb/packages/studio/src/components/dataViews/DataDesignerJobsDataView/index.tsxweb/packages/studio/src/routes/DataDesignerJobDetailsRoute/index.tsx
Signed-off-by: Sean Teramae <steramae@nvidia.com>
Summary by CodeRabbit