feat(studio): Add CLI/agent instructions to experiment group empty state - #279
Conversation
📝 WalkthroughWalkthroughA new ChangesEmpty experiment group state
Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
web/packages/studio/src/components/dataViews/ExperimentGroupDataView/Empty.tsx (1)
4-15: 💤 Low valueImport 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
📒 Files selected for processing (2)
web/packages/studio/src/components/dataViews/ExperimentGroupDataView/Empty.tsxweb/packages/studio/src/components/dataViews/ExperimentGroupDataView/index.tsx
|
ab12aba to
7579343
Compare
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>
7579343 to
2a85e44
Compare
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
Summary by CodeRabbit