diff --git a/frontend/src/components/dashboard/dashboard-table.tsx b/frontend/src/components/dashboard/dashboard-table.tsx
index 031c1ad06..29cba7092 100644
--- a/frontend/src/components/dashboard/dashboard-table.tsx
+++ b/frontend/src/components/dashboard/dashboard-table.tsx
@@ -89,21 +89,32 @@ export function WorkflowsDashboardTable() {
enableHiding: false,
},
{
- accessorKey: "description",
+ accessorKey: "alias",
header: ({ column }) => (
),
- cell: ({ row }) => (
-
- {row.getValue(
- "description"
- ) || "-"}
-
- ),
+ cell: ({ row }) => {
+ const alias = row.getValue("alias")
+ if (!alias) {
+ return (
+
+ No alias
+
+ )
+ }
+ return (
+
+ {alias}
+
+ )
+ },
enableSorting: true,
enableHiding: false,
},
diff --git a/frontend/src/components/workbench/panel/workflow-panel.tsx b/frontend/src/components/workbench/panel/workflow-panel.tsx
index 176c7beca..106cf4fac 100644
--- a/frontend/src/components/workbench/panel/workflow-panel.tsx
+++ b/frontend/src/components/workbench/panel/workflow-panel.tsx
@@ -32,6 +32,7 @@ import {
import {
Form,
FormControl,
+ FormDescription,
FormField,
FormItem,
FormLabel,
@@ -50,9 +51,10 @@ import { toast } from "@/components/ui/use-toast"
import { CopyButton } from "@/components/copy-button"
import { DynamicCustomEditor } from "@/components/editor/dynamic"
-const workflowConfigFormSchema = z.object({
+const workflowUpdateFormSchema = z.object({
title: z.string(),
description: z.string(),
+ alias: z.string().nullish(),
config: z.string().transform((val, ctx) => {
try {
return YAML.parse(val) || {}
@@ -102,7 +104,7 @@ const workflowConfigFormSchema = z.object({
}),
})
-type WorkflowConfigForm = z.infer
+type WorkflowUpdateForm = z.infer
export function WorkflowPanel({
workflow,
@@ -116,11 +118,12 @@ export function WorkflowPanel({
)
const { updateWorkflow } = useWorkflow()
- const methods = useForm({
- resolver: zodResolver(workflowConfigFormSchema),
+ const methods = useForm({
+ resolver: zodResolver(workflowUpdateFormSchema),
defaultValues: {
title: workflow.title || "",
description: workflow.description || "",
+ alias: workflow.alias,
config: isEmptyObjectOrNullish(workflow.config)
? YAML.stringify({
environment: null,
@@ -137,8 +140,9 @@ export function WorkflowPanel({
: YAML.stringify(workflow.returns),
},
})
+ console.log("workflow alias", workflow.alias)
- const onSubmit = async (values: WorkflowConfigForm) => {
+ const onSubmit = async (values: WorkflowUpdateForm) => {
console.log("Saving changes...", values)
try {
await updateWorkflow(values)
@@ -159,7 +163,7 @@ export function WorkflowPanel({
// Save whenever focus changes, regardless of where it's going
const values = methods.getValues()
// Parse values through zod schema first
- const result = await workflowConfigFormSchema.safeParseAsync(values)
+ const result = await workflowUpdateFormSchema.safeParseAsync(values)
if (!result.success) {
console.error("Validation failed:", result.error)
return
@@ -224,6 +228,7 @@ export function WorkflowPanel({
render={({ field }) => (
Name
+
)}
/>
+
+ (
+
+
+
+ Alias
+
+ {field.value && (
+
+ )}
+
+
+ A name that can be used to uniquely identify this
+ workflow.
+
+
+
+
+
+
+ )}
+ />
Workflow ID