- Simplified loadPersistedVocabularyData() to use only VocabularyProgressManager - Updated calculateVocabularyProgress() to use unified data structure - Removed old system references from knowledge panel data loading - Fixed field names (drsDiscovered, drsMastered) for unified system - Knowledge panel now displays vocabulary progress correctly ✅ TESTED: Vocabulary Knowledge panel working with unified system 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
67 lines
2.0 KiB
JavaScript
67 lines
2.0 KiB
JavaScript
/**
|
|
* Application Status Diagnostic Tool
|
|
* Deep dive into app initialization issues
|
|
*/
|
|
|
|
window.testAppStatus = function() {
|
|
console.log('🔍 Deep Application Status Check...');
|
|
|
|
// 1. Check if window.app exists
|
|
console.log('1. window.app exists:', !!window.app);
|
|
if (!window.app) {
|
|
console.error('❌ window.app is not defined');
|
|
return false;
|
|
}
|
|
|
|
// 2. Check app properties
|
|
console.log('2. window.app properties:', Object.keys(window.app));
|
|
|
|
// 3. Check getStatus method
|
|
console.log('3. getStatus method exists:', typeof window.app.getStatus);
|
|
|
|
if (typeof window.app.getStatus !== 'function') {
|
|
console.error('❌ getStatus is not a function');
|
|
return false;
|
|
}
|
|
|
|
// 4. Try to call getStatus
|
|
try {
|
|
const status = window.app.getStatus();
|
|
console.log('4. Status object:', status);
|
|
|
|
if (!status) {
|
|
console.error('❌ getStatus returned null/undefined');
|
|
return false;
|
|
}
|
|
|
|
console.log('5. Status properties:', Object.keys(status));
|
|
console.log('6. Status.status value:', status.status);
|
|
|
|
// 7. Check if app thinks it's running
|
|
console.log('7. App _isRunning:', window.app._isRunning);
|
|
console.log('8. App _isInitialized:', window.app._isInitialized);
|
|
|
|
return status;
|
|
|
|
} catch (error) {
|
|
console.error('❌ Error calling getStatus:', error);
|
|
return false;
|
|
}
|
|
};
|
|
|
|
window.testAppRestart = async function() {
|
|
console.log('🔄 Attempting to restart application...');
|
|
|
|
try {
|
|
if (window.app && typeof window.app.start === 'function') {
|
|
await window.app.start();
|
|
console.log('✅ App start() called');
|
|
} else {
|
|
console.error('❌ App start method not available');
|
|
}
|
|
} catch (error) {
|
|
console.error('❌ Error restarting app:', error);
|
|
}
|
|
};
|
|
|
|
console.log('🔍 App status diagnostic loaded. Run: testAppStatus() or testAppRestart()'); |