diff --git a/frontend/src/routes/news/+page.svelte b/frontend/src/routes/news/+page.svelte index 1dfcc10..fed06d4 100644 --- a/frontend/src/routes/news/+page.svelte +++ b/frontend/src/routes/news/+page.svelte @@ -1,101 +1,59 @@ -
-
-
-

야간 뉴스 브리핑

- {#if availableDates.length > 0} -
- - + + {#each availableDates as d} + + {/each} + + {:else if briefing} + {briefing.briefing_date} + {/if} + {#if briefing} + {briefing.total_topics}토픽{#if highlightedCount > 0} · 별표 {highlightedCount}{/if} + 새벽 수집 + {/if} +
+
+ + {#if briefing?.headline_oneliner} +
+ 오늘의 한 줄 + {briefing.headline_oneliner} +
+ {/if} + + {#if briefing} +
+
+ {briefing.total_articles} + 총 기사 +
+
+ {briefing.total_countries} + 개국 +
+
+ {briefing.total_topics} + 토픽 +
+
+ {/if} + + {#if briefing && (briefing.status === 'partial' || briefing.status === 'failed')} +
+ + {#if briefing.status === 'failed'} + LLM 분석 실패율이 높습니다 ({briefing.llm_failures}/{briefing.llm_calls}, {fallbackPct}%). 일부 토픽이 원문 묶음으로 표시됩니다. + {:else} + 일부 토픽 LLM 실패 ({briefing.llm_failures}/{briefing.llm_calls}). 다른 토픽은 정상 분석되었습니다. + {/if} +
+ {/if} +
+ + + {#if loading} +
불러오는 중…
+ {:else if errorMsg} +
{errorMsg}
+ {:else if briefing} + {#if briefing.status === 'empty'} +
+

오늘 새벽({briefing.briefing_date}) 다국 비교 가능한 토픽이 없습니다.

+

(수집 뉴스 0건 또는 2개국 이상 다룬 주제 없음)

+
+ {:else} + + {#if leadTopic} + {@render topicCard(leadTopic, true)} + {/if} + + {#if restTopics.length > 0} +
+ {#each restTopics as topic (topic.id)} + {@render topicCard(topic, false)} {/each} - +
+ {/if} + {/if} + {/if} +
+ + +{#snippet topicCard(topic, isLead)} +
+ +
+
{folio(topic.topic_rank)}
+
+
+ {topic.topic_label}{#if topic.llm_fallback_used}(원문 묶음){/if} +
+
{topic.headline}
+
+ {topic.country_count}개국{topic.article_count}건 +
+
+
+ + +
+
+ + +
+ {#if topic.country_perspectives.length > 0} +
국가별 관점
+
+ {#each topic.country_perspectives as cp} +
+
+ {countryLabel(cp.country)} + {#if cp.article_ids.length > 0} + + {#each cp.article_ids as id} + #{id} + {/each} + + {/if} +
+
{cp.summary}
+
+ {/each} +
+ {/if} + + {#if topic.divergences.length > 0 || topic.convergences.length > 0} +
+ {#if topic.divergences.length > 0} +
+ 차이 + {topic.divergences.join(' · ')} +
+ {/if} + {#if topic.convergences.length > 0} +
+ 공통 + {topic.convergences.join(' · ')} +
+ {/if} +
+ {/if} + + {#if topic.key_quotes.length > 0} +
+ {#each topic.key_quotes as q} +
+
{q.quote}
+
{countryLabel(q.country)} · {q.source}
+
+ {/each} +
+ {/if} + + {#if topic.historical_context} +
+ 지난 흐름{topic.historical_context}
{/if}
-

- {#if briefing} - {briefing.briefing_date} 새벽 수집 · 총 {briefing.total_articles}건 / {briefing.total_countries}개국 / {briefing.total_topics}개 토픽 - {:else} - 매일 KST 자정~05:00 누적 뉴스를 주제별로 다국 비교 분석합니다. - {/if} -

- +
+{/snippet} - {#if loading} - -

불러오는 중…

-
- {:else if errorMsg} - -

{errorMsg}

-
- {:else if briefing} - {#if briefing.status === 'empty'} - -

- 오늘 새벽({briefing.briefing_date}) 다국 비교 가능한 토픽이 없습니다. -

-

- (수집 뉴스 0건 또는 2개국 이상 다룬 주제 없음) -

-
- {:else} - {#if briefing.status === 'failed'} -
- ⚠ LLM 분석 실패율이 높습니다 ({briefing.llm_failures}/{briefing.llm_calls}, {fallbackPct}%). 일부 토픽이 원문 묶음으로 표시됩니다. -
- {:else if briefing.status === 'partial'} -
- 일부 토픽 LLM 실패 ({briefing.llm_failures}/{briefing.llm_calls}). 다른 토픽은 정상 분석되었습니다. -
- {/if} - - {#each briefing.topics as topic (topic.id)} -
- -
-
- #{topic.topic_rank} -
-

- {topic.topic_label} - {#if topic.llm_fallback_used} - (원문 묶음) - {/if} -

-

{topic.headline}

-

- {topic.country_count}개국 · {topic.article_count}건 -

-
-
- - -
-
- - {#if topic.country_perspectives.length > 0} -
- {#each topic.country_perspectives as cp} -
- {countryLabel(cp.country)} - · - {cp.summary} - {#if cp.article_ids.length > 0} - - {#each cp.article_ids as id, i} - {#if i > 0}·{/if}#{id} - {/each} - - {/if} -
- {/each} -
- {/if} - - {#if topic.divergences.length > 0} -
- 차이 - {topic.divergences.join(' · ')} -
- {/if} - - {#if topic.convergences.length > 0} -
- 공통 - {topic.convergences.join(' · ')} -
- {/if} - - {#if topic.key_quotes.length > 0} -
    - {#each topic.key_quotes as q} -
  • - {countryLabel(q.country)} · {q.source} - "{q.quote}" -
  • - {/each} -
- {/if} - - {#if topic.historical_context} -

- ↩ 지난 흐름 · {topic.historical_context} -

- {/if} -
-
-
- {/each} - {/if} - {/if} - +