What exactly counts as activity, in terms of having your app not disconnect? I know if I have an app open and leave it for an hour then it'll grey out and disconnect. Does moving the mouse count as activity? Does using invalidateLater or reactivePoll mean that the app will never time out because there's always talk between R and my browser?

Similarly, what counts as usage on shinyapps.io? Is it exactly the same as above?

For Shiny Server Pro, any reactive operation will reset the idle timer. In practice this means any input being sent to the server, and certainly anything triggered by invalidateLater as well. I assume it's the same for ShinyApps.io.