From ca949e15c53123dfd46f77ee83d92c5edc77fbfc Mon Sep 17 00:00:00 2001 From: Tuukka Kantola Date: Mon, 25 May 2026 13:30:27 +0200 Subject: [PATCH] fix(editor): Polish Instance AI visuals (no-changelog) (#30987) --- .../ai/instanceAi/InstanceAiThreadView.vue | 95 ++++++++++++++++--- .../components/AgentActivityTree.vue | 5 + .../ai/instanceAi/components/AgentSection.vue | 5 +- .../components/AnsweredQuestions.vue | 4 +- .../components/ApprovalOptionList.vue | 43 +++++---- .../components/ConfirmationPreview.vue | 3 +- .../ai/instanceAi/components/DataSection.vue | 6 +- .../ai/instanceAi/components/DelegateCard.vue | 5 +- .../InstanceAiConfirmationPanel.vue | 18 ++-- .../components/InstanceAiMessage.vue | 3 +- .../instanceAi/components/ResponseGroup.vue | 4 +- .../components/SubagentStepTimeline.vue | 10 +- .../components/TimelineStepButton.vue | 4 + .../components/TimelineStepChevron.vue | 28 ++++++ .../ai/instanceAi/components/ToolCallStep.vue | 5 +- .../instanceAi/components/ToolResultJson.vue | 4 +- 16 files changed, 184 insertions(+), 58 deletions(-) create mode 100644 packages/frontend/editor-ui/src/features/ai/instanceAi/components/TimelineStepChevron.vue diff --git a/packages/frontend/editor-ui/src/features/ai/instanceAi/InstanceAiThreadView.vue b/packages/frontend/editor-ui/src/features/ai/instanceAi/InstanceAiThreadView.vue index b31a320101d..f5555ec89f2 100644 --- a/packages/frontend/editor-ui/src/features/ai/instanceAi/InstanceAiThreadView.vue +++ b/packages/frontend/editor-ui/src/features/ai/instanceAi/InstanceAiThreadView.vue @@ -428,20 +428,52 @@ watch( // --- Floating input dynamic padding --- const inputContainerRef = useTemplateRef('inputContainer'); +const inputSwapRef = useTemplateRef('inputSwap'); const inputAreaHeight = ref(120); -let resizeObserver: ResizeObserver | null = null; +const scrollButtonBottomOffset = ref(144); +let inputContainerResizeObserver: ResizeObserver | null = null; +let inputSwapResizeObserver: ResizeObserver | null = null; + +function updateScrollButtonBottomOffset() { + const container = inputContainerRef.value; + const inputSwap = inputSwapRef.value; + if (!container || !inputSwap) { + scrollButtonBottomOffset.value = inputAreaHeight.value + 24; + return; + } + + const containerBottom = container.getBoundingClientRect().bottom; + const inputSwapTop = inputSwap.getBoundingClientRect().top; + scrollButtonBottomOffset.value = Math.max(24, containerBottom - inputSwapTop + 24); +} watch( inputContainerRef, (el) => { - resizeObserver?.disconnect(); + inputContainerResizeObserver?.disconnect(); if (el) { - resizeObserver = new ResizeObserver((entries) => { + inputContainerResizeObserver = new ResizeObserver((entries) => { for (const entry of entries) { inputAreaHeight.value = entry.borderBoxSize[0]?.blockSize ?? entry.contentRect.height; } + updateScrollButtonBottomOffset(); }); - resizeObserver.observe(el); + inputContainerResizeObserver.observe(el); + } + }, + { immediate: true }, +); + +watch( + inputSwapRef, + (el) => { + inputSwapResizeObserver?.disconnect(); + if (el) { + inputSwapResizeObserver = new ResizeObserver(() => { + updateScrollButtonBottomOffset(); + }); + inputSwapResizeObserver.observe(el); + updateScrollButtonBottomOffset(); } }, { immediate: true }, @@ -483,7 +515,8 @@ onMounted(() => { onUnmounted(() => { thread.closeSSE(); contentResizeObserver?.disconnect(); - resizeObserver?.disconnect(); + inputContainerResizeObserver?.disconnect(); + inputSwapResizeObserver?.disconnect(); executionTracking.cleanup(); }); @@ -645,13 +678,15 @@ function handleWorkflowFailures(report: WorkflowFailuresReport) {
- + -
+
.reasoningTrigger { + --button--padding: 0; + --button--font-size: var(--font-size--sm); + + padding-inline: 0; + font-size: var(--font-size--sm); color: var(--color--text--tint-2); } diff --git a/packages/frontend/editor-ui/src/features/ai/instanceAi/components/AgentSection.vue b/packages/frontend/editor-ui/src/features/ai/instanceAi/components/AgentSection.vue index 3e0fc7eb24f..67fb5ceda11 100644 --- a/packages/frontend/editor-ui/src/features/ai/instanceAi/components/AgentSection.vue +++ b/packages/frontend/editor-ui/src/features/ai/instanceAi/components/AgentSection.vue @@ -1,10 +1,11 @@