From 89598cf0be6c7a3ef7a897f8f2e35729511db5fa Mon Sep 17 00:00:00 2001 From: Thomas <9749173+uhthomas@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:12:52 +0100 Subject: [PATCH] chore(web): remove arbitrary search result limit (#20719) The search results page can become unstable with large amounts of assets, and has therefore been limited to displaying just 5000 assets. This limit is arbitrary and may be too restrictive. --- .../search/[[photos=photos]]/[[assetId=id]]/+page.svelte | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte index 48ead6e6b4..e7798b1ac7 100644 --- a/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -50,7 +50,6 @@ import { tick } from 'svelte'; import { t } from 'svelte-i18n'; - const MAX_ASSET_COUNT = 5000; let { isViewing: showAssetViewer } = assetViewingStore; const viewport: Viewport = $state({ width: 0, height: 0 }); @@ -149,10 +148,7 @@ // eslint-disable-next-line svelte/valid-prop-names-in-kit-pages export const loadNextPage = async (force?: boolean) => { - if (!nextPage || searchResultAssets.length >= MAX_ASSET_COUNT) { - return; - } - if (isLoading && !force) { + if (!nextPage || (isLoading && !force)) { return; } isLoading = true;