Polish search and embedding UX

- add semantic text search with toolbar mode switching and sqlite-vec query support
- improve embedding progress visibility, failure recovery, and similar-image affordances
- add search clearing and keyboard controls for filename vs semantic search modes
- refine background task interactions and gallery/lightbox embedding states

Refs: #4
This commit is contained in:
2026-04-06 01:45:25 +01:00
parent 51e4c2c1f7
commit c6a66d1ba9
16 changed files with 978 additions and 415 deletions
+12 -3
View File
@@ -56,6 +56,7 @@ export function Lightbox() {
const imageViewportRef = useRef<HTMLDivElement>(null);
const currentIndex = selectedImage ? images.findIndex((image) => image.id === selectedImage.id) : -1;
const canFindSimilar = selectedImage?.embedding_status === "ready";
const goPrev = useCallback(() => {
if (currentIndex > 0) openImage(images[currentIndex - 1]);
@@ -199,10 +200,18 @@ export function Lightbox() {
</svg>
</button>
<button
className="rounded-full border border-white/10 bg-white/5 px-3 py-1.5 text-xs text-gray-300 hover:text-white"
onClick={() => void loadSimilarImages(selectedImage.id)}
className={`rounded-full border px-3 py-1.5 text-xs ${
canFindSimilar
? "border-white/10 bg-white/5 text-gray-300 hover:text-white"
: "border-white/5 bg-white/[0.03] text-gray-600 cursor-not-allowed"
}`}
onClick={() => {
if (!canFindSimilar) return;
void loadSimilarImages(selectedImage.id);
}}
disabled={!canFindSimilar}
>
Similar
{canFindSimilar ? "Similar" : "Embeddings not ready"}
</button>
</div>
<button className="rounded p-1 text-gray-400 hover:text-white" onClick={closeImage}>