feat: network monitoring
fix: #204
Roadmap:
- [X] active account recovery (notifications, announcements, instance info, emojis)
- [X] websocket reconnections
- [x] timeline refreshes
- [x] check if you can access saved accounts at all (maybe don't even try until we are online?)
- [x] finish offline window
- [x] fix offline window closing => quitting (maybe an actual button?)
- [x] avi recovery (maybe only for own accounts as timelines get refreshed?)
- [x] recover any offline saved accounts
- [ ] tests tests and more tests
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.
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
Yeah no, network monitor is very inconsistent, we'll have to minimize the impact
New issue: if the app starts offline, libsoup/glib/tls cannot recover and will "Temporary failure in name resolution" no matter what
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)
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!
-
Flatpak
- Download the PR artifact for your architecture, either from the GitHub CI or nightly.link
- Unzip it
- Run
flatpak install --user /path/to/dev.geopjr.Tuba.Devel.flatpak(you can remove--userif all your runtimes are installed system wide to avoid excess downloads) - Test it
- When you are done, remove it by running
flatpak remove tubaand selecting the one you installed (usually the one that ends with/master)
-
GNOME Builder
If you don't want to use the CI-built flatpaks, you can instead build it using GNOME Builder.
git clone https://github.com/GeopJr/Tuba -b feat/network/monitoring --depth=1- Open GNOME Builder and select the new folder
- Click the play button at the headerbar (might require installing runtimes and will be greyed out until it's done)
-
From source (advanced)
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 @[email protected]