From 13e9030b4b1ead79d7dc2f0656455f6dd1a6218c Mon Sep 17 00:00:00 2001 From: Andrew Beal Date: Mon, 16 Feb 2026 21:56:31 +0000 Subject: [PATCH] fix: correct scroll positioning and spinner layout in chat plan area - Calculate step position relative to scroll container for accurate centering - Add flex-shrink: 0 to spinner to prevent unwanted shrinking - Pass alternateBackground prop to active step spinner --- Components/ChatPlanArea.svelte | 5 +++-- Components/Spinner.svelte | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Components/ChatPlanArea.svelte b/Components/ChatPlanArea.svelte index ab43110..93fcceb 100644 --- a/Components/ChatPlanArea.svelte +++ b/Components/ChatPlanArea.svelte @@ -96,7 +96,8 @@ const stepElement = stepElements[activeStepIndex]; if (!stepElement) return; - const stepTop = stepElement.offsetTop; + // Calculate position relative to the scroll container (wrapperDiv) + const stepTop = stepElement.offsetTop - contentDiv.offsetTop; const stepHeight = stepElement.offsetHeight; const wrapperHeight = wrapperDiv.clientHeight; const scrollTo = stepTop - (wrapperHeight / 2) + (stepHeight / 2); @@ -135,7 +136,7 @@ {/if} {#if index === activeStepIndex}
- +
{/if} {#if index > activeStepIndex} diff --git a/Components/Spinner.svelte b/Components/Spinner.svelte index 89e5b4b..ff0f01d 100644 --- a/Components/Spinner.svelte +++ b/Components/Spinner.svelte @@ -31,6 +31,7 @@ justify-content: center; align-items: center; border-radius: 50%; + flex-shrink: 0; --color: var(--interactive-accent); background: var(--color); background: linear-gradient(