{"action":"created","issue":{"url":"https://api.github.com/repos/rstudio/shiny-server/issues/168","labels_url":"https://api.github.com/repos/rstudio/shiny-server/issues/168/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/shiny-server/issues/168/comments","events_url":"https://api.github.com/repos/rstudio/shiny-server/issues/168/events","html_url":"https://github.com/rstudio/shiny-server/pull/168","id":121588763,"number":168,"title":"Add reconnect capabilities","user":{"login":"trestletech","id":1593639,"avatar_url":"https://avatars.githubusercontent.com/u/1593639?v=3","gravatar_id":"","url":"https://api.github.com/users/trestletech","html_url":"https://github.com/trestletech","followers_url":"https://api.github.com/users/trestletech/followers","following_url":"https://api.github.com/users/trestletech/following{/other_user}","gists_url":"https://api.github.com/users/trestletech/gists{/gist_id}","starred_url":"https://api.github.com/users/trestletech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trestletech/subscriptions","organizations_url":"https://api.github.com/users/trestletech/orgs","repos_url":"https://api.github.com/users/trestletech/repos","events_url":"https://api.github.com/users/trestletech/events{/privacy}","received_events_url":"https://api.github.com/users/trestletech/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-12-10T22:11:24Z","updated_at":"2015-12-15T16:51:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rstudio/shiny-server/pulls/168","html_url":"https://github.com/rstudio/shiny-server/pull/168","diff_url":"https://github.com/rstudio/shiny-server/pull/168.diff","patch_url":"https://github.com/rstudio/shiny-server/pull/168.patch"},"body":"Behavior:\r\n\r\n - If `disable_reconnect true` is set in the config, then the behavior mimics what we have today, with the subtle exception that Shiny Server, instead of Shiny, is producing the grey screen on disconnect (with slightly different mechanics). By default, the feature is enabled, though.\r\n - If we have an unexpected disconnect, we'll present they grey screen with a dialog at the top counting down from 15 seconds. The R session will stay active for this same amount of time. If the user clicks \"reconnect\" within those 15 seconds, they'll be reattached to their original session with no lost state.\r\n - After 15 seconds with no user intervention, we'll close the connection to the Shiny process, and the UI will no longer offer to \"reconnect\" but rather will say that you've been disconnected and the button will say \"Reload\", which just refreshes the page and starts a new session.\r\n - If we reconnect to a server who has no knowledge of the ID we provide (i.e. if the server was restarted), then we'll immediately get an alert explaining that our session has been lost and we'll see the \"Reload\" button.\r\n - If disconnected cleanly (i.e. the server or client called a `conn.close()`) then we immediately present the \"Reload\" option, skipping over the whole \"reconnect\" business.\r\n\r\nFeedback on dialog UI and text especially welcome.\r\n\r\nCC @jcheng5 @aronatkins \r\n\r\nP.S. My editor was doing weird things with the JS. I may do a grant re-indent before I merge, but I didn't want to confuse the diff."},"comment":{"url":"https://api.github.com/repos/rstudio/shiny-server/issues/comments/164824778","html_url":"https://github.com/rstudio/shiny-server/pull/168#issuecomment-164824778","issue_url":"https://api.github.com/repos/rstudio/shiny-server/issues/168","id":164824778,"user":{"login":"aronatkins","id":362187,"avatar_url":"https://avatars.githubusercontent.com/u/362187?v=3","gravatar_id":"","url":"https://api.github.com/users/aronatkins","html_url":"https://github.com/aronatkins","followers_url":"https://api.github.com/users/aronatkins/followers","following_url":"https://api.github.com/users/aronatkins/following{/other_user}","gists_url":"https://api.github.com/users/aronatkins/gists{/gist_id}","starred_url":"https://api.github.com/users/aronatkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aronatkins/subscriptions","organizations_url":"https://api.github.com/users/aronatkins/orgs","repos_url":"https://api.github.com/users/aronatkins/repos","events_url":"https://api.github.com/users/aronatkins/events{/privacy}","received_events_url":"https://api.github.com/users/aronatkins/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T16:51:32Z","updated_at":"2015-12-15T16:51:32Z","body":"UI nit: The count-down pauses while an error alert is open. This is likely not your intent. The timer needs to compute the remaining time each time it wakes up rather than blindly counting down from 15."}}