Files
immich/web/src
midzelis 5b10ff0eff refactor(web): switch consumers to use day-tier viewport boundaries
TimelineDay.isInOrNearViewport now derives from the firstInOrNearIndex
$state added in the previous commit (true iff first index != -1). This
replaces the old $derived.by that read every asset's isInOrNearViewport
via viewerAssets.some(), removing a per-asset subscription point that
filter() in AssetLayout had been creating for every render.

AssetLayout switches from filterIsInOrNearViewport(viewerAssets) to
viewerAssets.slice(firstInOrNearIndex, lastInOrNearIndex + 1). The slice
expression depends only on the two boundary $state values, not on any
asset's proximity $derived. Reactive churn during scroll collapses to:
boundary indices change → slice recomputes → {#each} reconciles.

Month.svelte passes the new boundary props through. filterIsInOrNearViewport
is still used at the month tier (to filter days) and stays in utils.

Change-Id: If4e30192146f3e987307b1efd7c6d41d6a6a6964
2026-05-24 15:45:19 -04:00
..
2026-04-21 14:51:38 -04:00
2026-04-21 14:51:38 -04:00
2026-04-14 16:18:12 +00:00