Commit e51a760
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
- ui
- ai-agent
- markdown-editor
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
| 537 | + | |
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| |||
0 commit comments