Users get confused when content does not appear on the site
We used to attempt P2P discovery, but to do that with the new API we need an environment variable so the web middle-end knows to do that.
We can also explain the situation to the user and prompt them to open in the app.
The problem is even worse for accounts and groups because the app does not push them to the gateway. They should also have working DHT discovery as a fallback.
Even when the DHT search is enabled, it is slow and unreliable. The most obvious problem is that once a peer is found, it will sync all content rather than just the relevant content.
First, support the "push to gateway" workflow for groups and accounts
When an entity is not found on the gateway, the web middle-end should run discoverEntity
.
Next, the "not found" page should should show a spinner and explain to the user that we are searching for the document and they should make sure somebody is online to provide it. If the document is found, we should load it immediately.
Then, the "not found" page should offer a button to open the entity in the app, so the user can continue the search from there.
Additionally it would be great if the gateway would only sync the relevant content from the peer, to enable a faster resolution of the requested content. This gets tricky with other entities that the document may depend on.
With the new URL parameters we have additional complexity, and we should try loading the correct group variant when possible by resolving the group entity and searching for the correct document version.
Backend support is also required to fix discoverEntity
because it tends to fail in some cases, for example after searching for a version that cannot be found.