From e4f06457ca74735a18706efeddbb3cc04c1b4aa6 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Thu, 4 Jun 2026 00:11:05 -0400 Subject: [PATCH] fix(seek-slider): show position index for favorites instead of uniform scores Favorites/bookmarks are stored in state.searchResults with score=1.0 on every entry, so the seek slider fell into the "Score" branch and displayed a uniform 1.000 for every tick. Add a state.searchType === "bookmarks" branch (before the score check) in both renderSliderTicks() and onSliderInput() so favorites show their slide position within the set, matching how cluster selections display positions. Co-Authored-By: Claude Opus 4.8 (1M context) --- photomap/frontend/static/javascript/seek-slider.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/photomap/frontend/static/javascript/seek-slider.js b/photomap/frontend/static/javascript/seek-slider.js index 29f269ab..1c5d90a3 100644 --- a/photomap/frontend/static/javascript/seek-slider.js +++ b/photomap/frontend/static/javascript/seek-slider.js @@ -229,7 +229,9 @@ class SeekSlider { this.resetFadeOutTimer(); let panelText = ""; - if (state.searchResults?.length > 0 && state.searchResults[0].score !== undefined) { + if (state.searchType === "bookmarks") { + panelText = `Favorite: ${value}`; + } else if (state.searchResults?.length > 0 && state.searchResults[0].score !== undefined) { const result = state.searchResults[value - 1]; panelText = result ? `Score: ${result.score.toFixed(4)}` : ""; } else if (!state.searchResults || state.searchResults.length === 0) { @@ -471,6 +473,9 @@ class SeekSlider { } }) ); + } else if (state.searchType === "bookmarks") { + contextText = "Favorite"; + ticks = positions.map((idx) => `${idx}`); } else if (state.searchResults.length > 0 && state.searchResults[0].score !== undefined) { contextText = "Score"; ticks = positions.map((idx) => {