-
Notifications
You must be signed in to change notification settings - Fork 20
feat(studio): Add CLI/agent instructions to experiment group empty state #279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2bc8f2e
feat(studio): Add CLI/agent instructions to experiment group empty state
walston 5ab75ab
fix(studio): Raise elevation of experiment group empty state card
walston 14c3c0d
fix(studio): Use surface-overlay elevation on experiment empty state …
walston 2a85e44
fix(studio): Shell-escape group name and hide CLI empty state when fi…
walston File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
78 changes: 78 additions & 0 deletions
78
web/packages/studio/src/components/dataViews/ExperimentGroupDataView/Empty.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| // SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| import { TableEmptyState } from '@nemo/common/src/components/TableEmptyState'; | ||
| import { | ||
| Button, | ||
| CodeSnippet, | ||
| TabsContent, | ||
| TabsList, | ||
| TabsRoot, | ||
| TabsTrigger, | ||
| Text, | ||
| } from '@nvidia/foundations-react-core'; | ||
| import { LINK_DOCS_EXPERIMENTS_CLI } from '@studio/constants/links'; | ||
| import { Bot, ChevronRight, File, FlaskConical, Terminal } from 'lucide-react'; | ||
|
|
||
| interface EmptyProps { | ||
| experimentGroupName: string; | ||
| } | ||
|
|
||
| export const Empty = ({ experimentGroupName }: EmptyProps) => { | ||
| const escapedGroupName = experimentGroupName.replace(/'/g, "'\\''"); | ||
| const cliCommand = | ||
| `nemo exp run \\\n` + | ||
| ` --group '${escapedGroupName}' \\\n` + | ||
| ` --dataset "<dataset-name>" \\\n` + | ||
| ` --evaluators correctness,helpfulness,groundedness,tool-error`; | ||
|
|
||
| return ( | ||
| <TableEmptyState | ||
| icon={<FlaskConical className="size-12" />} | ||
| header="No Experiments" | ||
| emptyMessage="Run an experiment to see results for this group." | ||
| actions={ | ||
| <div className="w-[560px] border border-base rounded-lg overflow-hidden bg-surface-overlay"> | ||
| <TabsRoot defaultValue="cli"> | ||
| <TabsList className="px-density-md"> | ||
| <TabsTrigger value="coding-agent"> | ||
| <Bot className="size-4" /> | ||
| Coding agent | ||
| </TabsTrigger> | ||
| <TabsTrigger value="cli"> | ||
| <Terminal className="size-4" /> | ||
| CLI command | ||
| </TabsTrigger> | ||
| </TabsList> | ||
| <div className="px-density-md pb-density-md flex flex-col gap-density-sm"> | ||
| <TabsContent value="coding-agent" className="px-0 pb-0 w-full"> | ||
| <CodeSnippet | ||
| value="To be determined" | ||
| language="text" | ||
| kind="block" | ||
| className="w-full whitespace-pre-line" | ||
| /> | ||
| </TabsContent> | ||
| <TabsContent value="cli" className="px-0 pb-0"> | ||
| <CodeSnippet value={cliCommand} language="bash" kind="block" className="w-full" /> | ||
| </TabsContent> | ||
| <Button | ||
| asChild | ||
| color="neutral" | ||
| kind="tertiary" | ||
| size="small" | ||
| className="w-full justify-start" | ||
| > | ||
| <a href={LINK_DOCS_EXPERIMENTS_CLI} target="_blank" rel="noreferrer"> | ||
| <File className="!text-brand" /> | ||
| <Text className="flex-1">CLI docs — learn more</Text> | ||
| <ChevronRight /> | ||
| </a> | ||
| </Button> | ||
| </div> | ||
| </TabsRoot> | ||
| </div> | ||
| } | ||
| /> | ||
| ); | ||
| }; | ||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.