🪢 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(support): improve form error and add new topic category (#8941)
Michael Fröhlicha8471adcea13
diff --git a/web/src/features/support-chat/SupportFormSection.tsx b/web/src/features/support-chat/SupportFormSection.tsxindex 7672eaea3e..0cc98f2b6f 100644--- a/web/src/features/support-chat/SupportFormSection.tsx+++ b/web/src/features/support-chat/SupportFormSection.tsx@@ -78,7 +78,7 @@ export function SupportFormSection({message: "",integrationType: "",},- mode: "onChange",+ mode: "onSubmit",});const selectedTopic = form.watch("topic");@@ -209,7 +209,6 @@ export function SupportFormSection({}};- const isValid = form.formState.isValid;const messageIsShortAfterWarning =warnedShortOnce && (form.getValues("message") ?? "").trim().length < 20;@@ -482,7 +481,7 @@ export function SupportFormSection({<Buttontype="submit"- disabled={isSubmittingLocal || !isValid}+ disabled={isSubmittingLocal}className="w-full">{isSubmittingLocal ? (diff --git a/web/src/features/support-chat/formConstants.ts b/web/src/features/support-chat/formConstants.tsindex 653788a6d3..906ce1265a 100644--- a/web/src/features/support-chat/formConstants.ts+++ b/web/src/features/support-chat/formConstants.ts@@ -24,6 +24,7 @@ export const TopicGroups = {"Prompt Management","Evaluation","Platform",+ "Other",],} as const;@@ -69,7 +70,10 @@ export const SupportFormSchema = z.object({.union([TopicSchema, z.literal("")]).refine((val) => val !== "", { message: "Please select a topic." }).transform((val) => val as z.infer<typeof TopicSchema>),- message: z.string().trim().min(1, "Message cannot be empty."), // 🚨 no empty strings allowed+ message: z+ .string()+ .trim()+ .min(1, "Please provide a description of your issue."),});export type SupportFormValues = z.infer<typeof SupportFormSchema>;