SrainApp / srain

Modern IRC client written in GTK
https://srain.silverrainz.me/
Other
302 stars 34 forks source link

Be smarter with Failed to connect notifications #376

Open djasa opened 2 years ago

djasa commented 2 years ago

srain produces notification per every Failed to connect to NETWORK event. I see two instances of it:

  1. obvious one: system has notion of its overall connectivity (linux with NM). On such a system, failure to connect is expected and thus shouldn't disturb users from whatever they're doing after first such notification. Conversely, notification-worthy event is actually when srain connects successfully while system continues to be in offline or limited-connection state
  2. less obvious: servers only accessible from some networks. For such a scenario, notification is suitable - but just one and persistent with follow-up suitable only when there are changes to system network connections.

Version

$ flatpak info im.srain.Srain

Srain - Modern IRC client written in GTK

          ID: im.srain.Srain
         Ref: app/im.srain.Srain/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 1.4.0
     License: GPL-3.0
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 915,5 kB
     Runtime: org.gnome.Platform/x86_64/42
         Sdk: org.gnome.Sdk/x86_64/42

      Commit: 2055941c2b9d402c1c383973df7afe8f511fd439484420746024afe9e5539f0d
      Parent: 7db333a933b6921fe1a5ebf850fc1e195f2378e9ee0e878b3a6134f2e12a3c2a
     Subject: Update to 1.4.1 (653ddbd7)
        Date: 2022-08-19 16:23:22 +0000
SilverRainZ commented 2 years ago

How about this policy:

djasa commented 2 years ago

Hi Shengyu,

This unfortunately wouldn't work for me. I use (bounced) IRC at work and I often connect from outside via VPN, while sometimes it's perfectly OK for me to work for a while offline (avoiding metered data use and distractions), sometimes I try hotspots (again to save my metered data) that don't offer full connection until I go through the captive portal.

If my reboot (usually once per week or two) is at work, srain would be annoying exactly as today with the proposed policy because it would connect without issues first, but then would come first suspend followed by resume at different location with a different connectivity.

NM has notion of all of these (including metered data, if you want to be extra nifty, skip url preloading when on such a connection…), hopefully exposed at some standardized org.freedesktop.something interface.

Dne čt 1. 9. 2022 8:14 uživatel Shengyu Zhang @.***> napsal:

How about this policy:

  • If the connection has been established once, produce a notification for every failure
  • If not, only produce a notification for the first failure (but keep reconnecting)

— Reply to this email directly, view it on GitHub https://github.com/SrainApp/srain/issues/376#issuecomment-1233791615, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKXO4W2ANMKECOF6OR4T5TV4BCT5ANCNFSM6AAAAAAQBPVV7M . You are receiving this because you authored the thread.Message ID: @.***>

SilverRainZ commented 2 years ago

Okay, I get it. How about notifying for once, until it is successfully connected again?

Srain is not in active development, but I think we can improve this in the next minor release.

djasa commented 2 years ago

Okay, I get it. How about notifying for once, until it is successfully connected again?

Yeah, that would be great from my POV.

Srain is not in active development, but I think we can improve this in the next minor release.

Got it. I tried using srain over last week as my primary IRC client and these new issues are the result. :) Without fixing this one, I couldn't use it long-term. Overall, I like it more than not as it gets most of basic stuff right.

SilverRainZ commented 1 year ago

386 does not good, I will introduce a better notification policy.