diff --git a/browser-extension/src/entrypoints/posts/Posts/PostDetailPage.tsx b/browser-extension/src/entrypoints/posts/Posts/PostDetailPage.tsx
index c6371d7..3abe7e0 100644
--- a/browser-extension/src/entrypoints/posts/Posts/PostDetailPage.tsx
+++ b/browser-extension/src/entrypoints/posts/Posts/PostDetailPage.tsx
@@ -76,10 +76,15 @@ function PostDetailPage() {
Analyse des commentaires malveillants
-
+
Données collectées le{" "}
- {formatAnalysisDate(post.latestAnalysisDate)}
-
+ {formatAnalysisDate(post.firstAnalysisDate)}
+
+ {post.analysisCount > 1 && (
+
+ Mise à jour le {formatAnalysisDate(post.latestAnalysisDate)}
+
+ )}
Publication analysée
diff --git a/browser-extension/src/entrypoints/posts/Shared/PostSummary.stories.tsx b/browser-extension/src/entrypoints/posts/Shared/PostSummary.stories.tsx
index d005f49..7bc15a3 100644
--- a/browser-extension/src/entrypoints/posts/Shared/PostSummary.stories.tsx
+++ b/browser-extension/src/entrypoints/posts/Shared/PostSummary.stories.tsx
@@ -38,6 +38,8 @@ const inProgressPost: Post = {
comments: Array(100).fill(exampleComment),
latestAnalysisDate: "2026-03-22T00:00:00.000Z",
latestAnalysisStatus: "IN_PROGRESS",
+ firstAnalysisDate: "2026-03-22T00:00:00.000Z",
+ analysisCount: 1,
};
const completedPost: Post = {
diff --git a/browser-extension/src/shared/model/post/Post.ts b/browser-extension/src/shared/model/post/Post.ts
index 1cc359d..3283706 100644
--- a/browser-extension/src/shared/model/post/Post.ts
+++ b/browser-extension/src/shared/model/post/Post.ts
@@ -12,6 +12,15 @@ export type Post = PostSharedProperties & {
*/
comments: PostComment[];
+ /**
+ * Date of first PostSnapshot
+ */
+ firstAnalysisDate: string;
+
+ /**
+ * Number of PostSnapshot associated to this post
+ */
+ analysisCount: number;
/**
* Date of the latest snapshot on which this post is based.
*/
diff --git a/browser-extension/src/shared/model/post/buildPostFromSnapshots.ts b/browser-extension/src/shared/model/post/buildPostFromSnapshots.ts
index fc2f7d7..3bf9c5c 100644
--- a/browser-extension/src/shared/model/post/buildPostFromSnapshots.ts
+++ b/browser-extension/src/shared/model/post/buildPostFromSnapshots.ts
@@ -30,6 +30,8 @@ export function buildPostFromSnapshots(snapshots: PostSnapshot[]): Post {
textContent: latest.textContent,
title: latest.title,
comments: buildCommentsFromSnapshots(oldestFirst),
+ firstAnalysisDate: oldest.scrapedAt,
+ analysisCount: snapshots.length,
latestAnalysisDate: latest.scrapedAt,
latestAnalysisStatus: latest.classificationStatus,
};
diff --git a/browser-extension/src/shared/utils/__tests__/post-util.test.ts b/browser-extension/src/shared/utils/__tests__/post-util.test.ts
index 532ab56..f5b1c1b 100644
--- a/browser-extension/src/shared/utils/__tests__/post-util.test.ts
+++ b/browser-extension/src/shared/utils/__tests__/post-util.test.ts
@@ -16,18 +16,9 @@ import { Post, PostComment } from "@/shared/model/post/Post";
* @returns Array containing a single Post with dummy data
*/
function createDummyPostWithDate(publishedAt: PublicationDate): Post {
- return {
- postId: "dummy-post-1",
- socialNetwork: SocialNetwork.YouTube,
- url: "https://www.youtube.com/watch?v=dummy",
+ return createDummyPost({
publishedAt,
- author: {
- name: "Dummy Author",
- accountHref: "https://youtube.com/@dummyauthor",
- },
- latestAnalysisDate: new Date().toLocaleDateString(),
- comments: [],
- };
+ });
}
/**
@@ -48,6 +39,8 @@ function createDummyPost(overrides: Partial = {}): Post {
name: "Dummy Author",
accountHref: "https://youtube.com/@dummyauthor",
},
+ firstAnalysisDate: new Date().toLocaleDateString(),
+ analysisCount: 1,
latestAnalysisDate: new Date().toLocaleDateString(),
comments: [],
...overrides,