feat(stats): add alass sidecar retiming for sentence mining and fix timi

- Retime local English sidecars against the Japanese sidecar via alass before populating sentence card translation fields; cache retimed copies for the process lifetime
- Reject reversed or non-positive subtitle timings in immersion tracker and before media generation
- Fix word card mining so sentence audio goes to SentenceAudio (not ExpressionAudio) and English subtitle text is not written to SelectionText
- Consolidate 10 individual change fragments into stats-updates.md
This commit is contained in:
2026-06-06 14:26:02 -07:00
parent 01c2d9eb1d
commit 99401e5a70
31 changed files with 985 additions and 123 deletions
+2 -5
View File
@@ -1,5 +1,6 @@
import type { ReactNode } from 'react';
import type { SentenceSearchResult } from '../types/stats';
import { getStatsMineCardUnavailableReason } from './mining';
export interface SentenceMatchRange {
start: number;
@@ -41,11 +42,7 @@ export function getSentenceSearchMineAvailability(
query: string,
): SentenceSearchMineAvailability {
const exactMatch = findExactSentenceMatches(result.text, query).length > 0;
const unavailableReason = !result.sourcePath
? 'This source has no local file path.'
: result.segmentStartMs == null || result.segmentEndMs == null
? 'This line is missing segment timing.'
: null;
const unavailableReason = getStatsMineCardUnavailableReason(result);
return {
canMineSentence: unavailableReason === null,