Skip to content

feat(studio): Add CLI/agent instructions to experiment group empty state - #279

Merged
walston merged 4 commits into
mainfrom
nwalston/experiment-group-empty
Jun 12, 2026
Merged

feat(studio): Add CLI/agent instructions to experiment group empty state#279
walston merged 4 commits into
mainfrom
nwalston/experiment-group-empty

Conversation

@walston

@walston walston commented Jun 11, 2026

Copy link
Copy Markdown
Contributor
Screen.Recording.2026-06-11.at.11.38.17.mov

The experiment group detail page showed a bare "No Experiments" message when a group had no runs, giving users no guidance on next steps. This replaces it with the same tabbed CLI command / coding agent panel already used by ExperimentSessionsDataView, pre-filling the group name in the nemo exp run command so users can copy and run it immediately.

The ExperimentGroupResponse doesn't carry dataset info, so --dataset uses a placeholder — consistent with how the sessions view handles unknown values.

Test plan

  • Navigate to an experiment group with no experiments — confirm the tabbed panel appears with "CLI command" selected by default
  • Verify the CLI snippet contains the correct group name
  • Switch to the "Coding agent" tab — confirm it renders without errors
  • Click "CLI docs — learn more" — confirm it opens the docs link in a new tab
  • Add an experiment to the group — confirm the empty state disappears

Summary by CodeRabbit

  • New Features
    • Enhanced empty state for experiment groups. Users now see a CLI command example and direct access to documentation when no experiments are present, streamlining the workflow for creating and managing experiments.

@walston
walston requested a review from rrhyne June 11, 2026 18:45
@walston
walston requested review from a team as code owners June 11, 2026 18:45
@github-actions github-actions Bot added the feat label Jun 11, 2026
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

A new Empty component renders a custom empty state for experiment groups with no experiments. It builds a nemo exp run CLI command using the group name, displays it in a tabbed UI alongside a "Coding agent" placeholder, and links to CLI documentation. ExperimentGroupDataView is updated to use this component instead of a generic TableEmptyState.

Changes

Empty experiment group state

Layer / File(s) Summary
Empty component definition
web/packages/studio/src/components/dataViews/ExperimentGroupDataView/Empty.tsx
EmptyProps interface accepts experimentGroupName. cliCommand string interpolates the group name into a nemo exp run command with hardcoded dataset and evaluator placeholders. JSX renders TableEmptyState with tabbed actions panel showing CLI snippet and docs link.
ExperimentGroupDataView integration
web/packages/studio/src/components/dataViews/ExperimentGroupDataView/index.tsx
TableEmptyState import removed; Empty import added. renderEmptyState callback passes experimentGroupName to <Empty> instead of hardcoded TableEmptyState strings.

Possibly related PRs

Suggested labels

feat

Suggested reviewers

  • nakolean
🚥 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 accurately describes the main change: adding CLI/agent instructions to the experiment group empty state, which matches the core objective of replacing the bare 'No Experiments' message with a tabbed CLI command/coding agent panel.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 nwalston/experiment-group-empty

Comment @coderabbitai help to get the list of available commands and usage tips.

@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: 2

🧹 Nitpick comments (1)
web/packages/studio/src/components/dataViews/ExperimentGroupDataView/Empty.tsx (1)

4-15: 💤 Low value

Import grouping doesn't follow guidelines.

External libraries should be grouped before internal modules. Reorder: @nvidia/foundations-react-core, lucide-react, then @nemo/common, then @studio/constants.

As per coding guidelines: "Group imports in the order: external libraries, internal modules, relative imports".

🤖 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/dataViews/ExperimentGroupDataView/Empty.tsx`
around lines 4 - 15, The import statements in Empty.tsx are not grouped per
guidelines; reorder them so external libraries come first (group the
'`@nvidia/foundations-react-core`' imports like Button, TabsRoot, etc., then the
'lucide-react' icons such as Bot, ChevronRight, File, FlaskConical, Terminal),
followed by internal modules (move TableEmptyState from
'`@nemo/common/src/components/TableEmptyState`' next) and finally constants
(LINK_DOCS_EXPERIMENTS_CLI from '`@studio/constants/links`'); ensure clear
blank-line separation between each group to match the project's import grouping
convention.

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/dataViews/ExperimentGroupDataView/Empty.tsx`:
- Around line 22-26: The generated CLI string in cliCommand interpolates
experimentGroupName directly, which can break or be exploited if it contains
quotes or shell metacharacters; fix by escaping the value before interpolation
(e.g., implement and use a shellEscape or quoteForShell helper that safely
single- or double-quotes and escapes inner quotes/backslashes) and replace
direct use of experimentGroupName in cliCommand with the escaped result; add the
helper to this module or a shared utils file and use it where cliCommand is
built to ensure safe, well-formed shell commands.

In
`@web/packages/studio/src/components/dataViews/ExperimentGroupDataView/index.tsx`:
- Line 261: The empty-state render currently ignores the
hasFiltersApplied/hasSearchApplied flags and always renders <Empty
experimentGroupName={experimentGroupName} />; update the renderEmptyState
callback (the prop passed to DataView) to inspect hasFiltersApplied and
hasSearchApplied and either return null (so DataView shows its built-in filtered
empty UI) or return a variant of Empty that communicates “no results match your
filters” when filters/search are active; modify the renderEmptyState
implementation and/or the Empty component usage accordingly to conditionally
render based on those flags.

---

Nitpick comments:
In
`@web/packages/studio/src/components/dataViews/ExperimentGroupDataView/Empty.tsx`:
- Around line 4-15: The import statements in Empty.tsx are not grouped per
guidelines; reorder them so external libraries come first (group the
'`@nvidia/foundations-react-core`' imports like Button, TabsRoot, etc., then the
'lucide-react' icons such as Bot, ChevronRight, File, FlaskConical, Terminal),
followed by internal modules (move TableEmptyState from
'`@nemo/common/src/components/TableEmptyState`' next) and finally constants
(LINK_DOCS_EXPERIMENTS_CLI from '`@studio/constants/links`'); ensure clear
blank-line separation between each group to match the project's import grouping
convention.
🪄 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: 3a80668c-4df8-4d2d-8a96-0448f75c941f

📥 Commits

Reviewing files that changed from the base of the PR and between a7867f4 and ab12aba.

📒 Files selected for processing (2)
  • web/packages/studio/src/components/dataViews/ExperimentGroupDataView/Empty.tsx
  • web/packages/studio/src/components/dataViews/ExperimentGroupDataView/index.tsx

Comment thread web/packages/studio/src/components/dataViews/ExperimentGroupDataView/index.tsx Outdated
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 19029/25222 75.4% 61.4%
Integration Tests 11024/23994 45.9% 20.4%

@walston
walston force-pushed the nwalston/experiment-group-empty branch from ab12aba to 7579343 Compare June 11, 2026 20:59
walston added 4 commits June 12, 2026 08:04
Replace the plain "No Experiments" text with the same tabbed
CLI command / coding agent panel used in ExperimentSessionsDataView.

Signed-off-by: Nathan Walston <nwalston@nvidia.com>
Signed-off-by: Nathan Walston <nwalston@nvidia.com>
…cards

Signed-off-by: Nathan Walston <nwalston@nvidia.com>
…lters active

Signed-off-by: Nathan Walston <nwalston@nvidia.com>
@walston
walston force-pushed the nwalston/experiment-group-empty branch from 7579343 to 2a85e44 Compare June 12, 2026 15:19
@walston
walston added this pull request to the merge queue Jun 12, 2026
Merged via the queue into main with commit f9e01c4 Jun 12, 2026
47 checks passed
@walston
walston deleted the nwalston/experiment-group-empty branch June 12, 2026 21:02
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