Skip to content

feat(studio): Add prompt presets for DD AI describe - #1236

Merged
steramae-nvidia merged 4 commits into
mainfrom
steramae/ai-preset
Aug 13, 2026
Merged

feat(studio): Add prompt presets for DD AI describe#1236
steramae-nvidia merged 4 commits into
mainfrom
steramae/ai-preset

Conversation

@steramae-nvidia

@steramae-nvidia steramae-nvidia commented Aug 11, 2026

Copy link
Copy Markdown
Contributor
Screen.Recording.2026-08-11.at.10.25.50.AM.mov

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

Summary

Related Issue

Changes

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with documentation updates
  • Documentation only
  • Contributor tooling or automation
  • CI, build, or test infrastructure

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Documentation updated for user-visible behavior
  • Documentation not applicable — justification:

Verification

  • Pull request title follows the repository's Conventional Commit format
  • Every commit includes an appropriate Signed-off-by: trailer
  • uv run pre-commit run -a passes, or any blocked checks are identified below
  • Targeted tests pass, or tests are marked not applicable above
  • No secrets, API keys, or credentials are included

Targeted validation:

Summary

Related Issue

Changes

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with documentation updates
  • Documentation only
  • Contributor tooling or automation
  • CI, build, or test infrastructure

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Documentation updated for user-visible behavior
  • Documentation not applicable — justification:

Verification

  • Pull request title follows the repository's Conventional Commit format
  • Every commit includes an appropriate Signed-off-by: trailer
  • uv run pre-commit run -a passes, or any blocked checks are identified below
  • Targeted tests pass, or tests are marked not applicable above
  • No secrets, API keys, or credentials are included

Targeted validation:

Summary by CodeRabbit

  • New Features

    • Added selectable prompt suggestions for phishing triage, support-ticket routing, and refund-policy questions.
    • Added reusable suggestion tags with wrapped layout and optional disabled states.
    • Prompt suggestions now populate and validate the prompt field automatically.
  • Bug Fixes

    • Disabled suggestion controls when AI generation, model chat, or comparison features are unavailable.
    • Improved prompt configuration with required-field validation and clearer placeholder guidance.

@steramae-nvidia

Copy link
Copy Markdown
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

@steramae-nvidia
steramae-nvidia requested review from a team as code owners August 11, 2026 17:19
@github-actions github-actions Bot added the feat label Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds typed prompt suggestions, a reusable suggestion-tag component, fileset prompt integration, and disabled-state handling for chat seed suggestions.

Changes

AI prompt suggestions

Layer / File(s) Summary
Prompt suggestion contracts and data
web/packages/studio/src/components/PromptSuggestionTags/types.ts, web/packages/studio/src/components/CreateFilesetStart/constants.ts
Defines prompt suggestion interfaces and adds three predefined generation prompts.
Reusable suggestion pill component
web/packages/studio/src/components/PromptSuggestionTags/index.tsx
Renders selectable outline tags and forwards disabled state and selected prompts.
Prompt interface integrations
web/packages/studio/src/components/CreateFilesetStart/DescribeWithAiPanel.tsx, web/packages/studio/src/components/chat/SeedQuestions.tsx, web/packages/studio/src/components/ModelChat/index.tsx, web/packages/studio/src/components/chat/CompareComposer.tsx
Shows suggestions for empty idle prompts, updates prompt field state after selection, and disables chat suggestions when chat or comparison panels are unavailable.

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant PromptSuggestionTags
  participant DescribeWithAiPanel
  participant PromptField
  User->>PromptSuggestionTags: Select suggestion
  PromptSuggestionTags->>DescribeWithAiPanel: Return selected prompt
  DescribeWithAiPanel->>PromptField: Set value, validate, and mark dirty
Loading

Suggested reviewers: marcusds

🚥 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 clearly and concisely describes the main change: adding prompt presets for DD AI describe in Studio.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch steramae/ai-preset

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/components/CreateFilesetStart/DescribeWithAiPanel.tsx (1)

40-102: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add focused tests for prompt suggestions.

Existing tests cover AI selection and empty-submit validation, but not suggestion visibility, click/keyboard selection, dirty state, or all PROMPT_SUGGESTIONS. Run the Studio package tests and typecheck. Do not run E2E tests.

🤖 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/CreateFilesetStart/DescribeWithAiPanel.tsx`
around lines 40 - 102, Add focused tests covering DescribeWithAiPanel prompt
suggestions: verify suggestions appear only when the prompt is empty and the
panel is not busy, all PROMPT_SUGGESTIONS render, and clicking or
keyboard-selecting a pill updates the prompt, marks it dirty, and triggers
validation. Use the relevant prompt form types and PromptSuggestionPills
behavior from the referenced files; update implementation only if tests expose a
behavior mismatch. Run Studio package tests and typecheck, but do not run E2E
tests.

Source: Coding guidelines

🧹 Nitpick comments (1)
web/packages/studio/src/components/CreateFilesetStart/types.ts (1)

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

Make the prompt suggestion contract immutable.

The exported interfaces and constant allow consumers to mutate labels, prompts, and the suggestions array.

  • web/packages/studio/src/components/CreateFilesetStart/types.ts#L98-L107: mark interface properties as readonly and use readonly PromptSuggestion[].
  • web/packages/studio/src/components/CreateFilesetStart/constants.ts#L17-L33: declare PROMPT_SUGGESTIONS as readonly PromptSuggestion[].
Proposed fix
 export interface PromptSuggestion {
-  label: string;
-  prompt: string;
+  readonly label: string;
+  readonly prompt: string;
 }

 export interface PromptSuggestionPillsProps {
-  suggestions: PromptSuggestion[];
-  onSelect: (prompt: string) => void;
+  readonly suggestions: readonly PromptSuggestion[];
+  readonly onSelect: (prompt: string) => void;
 }

-export const PROMPT_SUGGESTIONS: PromptSuggestion[] = [
+export const PROMPT_SUGGESTIONS: readonly PromptSuggestion[] = [

As per coding guidelines, “Use readonly for immutable properties.”

🤖 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/CreateFilesetStart/types.ts` around lines
98 - 107, Make the prompt suggestion contract immutable: in
web/packages/studio/src/components/CreateFilesetStart/types.ts lines 98-107,
mark PromptSuggestion.label, PromptSuggestion.prompt, and
PromptSuggestionPillsProps.suggestions as readonly; in
web/packages/studio/src/components/CreateFilesetStart/constants.ts lines 17-33,
declare PROMPT_SUGGESTIONS as readonly PromptSuggestion[].

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.

Outside diff comments:
In
`@web/packages/studio/src/components/CreateFilesetStart/DescribeWithAiPanel.tsx`:
- Around line 40-102: Add focused tests covering DescribeWithAiPanel prompt
suggestions: verify suggestions appear only when the prompt is empty and the
panel is not busy, all PROMPT_SUGGESTIONS render, and clicking or
keyboard-selecting a pill updates the prompt, marks it dirty, and triggers
validation. Use the relevant prompt form types and PromptSuggestionPills
behavior from the referenced files; update implementation only if tests expose a
behavior mismatch. Run Studio package tests and typecheck, but do not run E2E
tests.

---

Nitpick comments:
In `@web/packages/studio/src/components/CreateFilesetStart/types.ts`:
- Around line 98-107: Make the prompt suggestion contract immutable: in
web/packages/studio/src/components/CreateFilesetStart/types.ts lines 98-107,
mark PromptSuggestion.label, PromptSuggestion.prompt, and
PromptSuggestionPillsProps.suggestions as readonly; in
web/packages/studio/src/components/CreateFilesetStart/constants.ts lines 17-33,
declare PROMPT_SUGGESTIONS as readonly PromptSuggestion[].

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7865cd13-286d-4468-a140-2dde6dd497f7

📥 Commits

Reviewing files that changed from the base of the PR and between 60f5c8f and 9f222e6.

📒 Files selected for processing (4)
  • web/packages/studio/src/components/CreateFilesetStart/DescribeWithAiPanel.tsx
  • web/packages/studio/src/components/CreateFilesetStart/PromptSuggestionPills.tsx
  • web/packages/studio/src/components/CreateFilesetStart/constants.ts
  • web/packages/studio/src/components/CreateFilesetStart/types.ts

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 32235/40906 78.8% 63.7%
Integration Tests 18637/38832 48.0% 20.7%

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

🧹 Nitpick comments (1)
web/packages/studio/src/components/PromptSuggestionPills/types.ts (1)

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

Make the suggestion contract read-only.

Mark the properties readonly. Expose suggestions as readonly PromptSuggestion[]. Confirm no caller mutates this contract.

Proposed change
 export interface PromptSuggestion {
-  label: string;
-  prompt: string;
+  readonly label: string;
+  readonly prompt: string;
 }

 export interface PromptSuggestionPillsProps {
-  suggestions: PromptSuggestion[];
-  onSelect: (prompt: string) => void;
-  className?: string;
+  readonly suggestions: readonly PromptSuggestion[];
+  readonly onSelect: (prompt: string) => void;
+  readonly className?: string;
 }

As per coding guidelines, “Use readonly for immutable properties.”

🤖 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/PromptSuggestionPills/types.ts` around
lines 5 - 16, Update the PromptSuggestion and PromptSuggestionPillsProps
interfaces so all contract properties are readonly, and change suggestions to
readonly PromptSuggestion[]. Verify existing callers only read these values and
do not rely on mutating the exposed contract.

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.

Nitpick comments:
In `@web/packages/studio/src/components/PromptSuggestionPills/types.ts`:
- Around line 5-16: Update the PromptSuggestion and PromptSuggestionPillsProps
interfaces so all contract properties are readonly, and change suggestions to
readonly PromptSuggestion[]. Verify existing callers only read these values and
do not rely on mutating the exposed contract.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6a350fb1-df08-40fa-9e0c-25caab6cbbfe

📥 Commits

Reviewing files that changed from the base of the PR and between 9f222e6 and d2c985f.

📒 Files selected for processing (5)
  • web/packages/studio/src/components/CreateFilesetStart/DescribeWithAiPanel.tsx
  • web/packages/studio/src/components/CreateFilesetStart/constants.ts
  • web/packages/studio/src/components/PromptSuggestionPills/index.tsx
  • web/packages/studio/src/components/PromptSuggestionPills/types.ts
  • web/packages/studio/src/components/chat/SeedQuestions.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/packages/studio/src/components/CreateFilesetStart/constants.ts

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

Looks good, one suggestion to update if you agree.

Comment thread web/packages/studio/src/components/PromptSuggestionPills/index.tsx Outdated
Comment thread web/packages/studio/src/components/PromptSuggestionPills/index.tsx Outdated
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@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

🧹 Nitpick comments (1)
web/packages/studio/src/components/PromptSuggestionTags/types.ts (1)

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

Mark all contract properties as readonly.

Use readonly PromptSuggestion[] for suggestions.

🤖 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/PromptSuggestionTags/types.ts` around
lines 5 - 18, Mark every property in the PromptSuggestion and
PromptSuggestionTagsProps interfaces as readonly, including the suggestions
collection as readonly PromptSuggestion[] and the callback, disabled, and
className properties.

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/studio/src/components/PromptSuggestionTags/types.ts`:
- Around line 5-10: Add a stable unique id field to the PromptSuggestion
interface in types.ts, update PromptSuggestionTags in index.tsx to use
suggestion.id as the React key instead of suggestion.label, and update every
PromptSuggestion constructor to provide a unique stable id.

---

Nitpick comments:
In `@web/packages/studio/src/components/PromptSuggestionTags/types.ts`:
- Around line 5-18: Mark every property in the PromptSuggestion and
PromptSuggestionTagsProps interfaces as readonly, including the suggestions
collection as readonly PromptSuggestion[] and the callback, disabled, and
className properties.
🪄 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: de47fb49-3135-45f2-ba92-93181cb85742

📥 Commits

Reviewing files that changed from the base of the PR and between d4b8171 and 249aa59.

📒 Files selected for processing (7)
  • web/packages/studio/src/components/CreateFilesetStart/DescribeWithAiPanel.tsx
  • web/packages/studio/src/components/CreateFilesetStart/constants.ts
  • web/packages/studio/src/components/ModelChat/index.tsx
  • web/packages/studio/src/components/PromptSuggestionTags/index.tsx
  • web/packages/studio/src/components/PromptSuggestionTags/types.ts
  • web/packages/studio/src/components/chat/CompareComposer.tsx
  • web/packages/studio/src/components/chat/SeedQuestions.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • web/packages/studio/src/components/chat/CompareComposer.tsx
  • web/packages/studio/src/components/CreateFilesetStart/DescribeWithAiPanel.tsx
  • web/packages/studio/src/components/chat/SeedQuestions.tsx
  • web/packages/studio/src/components/ModelChat/index.tsx
  • web/packages/studio/src/components/CreateFilesetStart/constants.ts

Comment thread web/packages/studio/src/components/PromptSuggestionTags/types.ts
@steramae-nvidia
steramae-nvidia added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
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 added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit db2e26a Aug 13, 2026
58 of 100 checks passed
@steramae-nvidia
steramae-nvidia deleted the steramae/ai-preset branch August 13, 2026 01:52
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