Labels: bug, ui
Problem
src/lib/components/CarouselCard.svelte renders a static label:
<span class="live-text">LIVE</span>
This always displays regardless of how old the underlying data is. The carousel is refreshed on the same up-to-1-hour cadence as Issue 1 (see CAROUSEL_INTERVAL_MS in servicesScheduler.js), so "LIVE" can be showing data that's nearly an hour old. The backend already computes real freshness info that the frontend ignores — getCachedCarouselData() in carouselService.js returns cached, cacheAge (seconds), and fresh, and the /api/carousel/stats route passes all three through, but CarouselCard.svelte never reads them for the badge.
Solution
Bind the badge to the freshness data already available in the API response:
{#if cacheAge < 300}
<span class="live-text">LIVE</span>
{:else}
<span class="stale-text">Updated {formatAge(cacheAge)} ago</span>
{/if}
Pick whatever threshold matches the true refresh interval once Issue 1 is resolved (e.g. under 5 minutes = "LIVE").
Files: src/lib/components/CarouselCard.svelte, src/lib/services/carouselService.js (data already available, just unused)
Labels:
bug,uiProblem
src/lib/components/CarouselCard.svelterenders a static label:This always displays regardless of how old the underlying data is. The carousel is refreshed on the same up-to-1-hour cadence as Issue 1 (see
CAROUSEL_INTERVAL_MSinservicesScheduler.js), so "LIVE" can be showing data that's nearly an hour old. The backend already computes real freshness info that the frontend ignores —getCachedCarouselData()incarouselService.jsreturnscached,cacheAge(seconds), andfresh, and the/api/carousel/statsroute passes all three through, butCarouselCard.sveltenever reads them for the badge.Solution
Bind the badge to the freshness data already available in the API response:
{#if cacheAge < 300} <span class="live-text">LIVE</span> {:else} <span class="stale-text">Updated {formatAge(cacheAge)} ago</span> {/if}Pick whatever threshold matches the true refresh interval once Issue 1 is resolved (e.g. under 5 minutes = "LIVE").
Files:
src/lib/components/CarouselCard.svelte,src/lib/services/carouselService.js(data already available, just unused)