question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle Client Updates Gracefully - (Offline Mode)

See original GitHub issue

At the minute the client application is *almost* a PWA with some offline abilites, thanks to out-of-the-box implementations that come with Gatsby.

We also have implementation that notifies users when the API goes offline. It even attempts to post progress updates to the API when back online. You are able to test this by loading up /learn and turning off your internet.

This feature is not quite polished.

We could implement and make use of some of the tools and modern web features available:

  1. Bring back the SW integration which we removed in the past, to fetch new client build and ask user to reload the page.
  2. Talk to the API with a SW instead of using the main thread.
  3. Cache next challenges proactively (Gatsby does this for us automatically, but we could help it help us).
  4. Enable ability to install /learn as an app. This is already enabled on the forum via PWA.
  5. Drop the hosted sign-in and use async UX with Auth0.
  6. The client-side error handling is bit of a mess.
  7. … other things I will add here with pointers to code.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
Twaha-Rahmancommented, Sep 20, 2020

Oooh… this is really interesting and I’d love to give a hand! I have prior experience with writing SW from scratch. I might need some help here and there but I’d like to give it a go.

1reaction
raisedadeadcommented, Sep 21, 2020

Hi folks, just getting caught up on my notifications.

I should have mentioned that there are several diligent validations need to be done before we jump to any implementation. There are a few reasons that we had chosen to left it midway.

One of them being issues with the gatsby-offline-plugin being notorious for some reason I do not remember of the top of my head.

Feel free to experiment, but it would be a while before we are able to put all the analysis in this thread and a plan for the implementation. For now this is marked on the roadmap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

More elegantly handle internet disconnection (offline mode?) · Issue ...
This message completely overrides gameplay– the game cannot continue until the internet connection is restored and the page is completely refreshed. It'd be ......
Read more >
Take a peer offline - Splunk Documentation
The splunk offline command handles both types of peer shutdown: temporary and permanent. It takes the peer down gracefully, attempting to ...
Read more >
A Design Guide for Building Offline First Apps - Hasura
Applications need to gracefully handle this scenario. Summary. Offline first is not new. There are several different frameworks & libraries to ...
Read more >
Strategies for handling partial failure | Microsoft Learn
Get to know several strategies for handling partial failures gracefully.
Read more >
AWS AppSync offline reference architecture – powered by the ...
On the client device, the Amplify DataStore provides a familiar ... AppSync resolves the conflict gracefully by allowing both updates to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found