Skip to content

Commit e51a760

Browse files
authored
frontend: fix layout shifts on AI agent create page (#2218)
Three sources of visual jank on the create agent page: 1. The MarkdownEditor's TabsContent uses framer-motion with a 500ms blur/slide animation. Switching between Editor/Raw tabs triggered this jarring transition. Replaced with direct conditional rendering. 2. The MarkdownEditor's editorKey effect fired on initial mount, causing Milkdown to unmount and remount immediately. The Prompt card visibly jumped as the editor content disappeared and reappeared. Now the effect only fires on actual mode changes. 3. The LLM config card grew then shrank as the gateway query resolved: API Token field rendered while gateways were loading, then disappeared once a gateway was auto-selected. Now the gateway-dependent fields (provider, model, API token) show skeleton placeholders until the gateway state fully settles. Gateway selector and max iterations render immediately.
1 parent b5f13af commit e51a760

3 files changed

Lines changed: 212 additions & 197 deletions

File tree

frontend/src/components/pages/agents/create/ai-agent-create-page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,10 +531,10 @@ export const AIAgentCreatePage = () => {
531531
</Card>
532532
</div>
533533

534-
{/* Prompt */}
534+
{/* System Prompt */}
535535
<Card size="full">
536536
<CardHeader>
537-
<CardTitle>Prompt</CardTitle>
537+
<CardTitle>System Prompt</CardTitle>
538538
<Text variant="muted">Define the agent's behavior and instructions</Text>
539539
</CardHeader>
540540
<CardContent>

0 commit comments

Comments
 (0)