From c1555fd6abd53e789d2eff9cc558edae5e11a288 Mon Sep 17 00:00:00 2001 From: hyungi Date: Sat, 13 Jun 2026 15:41:59 +0900 Subject: [PATCH] =?UTF-8?q?feat(docpage):=20=EC=A0=84=EC=B2=B4=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=20=EB=AA=A9=EB=A1=9D=20=ED=81=B4=EB=A6=AD=20=EC=8B=9C?= =?UTF-8?q?=20=EC=9D=B8=EB=9D=BC=EC=9D=B8=20=EB=AF=B8=EB=A6=AC=EB=B3=B4?= =?UTF-8?q?=EA=B8=B0=20=EB=8C=80=EC=8B=A0=20D3=20=EC=83=81=EC=84=B8?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 사용자 결정 "개선된 페이지가 앞으로 표시되야지" — /documents 브라우저에서 문서를 열면 인라인 DocumentViewer(구) 대신 개선된 /documents/[id](D3 절 구조 탐색기)로 이동. /documents = 브라우즈/검색/필터/일괄 목록(풀폭 중앙) 역할로 정리: - selectDoc → goto(/documents/[id]) (행 클릭·키보드 enter 공통) - 인라인 리더(DocumentViewer)·인스펙터 패널 제거, 목록 max-w-5xl 중앙 - AI 답변 카드(질문형 검색)는 목록 상단 고정으로 이동(보존) - 검색·필터칩·일괄작업·업로드·페이지네이션 전부 유지 Co-Authored-By: Claude Fable 5 --- frontend/src/routes/documents/+page.svelte | 76 +++++++--------------- 1 file changed, 22 insertions(+), 54 deletions(-) diff --git a/frontend/src/routes/documents/+page.svelte b/frontend/src/routes/documents/+page.svelte index 1f2d96d..606df39 100644 --- a/frontend/src/routes/documents/+page.svelte +++ b/frontend/src/routes/documents/+page.svelte @@ -8,8 +8,7 @@ import { goto } from '$app/navigation'; import { api } from '$lib/api'; import { addToast } from '$lib/stores/toast'; - import { Info, X, Plus, Trash2, Tag, FolderTree, Sparkles, ChevronLeft, ArrowUpDown } from 'lucide-svelte'; - import DocumentViewer from '$lib/components/DocumentViewer.svelte'; + import { X, Plus, Trash2, Tag, FolderTree, Sparkles, ArrowUpDown } from 'lucide-svelte'; import MarkdownStatusBadge from '$lib/components/MarkdownStatusBadge.svelte'; import { isMdStatusVisible } from '$lib/utils/mdStatus'; import UploadDropzone from '$lib/components/UploadDropzone.svelte'; @@ -233,15 +232,12 @@ goto(`/documents${qs ? '?' + qs : ''}`, { noScroll: true }); } - async function selectDoc(doc) { - if (selectedDoc?.id === doc.id) { selectedDoc = null; return; } - selectedDoc = doc; // 즉시 표시(리더 + 기본 인스펙터) - // 인스펙터 풀 메타 하이드레이션 — 검색 결과(SearchResult)는 메타가 빈약(태그/크기/하위/md상태/읽음 없음). - // 풀 문서를 조회해 채운다(기존 GET /documents/{id}, 백엔드 무변). 리스트 모드도 md상태 등 보강. - try { - const full = await api(`/documents/${doc.id}`); - if (selectedDoc?.id === doc.id) selectedDoc = { ...doc, ...full }; - } catch { /* 실패 시 기본 정보 유지 */ } + // 문서 열기 = 개선된 상세 페이지(D3 절 구조 탐색기)로 이동. + // 사용자 결정: "개선된 페이지가 앞으로 표시되야지" — 인라인 미리보기 폐기. + // /documents = 브라우즈/검색/필터/일괄 목록, 문서 열기 = /documents/[id] D3 리더. + function selectDoc(doc) { + if (!doc) return; + goto(`/documents/${doc.id}`); } // bulk 선택 @@ -386,8 +382,8 @@
- -
+ +
@@ -487,6 +483,19 @@ {/if}
+ + {#if showAskCard} +
+ goto(`/documents/${docId}`)} + onDismiss={() => { askDismissed = true; }} + /> +
+ {/if} + {#if selectionCount > 0}
@@ -587,47 +596,6 @@
- -
- {#if selectedDoc} - -
- -
- -
-
- -
- {:else if showAskCard} -
- goto(`/documents/${docId}`)} - onDismiss={() => { askDismissed = true; }} - /> -
- {:else} - - {/if} -
- - - {#if selectedDoc && inspectorOpen} - - {/if}