debug: add detailed logging for browser notifications

- Log notification permission status
- Log critical event detection
- Log notification creation attempts
- Log notification failures with error details
- Help troubleshoot why notifications aren't showing
This commit is contained in:
spinline
2026-02-05 22:39:00 +03:00
parent 3efe60a0f0
commit 1361b5a228
2 changed files with 28 additions and 5 deletions

View File

@@ -213,6 +213,8 @@ pub fn provide_torrent_store() {
global_stats.set(stats);
}
AppEvent::Notification(n) => {
log::info!("📬 Received notification: {} - {}", n.level == shared::NotificationLevel::Success, n.message);
// Show toast notification
show_toast_with_signal(notifications, n.level.clone(), n.message.clone());
@@ -225,6 +227,7 @@ pub fn provide_torrent_store() {
|| n.level == shared::NotificationLevel::Error;
if is_critical {
log::info!("🔴 Critical notification detected: {}", n.message);
let title = match n.level {
shared::NotificationLevel::Success => "✅ VibeTorrent",
shared::NotificationLevel::Error => "❌ VibeTorrent",