diff --git a/TODO.md b/TODO.md index 159b7df..e24a01f 100644 --- a/TODO.md +++ b/TODO.md @@ -268,6 +268,17 @@ - backend debug broadcasts ## Recent Change Log +- Date: `2026-03-24` +- What changed: + - Simplified the GIPHY image-search UX so it presents raw search results instead of looking like an AI-evaluated result flow. + - Updated the image-mode copy to describe direct GIPHY search results, and changed the shared preview modal labels/content for GIPHY items from AI-note style metadata to plain result/source info. +- Why it changed: + - The image-search experience should behave like a straightforward provider search result browser, not like the video-side Gemini review flow. +- How it was verified: + - `node --check frontend/app.js` +- What is still risky or incomplete: + - This is a UX clarification pass; the backend still uses Gemini only for multilingual query expansion and does not do visual evaluation on GIPHY items. + - Date: `2026-03-24` - What changed: - Relaxed Gemini image-query expansion parsing so loose plain-text numbered lists can still be accepted when the model prepends explanatory text instead of returning a clean JSON object. diff --git a/frontend/app.js b/frontend/app.js index 5727213..c75f41d 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -48,6 +48,8 @@ const debugSummary = document.getElementById("debugSummary"); const resultModal = document.getElementById("resultModal"); const resultModalTitle = document.getElementById("resultModalTitle"); const resultModalSource = document.getElementById("resultModalSource"); +const resultModalReasonLabel = document.getElementById("resultModalReasonLabel"); +const resultModalSnippetLabel = document.getElementById("resultModalSnippetLabel"); const resultModalSnippet = document.getElementById("resultModalSnippet"); const resultModalReason = document.getElementById("resultModalReason"); const resultModalFrame = document.getElementById("resultModalFrame"); @@ -66,6 +68,8 @@ const resultModalReady = Boolean( resultModal && resultModalTitle && resultModalSource && + resultModalReasonLabel && + resultModalSnippetLabel && resultModalSnippet && resultModalReason && resultModalFrame && @@ -337,7 +341,7 @@ function applyMediaTypeUI() { searchResultsViewport.classList.toggle("image-results-scroll", isImageMode); searchModeTitle.textContent = isImageMode ? "AI Image Discovery" : "AI Smart Discovery"; searchModeHint.textContent = isImageMode - ? "GIPHY 이미지/GIF 검색 모드입니다. Gemini가 영어 검색어 5개로 확장한 뒤 최대 100개 결과를 보여줍니다." + ? "GIPHY 이미지/GIF 검색 결과를 그대로 보여주는 모드입니다. 최대 100개 결과를 내부 스크롤로 탐색할 수 있습니다." : "비디오 검색 모드입니다. 실제 검색 API와 연결되어 있습니다."; searchQuery.placeholder = isImageMode ? "검색할 이미지를 설명하세요" : "한글 검색어를 입력하세요"; searchSubmitButton.textContent = isImageMode ? "Search GIPHY" : "AI Search"; @@ -815,15 +819,21 @@ async function openResultModal(item) { const summaryRequestId = activeResultModalSummaryRequest; resultModalTitle.textContent = item.title || "Untitled"; resultModalSource.textContent = item.source || ""; + resultModalReasonLabel.textContent = giphyItem ? "Result Info" : "AI Note"; + resultModalSnippetLabel.textContent = giphyItem ? "Source" : "Source Summary"; resultModalReason.textContent = giphyItem ? [ - `Original Query: ${item.originalQuery || "-"}`, - `Expanded Query: ${item.searchQuery || "-"}`, `Rating: ${item.rating || "unrated"}`, + `Size: ${item.width || "?"} x ${item.height || "?"}`, + `Provider ID: ${item.providerId || "-"}`, ].join("\n") : (summarizeReason(item.reason) || "AI 노트가 없습니다."); const originalSummary = giphyItem - ? `Powered by GIPHY\n${item.width || "?"} x ${item.height || "?"}\n${item.sourcePageUrl || item.openUrl || item.link || ""}`.trim() + ? [ + "Powered by GIPHY", + item.sourcePageUrl || item.openUrl || item.link || "", + `Rating: ${item.rating || "unrated"}`, + ].filter(Boolean).join("\n") : (item.snippet || "원본 페이지에서 사용할 수 있는 설명이 없습니다."); resultModalSnippet.textContent = originalSummary; resultModalOpenExternal.href = item.openUrl || item.sourcePageUrl || item.link || "#"; diff --git a/frontend/index.html b/frontend/index.html index 18a9b1c..5b24b35 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -60,7 +60,7 @@ Powered by GIPHY

- 어떤 언어로 검색해도 Gemini가 영어 검색어 5개로 확장한 뒤 GIPHY 이미지/GIF 검색을 수행합니다. 결과는 아래 내부 스크롤 패널에서 최대 100개까지 탐색할 수 있습니다. + 어떤 언어로 검색해도 GIPHY 이미지/GIF 검색 결과를 최대 100개까지 내부 스크롤 패널에서 바로 탐색할 수 있습니다.

@@ -208,7 +208,7 @@
-

AI Note

+

AI Note

@@ -223,7 +223,7 @@
-

Source Summary

+

Source Summary