From d0c7ba28b73a95b4bf2beca032028175a9264d57 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Aug 2026 00:44:27 +0000 Subject: [PATCH] Fix RSS ticker so scroll speed is content-independent Co-authored-by: ChrisChrome <28414320+ChrisChrome@users.noreply.github.com> --- server/routes/widgets.js | 41 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/server/routes/widgets.js b/server/routes/widgets.js index cdc2311..9cd2060 100644 --- a/server/routes/widgets.js +++ b/server/routes/widgets.js @@ -427,29 +427,62 @@ load(); setInterval(load, 600000); } function renderRSS(c) { + // scroll_speed is authored in the UI as "seconds" (legacy field), but that used to be wired + // straight into animation-duration: a *fixed total time* for the whole strip to cross the + // screen. That makes the on-screen speed depend on how much content there is - a feed with + // many items gets dragged through in the same {scroll_speed}s as a feed with one, so it + // flies past far too fast, never lets the reader finish, and simply "jumps back to the + // start" once the fixed duration is up. Instead we treat scroll_speed as calibrating a + // constant px/sec rate (using one viewport-width per scroll_speed seconds as the reference, + // matching prior behaviour for content that fits in one screen), then measure the actual + // rendered width of the ticker and derive a duration long enough to move that full distance + // at the same constant speed - so more items simply take proportionally longer, and every + // item scrolls fully into and out of view before the loop restarts. + const scrollSpeedSec = safeNumber(c.scroll_speed, 30); return `
Loading feed...
`; }