From 9b9790f05d438dfbc9492311a5ab2adf9a161791 Mon Sep 17 00:00:00 2001 From: hyungi Date: Sat, 13 Jun 2026 16:29:04 +0900 Subject: [PATCH] =?UTF-8?q?fix(docpage):=20D3=20=EC=8B=9C=EC=95=88=20?= =?UTF-8?q?=EC=8A=A4=ED=83=80=EC=9D=BC=20=EA=B7=B8=EB=8C=80=EB=A1=9C=20?= =?UTF-8?q?=ED=8F=AC=ED=8C=85=20+=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20?= =?UTF-8?q?=EA=B8=B8=EC=9D=B4/=EC=A0=91=EA=B7=BC=EC=84=B1=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 사용자 "시안대로 안했다" → 앱 토큰 재해석을 폐기하고 d3-deepened 시안의 inline 스타일을 그대로 포팅(데이터만 바인딩): 트리 좌측 색바(3×16)+연결선(ㄴ자)+활성+ 저신뢰 맥동배지, 절차색 #7a8b3f, 헤더 PDF아이콘+pill칩+분류/원본/링크/관리, 절 집중 뷰(요건 requirement 배지·신뢰도 바·절요약 인용박스), 슬림 레일 카드(시안 동일). 모바일: 절구조/인사이트 안보임+무한길이("쭉 아래까지") → pill sticky + 절 본문 카드마다 접기('본문 보기', 기본 요약만)로 컴팩트화. svelte-check 0. Co-Authored-By: Claude Fable 5 --- .../src/routes/documents/[id]/+page.svelte | 649 +++++++----------- 1 file changed, 250 insertions(+), 399 deletions(-) diff --git a/frontend/src/routes/documents/[id]/+page.svelte b/frontend/src/routes/documents/[id]/+page.svelte index 68bafef..201b9c9 100644 --- a/frontend/src/routes/documents/[id]/+page.svelte +++ b/frontend/src/routes/documents/[id]/+page.svelte @@ -1,7 +1,7 @@ - -{#snippet treeNav(jumpMode = false)} -
-
- 절 구조 - {sections.length}절 + +{#snippet treeNav(jumpMode)} +
+
+
절 구조
+ {sections.length}절
- -
- 정의 - 절차 - 요건 +
+ 정의 + 절차 + 요건
-
    - {#each sections as s (s.chunk_id)} - {@const tm = typeMeta(s.section_type)} - {@const active = s.chunk_id === selectedSection?.chunk_id} - {@const low = isLowConf(s.confidence)} -
  • - {#if jumpMode} - - - {secTitle(s)} - {#if low}!{:else}{/if} - - {:else} - + {#each sections as s (s.chunk_id)} + {@const tm = typeMeta(s.section_type)} + {@const active = !jumpMode && s.chunk_id === selectedSection?.chunk_id} + {@const child = secDepth(s) > 0} + {@const low = isMidLow(s.confidence)} + !jumpMode && (selectedSectionId = s.chunk_id)} + onkeydown={(e) => { if (!jumpMode && (e.key === 'Enter' || e.key === ' ')) { e.preventDefault(); selectedSectionId = s.chunk_id; } }} + class="d3node {child ? 'd3child' : ''} {active ? 'd3active' : ''}" + style="display:block;border:1px solid {active ? '#4f8a6b' : low ? '#e7d49a' : 'transparent'};border-radius:9px;padding:{child ? '6px 8px' : '7px 8px'};margin-bottom:2px;{low ? 'background:#fbf6e6;' : ''}text-decoration:none;cursor:pointer;"> +
    + + {secTitle(s)} + {#if low} + ! + {:else if !child} + {/if} -
  • - {/each} -
+
+ + {/each} {#if quality} -
- 추출 품질 - {#if quality.headings != null}· 제목 {quality.headings}{/if} - {#if quality.tables != null}· 표 {quality.tables}{/if} - {#if quality.images != null}· 이미지 {quality.images}{/if} -
- {/if} -
-{/snippet} - - -{#snippet rail()} -
- - {#if doc.ai_tldr || doc.ai_summary} -
-
TL;DR
-

{doc.ai_tldr || doc.ai_summary}

-
- {/if} - - {#if doc.ai_bullets && doc.ai_bullets.length} -
-
핵심점
-
    - {#each doc.ai_bullets as b} -
  • ·{b}
  • - {/each} -
-
- {/if} - - {#if doc.ai_detail_summary} -
-
- 심층 - {#if doc.ai_analysis_tier === 'deep'}DEEP{/if} -
-

{doc.ai_detail_summary}

-
- {/if} - - {#if doc.ai_inconsistencies && doc.ai_inconsistencies.length} -
-
불일치 {doc.ai_inconsistencies.length}
-
    - {#each doc.ai_inconsistencies as inc} -
  • · {typeof inc === 'string' ? inc : inc.desc || inc.kind}
  • - {/each} -
-
- {/if} - - {#if doc.ai_domain} -
-
분류
-
- {domainLabel(doc.ai_domain)}{#if doc.ai_sub_group} · {doc.ai_sub_group}{/if} -
- {#if doc.ai_confidence != null}신뢰도 {doc.ai_confidence.toFixed(2)}{/if} - {#if doc.ai_analysis_tier}{doc.ai_analysis_tier}{/if} -
+
+
추출 품질
+
+ {#if quality.headings != null}headings {quality.headings}{/if} + {#if quality.tables != null}tables {quality.tables}{/if} + {#if quality.images != null}images {quality.images}{/if}
{/if} - - {#if doc.ai_tags && doc.ai_tags.length} -
-
태그
-
- {#each doc.ai_tags as t}{t}{/each} -
-
- {/if} - -
-
관련 문서
-

벡터 유사도 기반 — 준비 중

-
- -
- - 문서 정보 - -
- {#if doc.category === 'library'}{/if} - - -
-
- -
- - 관리 · 분류 편집 - -
- - - - - -
-
-
{/snippet} @@ -337,262 +200,250 @@ {#snippet focusView()} {#if selectedSection} {@const tm = typeMeta(selectedSection.section_type)} -
- {doc.title} - {#each pathSegments(selectedSection.heading_path) as seg}/{seg}{/each} +
+ {doc.title} + {#each pathSegments(selectedSection.heading_path) as seg}/{seg}{/each}
-
-

{secTitle(selectedSection)}

- {#if tm.label}{tm.label}{/if} +
+

{secTitle(selectedSection)}

+ {#if tm.label}{tm.label} {tm.en}{/if}
{#if selectedSection.confidence != null} -
- 신뢰도 - - {selectedSection.confidence.toFixed(2)} +
+ 신뢰도 +
+ {selectedSection.confidence.toFixed(2)}
{/if} {#if isLowConf(selectedSection.confidence)} -
!저신뢰 절 — 표·수식 추출이 불완전할 수 있습니다. 정확한 내용은 원본을 확인하세요.
+
!저신뢰 절 — 표·수식 추출이 불완전할 수 있습니다. 정확한 내용은 원본을 확인하세요.
{/if} {#if selectedSection.summary} -
절 요약

{selectedSection.summary}

+
+
절 요약
+
{selectedSection.summary}
+
{/if} {#if selectedBodyHtml}
{@html selectedBodyHtml}
{:else} -

이 절의 본문은 추출되지 않았습니다. 헤더의 '원본'에서 확인하세요.

+

이 절의 본문은 추출되지 않았습니다. 헤더의 '원본'에서 확인하세요.

{/if} -
- - {selIdx + 1} / {sections.length} - +
+ {#if selIdx > 0} + + {:else}{/if} + {#if selIdx < sections.length - 1} + {@const nx = sections[selIdx + 1]} + + {:else}{/if}
{/if} {/snippet} - + +{#snippet rail()} +
+ {#if doc.ai_tldr || doc.ai_summary} +
+
TL;DR
+
{doc.ai_tldr || doc.ai_summary}
+
+ {/if} + {#if doc.ai_bullets && doc.ai_bullets.length} +
+
핵심점
+
    + {#each doc.ai_bullets as b}
  • ·{b}
  • {/each} +
+
+ {/if} + {#if doc.ai_detail_summary} +
+
+ 심층 + {#if doc.ai_analysis_tier === 'deep'}DEEP{/if} +
+
{doc.ai_detail_summary}
+
+ {/if} + {#if doc.ai_inconsistencies && doc.ai_inconsistencies.length} +
+
불일치 {doc.ai_inconsistencies.length}
+
    {#each doc.ai_inconsistencies as inc}
  • · {typeof inc === 'string' ? inc : inc.desc || inc.kind}
  • {/each}
+
+ {/if} + {#if doc.ai_domain} +
+
분류
+
+
도메인{domainLabel(doc.ai_domain)}
+ {#if doc.ai_sub_group}
하위{doc.ai_sub_group}
{/if} + {#if doc.ai_analysis_tier}
tier{doc.ai_analysis_tier}
{/if} + {#if doc.ai_confidence != null}
신뢰도{doc.ai_confidence.toFixed(2)}
{/if} +
+
+ {/if} + {#if doc.ai_tags && doc.ai_tags.length} +
+
태그
+
{#each doc.ai_tags as t}{t}{/each}
+
+ {/if} +
+
관련 문서
+
벡터 유사도 기반 — 준비 중
+
+
+{/snippet} + + {#snippet sectionCard(s)} {@const tm = typeMeta(s.section_type)} {@const body = sectionBodyHtml(s)} -
-
-

{secTitle(s)}

- {#if tm.label}{tm.label}{/if} +
+
+

{secTitle(s)}

+ {#if tm.label}{tm.label}{/if}
{#if isLowConf(s.confidence)} -
!저신뢰 — 표·수식 추출 불완전, 원본 확인 권장
+
!저신뢰 — 표·수식 추출 불완전, 원본 확인 권장
{/if} {#if s.summary} -
절 요약

{s.summary}

+
절 요약
{s.summary}
{/if} - {#if body}
{@html body}
{/if} -
+ {#if body} +
+ 본문 보기 +
{@html body}
+
+ {/if} +
{/snippet} -
+
+
-
- 문서 - / +
+ 문서/ {doc?.title || '로딩...'}
{#if loading} {:else if error === 'not_found'} - - - + {:else if error === 'network'} - - - + {:else if doc} - -
-
-
-
- {#if doc.ai_domain} - - {domainLabel(doc.ai_domain)} - - {/if} - {#if doc.ai_sub_group}{doc.ai_sub_group}{/if} - {doc.file_format}{#if canShowMarkdown}→MD{/if} - {#if doc.ai_analysis_tier === 'deep'}tier DEEP{/if} - {#if doc.ai_confidence != null}신뢰도 {doc.ai_confidence.toFixed(2)}{/if} + +
+
+
{doc.file_format}
+
+
{doc.title}
+
+ {#if doc.ai_domain}{domainLabel(doc.ai_domain)}{/if} + {#if doc.ai_sub_group}{doc.ai_sub_group}{/if} + {#if doc.ai_analysis_tier === 'deep'}tier DEEP{/if} + {#if doc.ai_confidence != null}신뢰도 {doc.ai_confidence.toFixed(2)}{/if} + {#if canShowMarkdown}PDF→MD success{/if}
-

{doc.title}

-
- {#if doc.edit_url}{/if} - - - {#if doc.category === 'library'} - - {/if} +
+ {#if doc.edit_url}{/if} + + + {#if doc.category === 'library'}{/if} +
{#if useSectionView} - -