GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
506 stars 55 forks source link

feat: network monitoring #928

Closed GeopJr closed 2 months ago

GeopJr commented 2 months ago

fix: #204

Roadmap:

When the network changes from offline to online, it triggers a websocket and timeline refresh. That means we can skip recovering attachments and manually re-doing connections since they are getting refreshed.

GeopJr commented 2 months ago

I think this insight is important https://github.com/GeopJr/Tuba/issues/204#issuecomment-1589488697

Maybe a runtime cli option to avoid checking altogether? (as mentioned on the linked)

Tuba is a social media app - it doesn't work offline - and if a setup causes NM to report wrong results, it should be fixed somewhere else tbh

GeopJr commented 2 months ago

Yeah no, network monitor is very inconsistent, we'll have to minimize the impact

GeopJr commented 2 months ago

New issue: if the app starts offline, libsoup/glib/tls cannot recover and will "Temporary failure in name resolution" no matter what

GeopJr commented 2 months ago

Added a gsettings option for disabling network monitoring

Not in preferences. If it needs to be in the GUI, then we need better naming because 'network monitoring' sounds malicious (see tracker-miner-fs)

GeopJr commented 2 months ago

Call for testing:

Do you use a VPN or a proxy? Is your internet connection very unstable? Do you have an unusual setup? Do you use something else than NetworkManager?

This PR could use your help!

  1. Download the PR artifact for your architecture, either from the GitHub CI or nightly.link
  2. Unzip it
  3. Run flatpak install --user /path/to/dev.geopjr.Tuba.Devel.flatpak (you can remove --user if all your runtimes are installed system wide to avoid excess downloads)
  4. Test it
  5. When you are done, remove it by running flatpak remove tuba and selecting the one you installed (usually the one that ends with /master)

If you don't want to use the CI-built flatpaks, you can instead build it using GNOME Builder.

  1. git clone https://github.com/GeopJr/Tuba -b feat/network/monitoring --depth=1
  2. Open GNOME Builder and select the new folder
  3. Click the play button at the headerbar (might require installing runtimes and will be greyed out until it's done)

NetworkMonitor handles the flatpak differently than source, if you are comfortable with building Tuba, testing it outside of the sandbox would be useful. You can find build instructions in the README, but make sure you've switched to this branch.

What to look for

If you experience disconnects, does Tuba recover gracefully after reconnecting? E.g. will you still be able to receive notifications and new posts?

If your setup is unusual, does Tuba correctly notice that you have or don't have internet connection?

Anything that should change in your opinion?

You can reply here with your results, on matrix or tag @Tuba@floss.social