From 9cc70269f52e28b082ce719196d783b0db9b059d Mon Sep 17 00:00:00 2001 From: Davide Scaini Date: Fri, 15 May 2026 08:59:06 +0200 Subject: [PATCH] Feed: eager-load all year shards when a date filter is active The initial page load only fetches the most recent year shard. Selecting a date range or year preset that spans an older shard returned no results because those shards were never loaded. Extend the existing search eager-load trigger to also fire on any non-empty dateFrom, covering both custom date inputs and year preset buttons. --- site/src/components/ActivityFeed.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/src/components/ActivityFeed.svelte b/site/src/components/ActivityFeed.svelte index 6e47156..0d0bf3e 100644 --- a/site/src/components/ActivityFeed.svelte +++ b/site/src/components/ActivityFeed.svelte @@ -132,10 +132,10 @@ $: if (sport || datePre || query || customFrom || customTo) shown = PAGE_SIZE; // reset pagination on filter change - // When a search query is active, eagerly load all remaining shards so the - // full history is searched (not just the initially-loaded recent year). + // When a search query or any date filter is active, eagerly load all + // remaining shards so results aren't limited to the initially-loaded year. let loadingAllShards = false; - $: if (query.trim() && pendingShards.length > 0 && !loadingAllShards) { + $: if ((query.trim() || dateFrom) && pendingShards.length > 0 && !loadingAllShards) { loadingAllShards = true; (async () => { while (pendingShards.length > 0) {