🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(prompts): custom label creation popover too wide (#7529)
Nimar2b8f583c4466
diff --git a/web/src/features/prompts/components/SetPromptVersionLabels/index.tsx b/web/src/features/prompts/components/SetPromptVersionLabels/index.tsxindex 7817d818c5..62a9c14bc1 100644--- a/web/src/features/prompts/components/SetPromptVersionLabels/index.tsx+++ b/web/src/features/prompts/components/SetPromptVersionLabels/index.tsx@@ -47,6 +47,7 @@ export function SetPromptVersionLabels({const [selectedLabels, setSelectedLabels] = useState<string[]>([]);const [labels, setLabels] = useState<string[]>([]);const [isAddingLabel, setIsAddingLabel] = useState(false);+ const labelsChanged = JSON.stringify([...selectedLabels].sort()) !== JSON.stringify([...prompt.labels].sort());const customLabelScrollRef = useRef<HTMLDivElement | null>(null);const usedLabelsInProject = api.prompts.allLabels.useQuery(@@ -116,7 +117,7 @@ export function SetPromptVersionLabels({<PopoverTrigger asChild data-version-trigger="true"><divclassName={cn(- "flex min-w-0 max-w-full cursor-pointer flex-wrap gap-1",+ "flex w-fit min-w-0 max-w-full cursor-pointer flex-wrap gap-1",!hasAccess && "cursor-not-allowed",)}>@@ -143,7 +144,7 @@ export function SetPromptVersionLabels({</div></PopoverTrigger><PopoverContent- className="max-h-[50vh] overflow-y-auto"+ className="max-w-[90vw] sm:max-w-md"align="start"side="bottom"sideOffset={5}@@ -225,6 +226,7 @@ export function SetPromptVersionLabels({: "default"}loading={mutatePromptVersionLabels.isLoading}+ disabled={!labelsChanged}className="w-full"onClick={handleSubmitLabels}>