finamp icon indicating copy to clipboard operation
finamp copied to clipboard

Improve Notification System

Open Chaphasilor opened this issue 7 months ago • 5 comments

Right now all notifications, confirmations, errors, and prompts are shown via a snackbar.
Only a single snackbar can be shown at once, and snackbars will be queued indefinitely.
When multiple errors occur, all error need to be dismissed individually since it's not possible to clear all queued snackbars.

To improve this, I propose a change to the notification system:

  • There should be a notification screen (or bottom sheet?), similar to the logs screen. Past notifications should be shown there, a timestamp and details should be visible.
  • Notifications should be dismissible, so once the user has taken note of them, they can be cleared. We could possibly has two options, marking them as read and dismissing them. Dismissing a snackbar would mark a notification as read, dismissing a list tile on the notification screen would dismiss the notification completely.
  • Notifications should be using a separate "Logger" (or something similar), so that we can properly trace (and censor) them in the app logs
  • For ongoing processes like downloads, showing actual system notifications might be desirable. Finamp should support this, but showing notifications this way should be optional. Task/progress notifications should have a separate section on the notifications screen as an alternative.
  • On the home screen, next to the Playback History button, there should be a notification button that will open the notification screen. That button should also have an indicator for unread notifications and/or running tasks.
  • Snackbars can still be used, especially for quick confirmations (e.g. adding a track to Next Up)

That's all I can think of right now, if you have more/other ideas I'd love to hear them!

Chaphasilor avatar May 04 '25 11:05 Chaphasilor

Maybe notification groups/origin-groups can be useful? Im imagining than when a Snackbar message is created you give it a group/origin like "downloads" or "auto offline" which then can be dismissed/shown all at once?

Also I noticed that when a bunch of errors happen at once, all the haptics also happen at once while the actual notifications are hanging behind

System notification would be really useful for auto offline and auto network switching too

flloschy avatar May 04 '25 11:05 flloschy

Grouping could be nice, but I'd only group successive notifications from the same group. Otherwise we lose the temporal order. So if we get 5 errors right after one another we can group them, but if we get 1 download notification, 1 auto offline one, and then another download notification, we keep them in that order and don't group anything.
But grouping would definitely solve the "dismissing multiple errors at once" problem.

I'm not sure how groups could be handled by the snackbar yet.

The haptics are a good point. That shouldn't happen. We probably simply need to move the Feedback call to another method in gloabl_snackbar.dart...

Chaphasilor avatar May 04 '25 12:05 Chaphasilor

I am kind of annoyed by consecutive notifications, when the connection obviously is not there. It just sends the same notification all over again for every api call that fails, while one single notification like "It seems you have no connection to the server." would be enough in my opinion. But I'm also a guy that has to swipe away everything because I want everything clean, so maybe this is a very personal thing that annoys me but nobody else 😅

lukaslindnermusic avatar May 04 '25 17:05 lukaslindnermusic

I mean that would work with notification groups. Maybe those could have modes? Detailed: Every notification gets shown no matter what Compact: Only merge a streak of notifications (like Chaphasilor said) Minimal: Merge everything based on Info/Error except Confirmations None: Well, none

Or something like this, with default being Compact? Though maybe thats a bit too much configuration for something simple as notifications

flloschy avatar May 04 '25 21:05 flloschy

You're definitely not the only one annoyed by this Lukas!
But catching connection errors in the way you're proposing isn't trivial I fear, at least with the current snackbar system.

For the grouping, what would we group by? Some kind of level, like with logs, i.e. error, warning, info, confirmation? Or by where the notification is coming from, i.e. playback, downloads, API?
Or even both?

Chaphasilor avatar May 04 '25 22:05 Chaphasilor

I can't comment on solution, but the indefinite errors is quite annoying to me as well. My workaround has just been force quitting and reopening Finamp to clear them and then never enabling online mode as then I am less likely to get a bright white persistent error notification in otherwise dark mode.

ryanwwest avatar Aug 06 '25 13:08 ryanwwest