fix(srs): keep directional review cards visible

This commit is contained in:
Torsten Schulz (local)
2026-08-31 11:52:04 +02:00
parent 2515354386
commit 7ad83f4299

View File

@@ -123,10 +123,13 @@ export default class VocabService {
return crypto.createHash('sha1').update(raw).digest('hex');
}
_buildSrsPairFingerprint({ courseId, learning, reference, direction = 'BOTH' }) {
_buildSrsPairFingerprint({ courseId, learning, reference }) {
// The repetition plan is course-wide and trains both directions. Older
// rows were created with L2R/R2L while newly extracted course vocabulary
// uses BOTH. Direction must therefore not split one vocabulary pair into
// separate identities or make a valid old card disappear from the plan.
return [
Number(courseId) || 0,
String(direction || 'BOTH').toUpperCase(),
this._normalizeSrsText(learning),
this._normalizeSrsText(reference)
].join('|');