perf(stats): roll up lexical chart history

This commit is contained in:
2026-08-15 22:29:16 -07:00
parent 48fdac62a6
commit e53f6d61ff
21 changed files with 683 additions and 21 deletions
+10
View File
@@ -60,6 +60,14 @@ export interface StatsVocabularySummary {
knownWordCountWithoutNames: number | null;
}
export interface StatsVocabularyCharts {
ready: boolean;
topWords: Array<{ wordId: number; headword: string; frequency: number }>;
topWordsWithoutNames: Array<{ wordId: number; headword: string; frequency: number }>;
newWordsTimeline: Array<{ epochDay: number; wordCount: number }>;
newWordsTimelineWithoutNames: Array<{ epochDay: number; wordCount: number }>;
}
export interface StatsAnilistSearchResult {
id: number;
episodes: number | null;
@@ -175,6 +183,7 @@ export interface StatsJsonResponseMap {
sessionKnownWordsTimeline: StatsSessionKnownWordsTimelinePoint[];
vocabulary: VocabularyEntry[];
vocabularySummary: StatsVocabularySummary;
vocabularyCharts: StatsVocabularyCharts;
excludedWords: StatsExcludedWord[];
setExcludedWords: StatsOkResponse;
duplicateLineCleanup: StatsDuplicateLineCleanupResult;
@@ -234,6 +243,7 @@ export interface StatsHttpClient {
getSessionKnownWordsTimeline: (id: number) => Promise<StatsSessionKnownWordsTimelinePoint[]>;
getVocabulary: (limit?: number) => Promise<VocabularyEntry[]>;
getVocabularySummary: () => Promise<StatsVocabularySummary>;
getVocabularyCharts: () => Promise<StatsVocabularyCharts>;
getExcludedWords: () => Promise<StatsExcludedWord[]>;
setExcludedWords: (words: StatsExcludedWord[]) => Promise<void>;
cleanupDuplicateLines: (