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
This commit is contained in:
Andrew Beal 2026-02-16 21:56:31 +00:00
parent 9b40f397c4
commit 13e9030b4b
2 changed files with 4 additions and 2 deletions

View file

@ -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}
<div class="chat-plan-step-icon">
<Spinner {editModeActive}/>
<Spinner {editModeActive} alternateBackground={true}/>
</div>
{/if}
{#if index > activeStepIndex}

View file

@ -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(