feat: füge Debug-Ausgaben zur Überwachung der Dialogöffnung und Pool-Aktualisierung hinzu
All checks were successful
Deploy to production / deploy (push) Successful in 2m5s

This commit is contained in:
Torsten Schulz (local)
2026-06-04 17:07:38 +02:00
parent f0aa097b56
commit cb7ea317a3

View File

@@ -543,6 +543,10 @@ export default {
this.autoAdvanceTimer = null;
}
this.openParams = { languageId, chapterId, lessonId, courseId };
// Debug: show how the dialog was opened (helps detect callers not setting srsMode)
try {
console.debug('[VocabPracticeDialog] open called with', { languageId, chapterId, lessonId, courseId, srsMode, hasInitialPool: Array.isArray(initialPool) });
} catch (_) {}
this.onClose = typeof onClose === 'function' ? onClose : null;
this.srsMode = Boolean(srsMode);
this.initialPool = Array.isArray(initialPool) ? initialPool : null;
@@ -768,6 +772,11 @@ export default {
let res = null;
let courseDueRes = null;
// Debug: indicate reload start and current openParams
try {
console.debug('[VocabPracticeDialog] reloadPool start', { openParams: this.openParams, srsMode: this.srsMode });
} catch (_) {}
// Wenn courseId vorhanden, frage kursweite fällige Items an (Server liefert totalDueCount).
// Wir fragen das an, auch wenn gerade eine lessonId gesetzt ist, und nutzen es als Fallback
// falls kein lesson-spezifischer Pool gefunden wird. (Ermöglicht Fallback von Lesson->Course SRS.)
@@ -843,6 +852,10 @@ export default {
this.pool = [];
} finally {
this.loading = false;
// Debug: report resolved pool and server due count
try {
console.debug('[VocabPracticeDialog] reloadPool finished', { poolLength: Array.isArray(this.pool) ? this.pool.length : 0, srsServerTotalDue: this.srsServerTotalDue, srsMode: this.srsMode });
} catch (_) {}
if (this.srsMode) {
this.initSrsSessionFromPool();
}