Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-start node and httpd when extension is launched #85

Open
maninak opened this issue Sep 21, 2023 · 0 comments
Open

Auto-start node and httpd when extension is launched #85

maninak opened this issue Sep 21, 2023 · 0 comments
Labels
enhancement New feature extending the app's current capabilities

Comments

@maninak
Copy link
Collaborator

maninak commented Sep 21, 2023

I feel that this is perhaps the biggest UX roadblock in the new user experience of Radicle. And while it makes sense that "manual mode" is the default in general, as a VS Code extension user I'd expect all those manual steps to be automatically taken care of for me by the extension. At the same time we need to make sure that we don't restrict usability for power-users who want to launch those automatically.

  1. on extension init launch the procedures described in (2)
  2. check if a Radicle Identity exists using the desired NODE_HOME if that's set for config radicle.advanced.pathToNodeHome
    2.1. if there is a Radicle Identity then launch the procedure described in (3)
    2.2. if there is no Radicle Identity, then notify the user "" and offer them to launch the auth procedure we already have
    2.2.1. if the user doesn't choose to launch auth procedure or does and doesn't bring it to a successful end then NOOP
    2.2.2. if the user launches and completes the auth procedure, then we launch the procedure described in (3)
  3. check if we're able to connect to Radicle Node
    3.1. if we can connect to Radicle Node then launch the procedures described in (4)
    3.2. if we can't connect then we should launch it ourselves using the desired NODE_HOME if that's set for config radicle.advanced.pathToNodeHome.
    3.2.1. if launching it fails we notify the user that "launching Radicle Node failed"
    3.2.2. if launching it succeeds then launch the procedures described in (4)
  4. check if we're able to connect to httpd using the value in config radicle.advanced.httpApiEndpoint
    4.1. if we can connect to httpd then NOOP
    4.2. if we can connect to then check if the config radicle.advanced.httpApiEndpoint is set with localhost (string or ip) url set
    4.2.1. if the config isn't set with a localhost url set, then we notify the user that we couldn't connect to httpd
    4.2.2. if the config is set with a localhost url, then we should launch httpd ourselves also using the desired NODE_HOME if that's set for radicle.advanced.pathToNodeHome too
    4.2.2.1. if launching httpd succeeds then NOOP
    4.2.2.2. if launching httpd fails, we notify the user that "launching Radicle HTTP API daemon failed"
  5. when the user changes radicle.advanced.pathToNodeHome config we launch the procedure described in (2)
  6. when the user changes radicle.advanced.httpApiEndpoint we launch the procedure described in (4)
  7. the procedures described in (2), (3) and (4) should produce related logs for each terminal case at a minimum.

It is strongly advised to work on this ticket after we have implemented a global store, that would help reactively_ calling procedures as dependencies change instead of procedurally launching them (harder to maintain and more error prone). See #86

@maninak maninak converted this from a draft issue Sep 21, 2023
@maninak maninak added the enhancement New feature extending the app's current capabilities label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature extending the app's current capabilities
Projects
Status: 🆕 Backlog
Development

No branches or pull requests

1 participant