fix(journals): harden privacy toggle and add effect diagnostics

- Ensured content is decrypted before allowing conversion to plain text.
- Added detailed diagnostic logging to reactive effects to debug loop issues.
- Integrated background sync skip logic to preserve decrypted state.
This commit is contained in:
Scott Idem
2026-01-14 16:10:30 -05:00
parent 693a2e42c4
commit 574403244b
3 changed files with 34 additions and 9 deletions

View File

@@ -81,7 +81,7 @@ export async function decrypt_journal_entry(
}
}
console.log(`decrypt_journal_entry: SUCCESS. Content length: ${decrypted_text.length}. Preview: ${decrypted_text.substring(0, 20)}...`);
console.log(`decrypt_journal_entry: SUCCESS. Source: ${key_source}, Content length: ${decrypted_text.length}. Preview: ${decrypted_text.substring(0, 30).replace(/\n/g, ' ')}...`);
return {
success: true,
content: decrypted_text,