feat(studio): add the describe-with-AI job config generation hook - #1021
Merged
Conversation
onContinue took (optionId, templateId?), which could not carry a payload per option without growing more optional arguments. Replace it with a StartSelection union so each option's payload travels with its own case. The Continue footer now renders as soon as an option is picked and disables itself with a hint, rather than appearing only once the choice is complete — previously the button materialized with no explanation of what was missing. Signed-off-by: Sean Teramae <steramae@nvidia.com>
useDescribeWithAi drives the generate/validate/repair loop for drafting a Data Designer job config from a plain-language description: it calls the model with the job-config tool, parses the tool call, and runs the draft through validateGeneratedJobRequest so nothing unloadable reaches the builder. When validation reports problems, buildFixMessages replays the prompt, the draft, and the issues so the model can repair its own output. The hook is not wired into any UI yet — the Describe with AI panel that consumes it lands next. Also drops the "alias now uses X instead of the drafted Y" warning from aiSeed: the generation model always overrides drafted aliases by design, so the warning fired on every run and would have made the repair loop chase a non-issue. Signed-off-by: Sean Teramae <steramae@nvidia.com>
nakolean
approved these changes
Aug 5, 2026
Signed-off-by: Sean Teramae <steramae@nvidia.com>
Contributor
📝 WalkthroughWalkthroughThe PR adds ChangesAI fileset configuration flow
Sequence Diagram(s)sequenceDiagram
participant User
participant useDescribeWithAi
participant ChatCompletion
participant DataDesignerValidator
User->>useDescribeWithAi: submit prompt
useDescribeWithAi->>ChatCompletion: request tool-required completion
ChatCompletion-->>useDescribeWithAi: return tool arguments
useDescribeWithAi->>DataDesignerValidator: sanitize and validate job request
DataDesignerValidator-->>useDescribeWithAi: return validation result
useDescribeWithAi-->>User: expose valid config or error state
User->>useDescribeWithAi: request draft repair
useDescribeWithAi->>ChatCompletion: send draft and validation issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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/CreateFilesetStart/useDescribeWithAi.test.tsx`:
- Around line 180-187: Update the “reports which request is in flight” test
around setUp and generate to use a deferred mutateAsync promise; start generate
without awaiting its completion, assert pendingAction is “generate” while the
promise remains unresolved, then resolve the deferred response and assert
pendingAction returns to null after generate completes.
In `@web/packages/studio/src/components/CreateFilesetStart/useDescribeWithAi.ts`:
- Around line 39-48: Update describeWithAiFormSchema.provider to reject empty
values using the existing PROVIDER_REQUIRED_MESSAGE, ensuring runGeneration
receives an explicit provider. Adjust the test setup around the invalid
submission case to provide a non-empty provider where required and preserve
coverage for provider validation.
- Around line 196-210: Update requestFix to return when validation has neither
errors nor warnings, in addition to its existing rawOutput, validation, and
model guards. Only invoke run with buildFixMessages when at least one validation
issue exists, preserving the current handling of invalid errors and warnings.
🪄 Autofix
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: 39f3c68e-6a0a-498a-a167-85369220c4ed
📒 Files selected for processing (5)
web/packages/studio/src/components/CreateFilesetStart/fixRequest.tsweb/packages/studio/src/components/CreateFilesetStart/useDescribeWithAi.test.tsxweb/packages/studio/src/components/CreateFilesetStart/useDescribeWithAi.tsweb/packages/studio/src/routes/DataDesignerJobBuildRoute/aiSeed.test.tsweb/packages/studio/src/routes/DataDesignerJobBuildRoute/aiSeed.ts
Contributor
|
gabwow
pushed a commit
that referenced
this pull request
Aug 5, 2026
) * refactor(studio): make the fileset start selection a discriminated union onContinue took (optionId, templateId?), which could not carry a payload per option without growing more optional arguments. Replace it with a StartSelection union so each option's payload travels with its own case. The Continue footer now renders as soon as an option is picked and disables itself with a hint, rather than appearing only once the choice is complete — previously the button materialized with no explanation of what was missing. Signed-off-by: Sean Teramae <steramae@nvidia.com> * feat(studio): add the describe-with-AI job config generation hook useDescribeWithAi drives the generate/validate/repair loop for drafting a Data Designer job config from a plain-language description: it calls the model with the job-config tool, parses the tool call, and runs the draft through validateGeneratedJobRequest so nothing unloadable reaches the builder. When validation reports problems, buildFixMessages replays the prompt, the draft, and the issues so the model can repair its own output. The hook is not wired into any UI yet — the Describe with AI panel that consumes it lands next. Also drops the "alias now uses X instead of the drafted Y" warning from aiSeed: the generation model always overrides drafted aliases by design, so the warning fired on every run and would have made the repair loop chase a non-issue. Signed-off-by: Sean Teramae <steramae@nvidia.com> --------- Signed-off-by: Sean Teramae <steramae@nvidia.com> Signed-off-by: Aaron Gabow <agabow@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
useDescribeWithAidrives the generate → validate → repair loop that drafts a Data Designer job config from a plain-language description:generateDataDesignerJobRequesttoolvalidateGeneratedJobRequest, so nothing unloadable can reach the builderbuildFixMessagesreplays the original prompt, the draft, and the specific issues back to the model so it can repair its own outputAlso drops the
Alias "x" now uses "y" instead of the drafted "z"warning fromaiSeed. The generation model overrides drafted aliases by design, so that warning fired on essentially every run — and would have sent the new repair loop chasing a non-issue.Why
PR 2 of 3 in the "Describe with AI" stack. This is all logic and tests, no UI imports, which is why it's separable.
Stack
steramae/dd-start-selection— contract refactorsteramae/dd-ai-start-option— the panel, and flipping the tile onTesting
pnpm --filter nemo-studio-ui typecheck— cleanpnpm --filter nemo-studio-ui test src/components/CreateFilesetStart src/routes/DataDesignerJobBuildRoute/aiSeed.test.ts— 34 passing🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes