From a291976282363b935d99613e65345eb961539753 Mon Sep 17 00:00:00 2001 From: Ousama Ben Younes Date: Tue, 8 Sep 2026 19:35:25 +0000 Subject: [PATCH] fix(marko-virtual): keep latest pinned through prepend race --- .../marko/chat-pretext/src/routes/+page.marko | 48 ++++++++++++++++- .../e2e/app/e2e/chat-pretext.spec.ts | 51 ++++++++++++------- 2 files changed, 79 insertions(+), 20 deletions(-) diff --git a/examples/marko/chat-pretext/src/routes/+page.marko b/examples/marko/chat-pretext/src/routes/+page.marko index 1a14ede0..a99694fe 100644 --- a/examples/marko/chat-pretext/src/routes/+page.marko +++ b/examples/marko/chat-pretext/src/routes/+page.marko @@ -26,6 +26,8 @@ static function makeMessage(index: number): Message { static const HISTORY_LIMIT = -90 static const AT_END_PX = 80 +static const PIN_RETRY_MAX_FRAMES = 60 +static const PIN_SETTLED_FRAME_COUNT = 2 // ---- Height model: mirrors the CSS below exactly. Every constant corresponds to a // declared style; if you change one, change the other. A NAMED font (Arial) with @@ -139,8 +141,12 @@ static function messageHeight(message: Message, viewportWidth: number) { // above the viewport, and if core's offset read is stale at that moment its // at-end compensation is skipped — so the view strands ~12 rows short with no // scroll event to recover it. The reactive