From ffec6bb843f55319dd25ca77a58f04e97e7333e3 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Tue, 17 Mar 2026 22:39:06 -0700 Subject: [PATCH] fix(vue-spa): suppress spring snap-back on processed cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a new job prop arrives after approve/reject, the watch cleared the exit-transform inline style while the spring transition was still active, causing the card to animate from offscreen back to center before the new card rendered. Fix: set transition:none before clearing the style, then restore it on the next rAF — browser paints the new position first. --- web/src/components/JobCardStack.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/web/src/components/JobCardStack.vue b/web/src/components/JobCardStack.vue index ffbb9b6..6335fce 100644 --- a/web/src/components/JobCardStack.vue +++ b/web/src/components/JobCardStack.vue @@ -204,8 +204,15 @@ watch(() => props.job.id, () => { isHeld.value = false isExpanded.value = false if (wrapperEl.value) { - wrapperEl.value.style.transform = '' - wrapperEl.value.style.opacity = '' + // Suppress the spring transition for this frame — without this the card + // spring-animates from its exit position back to center before the new + // job renders (the "snap-back on processed cards" glitch). + wrapperEl.value.style.transition = 'none' + wrapperEl.value.style.transform = '' + wrapperEl.value.style.opacity = '' + requestAnimationFrame(() => { + if (wrapperEl.value) wrapperEl.value.style.transition = '' + }) } })