mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-04 00:41:33 -07:00
Fix PR #60 CI failures and address CodeRabbit feedback
- Restore raw tokensSeen for session summaries; keep filtered counts for aggregates/known-words - Fix missing headword binding in insertFilteredWordOccurrence test fixture - Page vocabulary stats until enough visible rows collected after post-query filtering - Use lifetime totals for library/detail word counts instead of partial retained-session sums - Prefer stored rollup totals over recomputed session counts when recomputation is partial - Emit flat known-word timeline points for line indexes with no occurrences - Roll back local excluded-word state and throw on failed persistence - Reset initialized flag on load failure to allow retry on next call - Restore globalThis.localStorage after each excluded-words test
This commit is contained in:
@@ -452,7 +452,7 @@ export function createStatsApp(
|
||||
}
|
||||
}
|
||||
|
||||
const sortedLineIndices = [...totalLineGroups.keys()].sort((a, b) => a - b);
|
||||
const maxLineIndex = Math.max(...totalLineGroups.keys(), ...knownLineGroups.keys(), -1);
|
||||
let knownWordsSeen = 0;
|
||||
let totalWordsSeen = 0;
|
||||
const knownByLinesSeen: Array<{
|
||||
@@ -461,9 +461,9 @@ export function createStatsApp(
|
||||
totalWordsSeen: number;
|
||||
}> = [];
|
||||
|
||||
for (const lineIdx of sortedLineIndices) {
|
||||
for (let lineIdx = 0; lineIdx <= maxLineIndex; lineIdx += 1) {
|
||||
knownWordsSeen += knownLineGroups.get(lineIdx) ?? 0;
|
||||
totalWordsSeen += totalLineGroups.get(lineIdx)!;
|
||||
totalWordsSeen += totalLineGroups.get(lineIdx) ?? 0;
|
||||
knownByLinesSeen.push({
|
||||
linesSeen: lineIdx,
|
||||
knownWordsSeen,
|
||||
|
||||
Reference in New Issue
Block a user