posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.82k stars 91 forks source link

Run App: reduce manual user steps when running on Workbench #5283

Open sharon-wang opened 2 weeks ago

sharon-wang commented 2 weeks ago

System details:

Positron and OS details:

Positron Version: 2024.12.0 build 9 Code - OSS Version: 1.93.0 Commit: 240fde00f5cc4b92c8a68ebda83e1263af56605b Date: 2024-11-05T21:37:06.457Z Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 Edg/127.0.0.0

Posit Workbench 2024.11.0-daily+343.pro2, “Kousa Dogwood” (e5ca3c7a)

Interpreter details:

Any

Describe the issue:

When running an app with framework-specific extra steps in Positron on Workbench, such as the ones listed in the Workbench User Guide docs, instead of requiring the user to manually adjust their app, Positron could inject the necessary code or otherwise handle the proxy/server configuration on the user's behalf.

We already do a bit of this via the Run App feature, but it would be nice if we could reduce/remove the user intervention when:

Steps to reproduce the issue:

Here is an example of the manual user steps needed when running a Flask app in Positron on Workbench.

  1. Open up the flask example app in Positron on Workbench
  2. Click on the auth.py file -- a popup will show to ask the user to add the Flask code snippet. Click Ok and dismiss it Image
  3. Click on the __init__.py file -- notice that a popup does not show, because we already have the Flask snippet in the code
  4. Click on the Run App to run the Flask app

If the Flask code snippet was not added to the __init__.py file, the Register and Login redirects of the app would not work.

Expected or desired behavior:

Users can run with any of the Positron Run App supported app frameworks at the click of a button, without any additional steps to manually configure the app to work in the proxied environment on Workbench.

Were there any error messages in the UI, Output panel, or Developer Tools console?

N/A