After a Shiny application exits, it is still visible in the Viewer.
Steps to reproduce the issue:
Start R, then run the following code:
shiny::runExample("01_hello")
Then, press the Stop button in the Console. The Shiny app exits, but remains visible in the Viewer pane.
Expected or desired behavior:
Once the Shiny app has exited, it should be removed from the Viewer.
This would require Positron to either have some specific knowledge about how Shiny works, or to expose an API that the Shiny extension could use to implement this behavior.
For reference, here's where RStudio listens for Shiny's disconnected message to implement this behavior:
System details:
Positron and OS details:
Interpreter details:
R 4.4.1
Describe the issue:
After a Shiny application exits, it is still visible in the Viewer.
Steps to reproduce the issue:
Start R, then run the following code:
Then, press the Stop button in the Console. The Shiny app exits, but remains visible in the Viewer pane.
Expected or desired behavior:
Once the Shiny app has exited, it should be removed from the Viewer.
This would require Positron to either have some specific knowledge about how Shiny works, or to expose an API that the Shiny extension could use to implement this behavior.
For reference, here's where RStudio listens for Shiny's
disconnected
message to implement this behavior:https://github.com/rstudio/rstudio/blob/main/src/gwt/src/org/rstudio/studio/client/shiny/ShinyDisconnectNotifier.java
(originally noted by @jennybc)