From 4200926d7b922de9b764dcf1725f832d90c8b1a0 Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Mon, 9 Feb 2026 13:03:23 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20finalize=20UI/UX=20for=20AI=20Summary?= =?UTF-8?q?=20(rename=20to=20R=C3=A9sum=C3=A9),=20fix=20generation=20butto?= =?UTF-8?q?n,=20and=20mark=20cleanup=20task=20done?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/ArticleCard.tsx | 2 +- web/src/components/ReaderView.tsx | 28 ++++++++++++++++++++-------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/web/src/components/ArticleCard.tsx b/web/src/components/ArticleCard.tsx index cf96d18..bae063e 100644 --- a/web/src/components/ArticleCard.tsx +++ b/web/src/components/ArticleCard.tsx @@ -152,7 +152,7 @@ export function ArticleCard({ article, onClick, onToggleRead, onToggleFavorite } {article.ai_summary ? (
- ✨ Smart Digest prêt + ✨ Résumé
) : article.summary && ( diff --git a/web/src/components/ReaderView.tsx b/web/src/components/ReaderView.tsx index 5970cc9..0c5b8a8 100644 --- a/web/src/components/ReaderView.tsx +++ b/web/src/components/ReaderView.tsx @@ -1,3 +1,4 @@ +import { useState } from 'react'; import { type Article, articlesApi } from '../api/articles'; interface ReaderViewProps { @@ -7,6 +8,9 @@ interface ReaderViewProps { } export function ReaderView({ article, onClose, onToggleFavorite }: ReaderViewProps) { + const [aiSummary, setAiSummary] = useState(article.ai_summary); + const [isSummarizing, setIsSummarizing] = useState(false); + // Determine content to show: full content > summary > default message let displayContent = article.content || article.summary || '

Aucun contenu disponible pour cet article.

'; @@ -64,13 +68,13 @@ export function ReaderView({ article, onClose, onToggleFavorite }: ReaderViewPro {/* Smart Digest Section */} - {article.ai_summary ? ( + {aiSummary ? (

- ✨ Smart Digest + ✨ Résumé

- {article.ai_summary} + {aiSummary}

) : ( @@ -78,17 +82,25 @@ export function ReaderView({ article, onClose, onToggleFavorite }: ReaderViewPro )}