[GH-ISSUE #298] Improve offline handling #259

Closed
opened 2026-02-25 21:34:35 +03:00 by kerem · 2 comments
Owner

Originally created by @jasonmunro on GitHub (Oct 30, 2018).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/298

Originally assigned to: @jasonmunro on GitHub.

Cypht is very much a standard HTML5 app - It has some SPA like qualities, but is not intended to work offline. With that said, there are a few places we could improve the user experience when we can't reach the server.

  1. background updates are not queued or stopped when offline, they just keep firing and failing.
  2. Losing a composed E-mail on send (or before send) because of a network interruption is painful. We auto-save to the sever periodically, however if you are logged out because of network issues the saved draft is lost.
  3. Aside from "unable to connect to server" messages, we don't indicate to the user that they have gone offline.

Cypht simply won't work offline, it was not designed to. But I think we can make things less painful with some tweaks to the above points.

Originally created by @jasonmunro on GitHub (Oct 30, 2018). Original GitHub issue: https://github.com/cypht-org/cypht/issues/298 Originally assigned to: @jasonmunro on GitHub. Cypht is very much a standard HTML5 app - It has some SPA like qualities, but is not intended to work offline. With that said, there are a few places we could improve the user experience when we can't reach the server. 1. background updates are not queued or stopped when offline, they just keep firing and failing. 2. Losing a composed E-mail on send (or before send) because of a network interruption is painful. We auto-save to the sever periodically, however if you are logged out because of network issues the saved draft is lost. 3. Aside from "unable to connect to server" messages, we don't indicate to the user that they have gone offline. Cypht simply won't work offline, it was not designed to. But I think we can make things less painful with some tweaks to the above points.
kerem 2026-02-25 21:34:35 +03:00
Author
Owner

@jasonmunro commented on GitHub (Nov 7, 2018):

We have 2 new updates for this in the master branch.

  • Under certain failure conditions for background updates (or any ajax call really) - we used to redirect to the home page in the browser. Honestly I don't know why we were doing this. If you were in the middle of composing an E-mail and this happened - you got an "offline" page from your browser. And if your IP changes, you get logged out on reconnect and lost your message. Not good! This redirect has been removed.

  • We used to show a "error communicating with server" message when knocked offline. Now we show a bright red "offline" block in the upper right that is clickable. Clicking it will send a no-op ajax request to check connectivity. If it works the offline block goes away, or if a scheduled background ajax call works it goes away on it's own. While this is not significantly different behavior - it is a better UI experience because it will become obvious that you are offline so you can copy/paste a composed but not sent message, or you can at least know NOT to click "send' as it will fail.

<!-- gh-comment-id:436783265 --> @jasonmunro commented on GitHub (Nov 7, 2018): We have 2 new updates for this in the master branch. - Under certain failure conditions for background updates (or any ajax call really) - we used to redirect to the home page in the browser. Honestly I don't know why we were doing this. If you were in the middle of composing an E-mail and this happened - you got an "offline" page from your browser. And if your IP changes, you get logged out on reconnect and lost your message. Not good! This redirect has been removed. - We used to show a "error communicating with server" message when knocked offline. Now we show a bright red "offline" block in the upper right that is clickable. Clicking it will send a no-op ajax request to check connectivity. If it works the offline block goes away, or if a scheduled background ajax call works it goes away on it's own. While this is not significantly different behavior - it is a better UI experience because it will become obvious that you are offline so you can copy/paste a composed but not sent message, or you can at least know NOT to click "send' as it will fail.
Author
Owner

@jasonmunro commented on GitHub (Nov 15, 2018):

One more addition to this that I forgot to tag this issue with: github.com/jasonmunro/cypht@929e79b777

Check ajax response status codes so we can better identify "offline" vs "server error". I'm going to close this issue now as the combined effect of the above changes are I think the best we can do for a better offline experience at this time.

<!-- gh-comment-id:439162875 --> @jasonmunro commented on GitHub (Nov 15, 2018): One more addition to this that I forgot to tag this issue with: https://github.com/jasonmunro/cypht/commit/929e79b777505917a340aa3d093916662e30180d Check ajax response status codes so we can better identify "offline" vs "server error". I'm going to close this issue now as the combined effect of the above changes are I think the best we can do for a better offline experience at this time.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#259
No description provided.