feat: add metadata statistics to dashboard
Add a new metadata row to the dashboard with three cards: - Series metadata coverage (linked vs unlinked donut) - Provider breakdown (donut by provider) - Book metadata quality (summary and ISBN fill rates) Includes API changes (stats.rs), frontend types, and FR/EN translations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -494,6 +494,20 @@ export type MonthlyAdditions = {
|
||||
books_added: number;
|
||||
};
|
||||
|
||||
export type ProviderCount = {
|
||||
provider: string;
|
||||
count: number;
|
||||
};
|
||||
|
||||
export type MetadataStats = {
|
||||
total_series: number;
|
||||
series_linked: number;
|
||||
series_unlinked: number;
|
||||
books_with_summary: number;
|
||||
books_with_isbn: number;
|
||||
by_provider: ProviderCount[];
|
||||
};
|
||||
|
||||
export type StatsResponse = {
|
||||
overview: StatsOverview;
|
||||
reading_status: ReadingStatusStats;
|
||||
@@ -502,6 +516,7 @@ export type StatsResponse = {
|
||||
by_library: LibraryStatsItem[];
|
||||
top_series: TopSeriesItem[];
|
||||
additions_over_time: MonthlyAdditions[];
|
||||
metadata: MetadataStats;
|
||||
};
|
||||
|
||||
export async function fetchStats() {
|
||||
|
||||
@@ -75,6 +75,13 @@ const en: Record<TranslationKey, string> = {
|
||||
"dashboard.noSeries": "No series yet",
|
||||
"dashboard.unknown": "Unknown",
|
||||
"dashboard.readCount": "{{read}}/{{total}} read",
|
||||
"dashboard.metadataCoverage": "Metadata coverage",
|
||||
"dashboard.seriesLinked": "Linked series",
|
||||
"dashboard.seriesUnlinked": "Unlinked series",
|
||||
"dashboard.byProvider": "By provider",
|
||||
"dashboard.bookMetadata": "Book metadata",
|
||||
"dashboard.withSummary": "With summary",
|
||||
"dashboard.withIsbn": "With ISBN",
|
||||
|
||||
// Books page
|
||||
"books.title": "Books",
|
||||
|
||||
@@ -73,6 +73,13 @@ const fr = {
|
||||
"dashboard.noSeries": "Aucune série pour le moment",
|
||||
"dashboard.unknown": "Inconnu",
|
||||
"dashboard.readCount": "{{read}}/{{total}} lu",
|
||||
"dashboard.metadataCoverage": "Couverture métadonnées",
|
||||
"dashboard.seriesLinked": "Séries liées",
|
||||
"dashboard.seriesUnlinked": "Séries non liées",
|
||||
"dashboard.byProvider": "Par fournisseur",
|
||||
"dashboard.bookMetadata": "Métadonnées livres",
|
||||
"dashboard.withSummary": "Avec résumé",
|
||||
"dashboard.withIsbn": "Avec ISBN",
|
||||
|
||||
// Books page
|
||||
"books.title": "Livres",
|
||||
|
||||
Reference in New Issue
Block a user