Skip to content

Conversation

@malinskibeniamin
Copy link
Contributor

@malinskibeniamin malinskibeniamin commented Dec 21, 2025

Form component migration to new Field pattern:

  • Migrated AI Agent create form (3 files)
  • Migrated SecretSelector component
  • Migrated UserSelector component

Added form-refactorer skill with migration docs & patterns

Total: 8 files changed, replaced FormField/FormItem/FormLabel/FormMessage with Field/FieldLabel/FieldDescription/FieldError across forms

@malinskibeniamin malinskibeniamin self-assigned this Dec 21, 2025
@malinskibeniamin malinskibeniamin changed the title frontend: refactor AI agent create form Dec 21, 2025
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this skill will be part of the UI registry in the future.

placeholder="You are a helpful AI agent that..."
rows={8}
{...form.register('systemPrompt')}
aria-invalid={!!form.formState.errors.systemPrompt}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should we add aria-describedby if we add aria-invalid if we can, since we're doing it properly now?

value={field.value || []}
/>
) : (
<MCPEmpty>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we add test-ids for these empty states for e2e?

id="model"
placeholder="Enter model name (e.g., llama-3.1-70b)"
{...field}
aria-invalid={!!form.formState.errors[fieldNames.model]}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same here, aria-describedby is doable I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants