Safe Browser w/ sync. Pre-release for testing v0.4.0-3
I’ve pushed the latest version of the SAFE Browser that will sync to the network if/when authorised.
All beaker sql endpoints have been converted, so:
- history
- favourites (bookmarks)
- sitedata
- settings
are now stored on the network
Using these features.
Right now, the best way (due to beakers lack of shortcuts) for adding favourites, sitedata etc is via the console:
window.beakerBookmarks.add('<siteurl>','<sitetitle>')
beakerSitedata.set('<url>','<key>','<token>')
beakerSitedata.get('<url>','<key>')
The sitedata methods are analogous to standard browser localStorage, but on the network itself (localStorage itself will save to the computer)
History should update by itself, as you would expect.
Caveats
This version is not ready for general use. There will likely be a variety of bugs with syncing, so please only dive in here if you’re ready to help debug such things
Aside from a refactor, just testing various use cases and looking for network errors is the most important thing here. So keep an eye on your Launcher logs. If you are having problems, it’s probably best to download and build from source to get a clearer look at errors. (both syncing, and triggering auth etc).
Known Issues
Rapidly adding / changing data results in mutation errors
on the network. I’m investigating the best ways to handle these.
The redux store and async save flow is reasonably stable now in bookmarks. I need to refactor site-data etc to work in the new fashion.
The safe-status page doesn’t currently update, you’ll have to refresh to see the current status.
Refactoring
Right now the code has a couple of different flows for data storage, bookmarks being the latest and most robust in terms of the app and network. I’m planning to refactor everything to a common pattern, like this.
There’s also the ‘safe-status’ page, which currently, you have to refresh to see updates. This can be easily refactored for a release, but for dev there’s limitations on debugging right now with this in place.
Todos for BrowserSync:
- Update SAFE Status and browser pages upon data change.
- Implement error reporting and retry save/auth network errors
- Refactor reducers and stores.